Schachtanbindung angestellt
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -28,11 +29,22 @@ namespace KlassenBIB
|
|||||||
{
|
{
|
||||||
return haltungslaenge * harzbedarf;
|
return haltungslaenge * harzbedarf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string CheckVerzeichnisse(string projektpfad)
|
||||||
|
{
|
||||||
|
string path = Path.Combine(projektpfad, PfadZurSan);
|
||||||
|
if (!Directory.Exists(path)) Directory.CreateDirectory(path);
|
||||||
|
|
||||||
|
string mypath = Path.Combine(path, Verzeichnispfad);
|
||||||
|
if (!Directory.Exists(mypath)) Directory.CreateDirectory(mypath);
|
||||||
|
|
||||||
|
return mypath;
|
||||||
|
}
|
||||||
|
|
||||||
public InlinerSanierung()
|
public InlinerSanierung()
|
||||||
{
|
{
|
||||||
//datumKalibrierung = new DateTime();
|
//datumKalibrierung = new DateTime();
|
||||||
|
Verzeichnispfad = "UVAnlage";
|
||||||
if (datumKalibrierung <= DateTime.MinValue || datumKalibrierung >= DateTime.MaxValue) datumKalibrierung = DateTime.Now;
|
if (datumKalibrierung <= DateTime.MinValue || datumKalibrierung >= DateTime.MaxValue) datumKalibrierung = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
<Compile Include="Sanieren.cs" />
|
<Compile Include="Sanieren.cs" />
|
||||||
<Compile Include="Sanierung.cs" />
|
<Compile Include="Sanierung.cs" />
|
||||||
<Compile Include="SanierungCollection.cs" />
|
<Compile Include="SanierungCollection.cs" />
|
||||||
|
<Compile Include="SchachtAnbindung.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -11,9 +11,11 @@ namespace KlassenBIB
|
|||||||
Guid guid;
|
Guid guid;
|
||||||
DateTime? datum;
|
DateTime? datum;
|
||||||
bool fertig = false;
|
bool fertig = false;
|
||||||
|
string verzeichnispfad;
|
||||||
|
|
||||||
public Guid Guid { get => guid; set => guid = value; }
|
public Guid Guid { get => guid; set => guid = value; }
|
||||||
public DateTime? Datum { get => datum; set => datum = value; }
|
public DateTime? Datum { get => datum; set => datum = value; }
|
||||||
public bool Fertig { get => fertig; set => fertig = value; }
|
public bool Fertig { get => fertig; set => fertig = value; }
|
||||||
|
public string Verzeichnispfad { get => verzeichnispfad; protected set => verzeichnispfad = value; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ namespace KlassenBIB
|
|||||||
//
|
//
|
||||||
// Zusammenfassung:
|
// Zusammenfassung:
|
||||||
// Bietet die grundlegene Struktur für eine Sanierung
|
// Bietet die grundlegene Struktur für eine Sanierung
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
[Browsable(false)]
|
||||||
public abstract class Sanierung : INotifyPropertyChanged
|
public abstract class Sanierung : INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
//Guid guid;
|
//Guid guid;
|
||||||
@@ -23,8 +25,19 @@ namespace KlassenBIB
|
|||||||
bool hDReinigung;
|
bool hDReinigung;
|
||||||
DateTime hDReinigungDatum;
|
DateTime hDReinigungDatum;
|
||||||
//DateTime sanierungsDatum;
|
//DateTime sanierungsDatum;
|
||||||
|
Inspektionsobjekt inspektionsobjekt;
|
||||||
|
protected string pfadZurSan;
|
||||||
|
|
||||||
|
[Browsable(false)]
|
||||||
|
public Sanierung()
|
||||||
|
{
|
||||||
|
//if (inspektionsobjekt == null) return;
|
||||||
|
//pfadZurSan = string.Format();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract string CheckVerzeichnisse(string projektpfad);
|
||||||
//public Guid Guid { get => guid; set => guid = value; }
|
//public Guid Guid { get => guid; set => guid = value; }
|
||||||
public double TempAusen
|
public double TempAusen
|
||||||
{
|
{
|
||||||
@@ -46,8 +59,15 @@ namespace KlassenBIB
|
|||||||
public bool STVOAbsicherung { get => sTVOAbsicherung; set => sTVOAbsicherung = value; }
|
public bool STVOAbsicherung { get => sTVOAbsicherung; set => sTVOAbsicherung = value; }
|
||||||
public bool HDReinigung { get => hDReinigung; set => hDReinigung = value; }
|
public bool HDReinigung { get => hDReinigung; set => hDReinigung = value; }
|
||||||
public DateTime HDReinigungDatum { get => hDReinigungDatum; set => hDReinigungDatum = value; }
|
public DateTime HDReinigungDatum { get => hDReinigungDatum; set => hDReinigungDatum = value; }
|
||||||
|
public Inspektionsobjekt Inspektionsobjekt { get => inspektionsobjekt; set => inspektionsobjekt = value; }
|
||||||
|
protected string PfadZurSan {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return string.Format("{0}-{1}", Inspektionsobjekt.VonPunkt, Inspektionsobjekt.BisPunkt);
|
||||||
|
}
|
||||||
|
}
|
||||||
//public DateTime SanierungsDatum { get => sanierungsDatum; set => sanierungsDatum = value; }
|
//public DateTime SanierungsDatum { get => sanierungsDatum; set => sanierungsDatum = value; }
|
||||||
|
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
private void NotifyPropertyChanged([CallerMemberName] string propertyName = null)
|
private void NotifyPropertyChanged([CallerMemberName] string propertyName = null)
|
||||||
{
|
{
|
||||||
|
|||||||
28
KlassenBIB/SchachtAnbindung.cs
Normal file
28
KlassenBIB/SchachtAnbindung.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace KlassenBIB
|
||||||
|
{
|
||||||
|
public class SchachtAnbindung : Sanieren
|
||||||
|
{
|
||||||
|
public SchachtAnbindung()
|
||||||
|
{
|
||||||
|
Verzeichnispfad = "Schachtanbindung";
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string CheckVerzeichnisse(string projektpfad)
|
||||||
|
{
|
||||||
|
string path = Path.Combine(projektpfad, PfadZurSan);
|
||||||
|
if (!Directory.Exists(path)) Directory.CreateDirectory(path);
|
||||||
|
|
||||||
|
string mypath = Path.Combine(path, Verzeichnispfad);
|
||||||
|
if (!Directory.Exists(mypath)) Directory.CreateDirectory(mypath);
|
||||||
|
|
||||||
|
return mypath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ namespace SanSystem
|
|||||||
{
|
{
|
||||||
public static readonly Global instance = new Global();
|
public static readonly Global instance = new Global();
|
||||||
|
|
||||||
|
public string projektpfad = "temp";
|
||||||
public ILanguage language = null;
|
public ILanguage language = null;
|
||||||
|
|
||||||
public static Global Instance
|
public static Global Instance
|
||||||
@@ -21,6 +22,8 @@ namespace SanSystem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void LoadLanguage()
|
public void LoadLanguage()
|
||||||
{
|
{
|
||||||
language = Language.Language.GetLanguage(Language.BUILTINLANGUAGES.GERMAN);
|
language = Language.Language.GetLanguage(Language.BUILTINLANGUAGES.GERMAN);
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ namespace SanSystem
|
|||||||
LINERGRUNDLAGEN
|
LINERGRUNDLAGEN
|
||||||
}
|
}
|
||||||
InlinerSanierung inliner = null;
|
InlinerSanierung inliner = null;
|
||||||
|
string destinationPath = string.Empty;
|
||||||
public UCInliner(InlinerSanierung san)
|
public UCInliner(InlinerSanierung san)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -60,6 +61,7 @@ namespace SanSystem
|
|||||||
|
|
||||||
private void UCInliner_Load(object sender, EventArgs e)
|
private void UCInliner_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
CheckDirectories();
|
||||||
cb_genehmigung.DataBindings.Clear();
|
cb_genehmigung.DataBindings.Clear();
|
||||||
cb_stvo.DataBindings.Clear();
|
cb_stvo.DataBindings.Clear();
|
||||||
cb_wasserhaltung.DataBindings.Clear();
|
cb_wasserhaltung.DataBindings.Clear();
|
||||||
@@ -76,7 +78,7 @@ namespace SanSystem
|
|||||||
cb_genehmigung.DataBindings.Add(new Binding("Checked", inliner, "genehmigungVorhanden"));
|
cb_genehmigung.DataBindings.Add(new Binding("Checked", inliner, "genehmigungVorhanden"));
|
||||||
cb_stvo.DataBindings.Add(new Binding("Checked", inliner, "sTVOAbsicherung"));
|
cb_stvo.DataBindings.Add(new Binding("Checked", inliner, "sTVOAbsicherung"));
|
||||||
cb_wasserhaltung.DataBindings.Add(new Binding("Checked", inliner, "wasserhaltungEingerichtet"));
|
cb_wasserhaltung.DataBindings.Add(new Binding("Checked", inliner, "wasserhaltungEingerichtet"));
|
||||||
txt_temp_aussen.DataBindings.Add(new Binding("Text", inliner, "TempAusen", false, DataSourceUpdateMode.OnPropertyChanged));
|
txt_temp_aussen.DataBindings.Add(new Binding("Text", inliner, "TempAusen"));
|
||||||
txt_temp_kanal.DataBindings.Add(new Binding("Text", inliner, "TempKanal"));
|
txt_temp_kanal.DataBindings.Add(new Binding("Text", inliner, "TempKanal"));
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -98,9 +100,7 @@ namespace SanSystem
|
|||||||
|
|
||||||
private void CheckDirectories()
|
private void CheckDirectories()
|
||||||
{
|
{
|
||||||
string verzeichnispfad = string.Format("{0}-{1}")
|
destinationPath = inliner.CheckVerzeichnisse(Global.Instance.projektpfad);
|
||||||
string path = Path.Combine("")
|
|
||||||
if(!Directory.Exists())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,12 @@ namespace SanSystem
|
|||||||
tab.Controls.Add(uCInliner);
|
tab.Controls.Add(uCInliner);
|
||||||
tabControl1.TabPages.Add(tab);
|
tabControl1.TabPages.Add(tab);
|
||||||
}
|
}
|
||||||
|
else if(san is SchachtAnbindung)
|
||||||
|
{
|
||||||
|
tab.Text = "Schachtanbindung";
|
||||||
|
|
||||||
|
tabControl1.TabPages.Add(tab);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -86,10 +92,22 @@ namespace SanSystem
|
|||||||
FrmSelectNewSan frmSelectNewSan = new FrmSelectNewSan();
|
FrmSelectNewSan frmSelectNewSan = new FrmSelectNewSan();
|
||||||
|
|
||||||
frmSelectNewSan.AddInlinerClicked += FrmSelectNewSan_AddInlinerClicked;
|
frmSelectNewSan.AddInlinerClicked += FrmSelectNewSan_AddInlinerClicked;
|
||||||
|
frmSelectNewSan.AddSchachtAnbindungClicked += FrmSelectNewSan_AddSchachtAnbindungClicked;
|
||||||
|
|
||||||
frmSelectNewSan.ShowDialog();
|
frmSelectNewSan.ShowDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FrmSelectNewSan_AddSchachtAnbindungClicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SchachtAnbindung schachtAnbindung = new SchachtAnbindung();
|
||||||
|
schachtAnbindung.Inspektionsobjekt = inspektionsobjekt;
|
||||||
|
inspektionsobjekt.Sanierung.Add(schachtAnbindung);
|
||||||
|
TabPage tab = new TabPage();
|
||||||
|
tab.Text = "Schachtanbindung";
|
||||||
|
|
||||||
|
tabControl1.TabPages.Add(tab);
|
||||||
|
}
|
||||||
|
|
||||||
private void FrmSelectNewSan_AddInlinerClicked(object sender, EventArgs e)
|
private void FrmSelectNewSan_AddInlinerClicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if(inspektionsobjekt.Sanierung.Count > 0)
|
if(inspektionsobjekt.Sanierung.Count > 0)
|
||||||
@@ -104,6 +122,7 @@ namespace SanSystem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
InlinerSanierung san = new InlinerSanierung();
|
InlinerSanierung san = new InlinerSanierung();
|
||||||
|
san.Inspektionsobjekt = inspektionsobjekt;
|
||||||
inspektionsobjekt.Sanierung.Add(san);
|
inspektionsobjekt.Sanierung.Add(san);
|
||||||
TabPage tab = new TabPage();
|
TabPage tab = new TabPage();
|
||||||
tab.Text = "InlinerSanierung";
|
tab.Text = "InlinerSanierung";
|
||||||
@@ -112,5 +131,7 @@ namespace SanSystem
|
|||||||
tab.Controls.Add(uCInliner);
|
tab.Controls.Add(uCInliner);
|
||||||
tabControl1.TabPages.Add(tab);
|
tabControl1.TabPages.Add(tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user