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