Haltungübersicht angefangen
This commit is contained in:
@@ -12,6 +12,9 @@ namespace SewerStammGen.WPF.ViewModel.State
|
||||
// TODO: set auf private set setzen
|
||||
public int ProjektID { get; set; }
|
||||
|
||||
public int SchachtID { get; private set; }
|
||||
public int HaltungID { get; private set; }
|
||||
|
||||
public void SetProjekt(Projekt projekt, bool notification = true)
|
||||
{
|
||||
ProjektID = projekt.Id;
|
||||
@@ -20,12 +23,39 @@ namespace SewerStammGen.WPF.ViewModel.State
|
||||
OnProjektChanged();
|
||||
}
|
||||
}
|
||||
public void SetSchacht(Schacht schacht, bool notification = true)
|
||||
{
|
||||
SchachtID = schacht.Id;
|
||||
if(notification)
|
||||
{
|
||||
OnSchachtChanged();
|
||||
}
|
||||
}
|
||||
public void SetHaltung(Kanal haltung, bool notification = true)
|
||||
{
|
||||
HaltungID = haltung.Id;
|
||||
if(notification)
|
||||
{
|
||||
OnHaltungChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public event EventHandler? ProjektChanged;
|
||||
public event EventHandler? SchachtChanged;
|
||||
public event EventHandler? HaltungChanged;
|
||||
private void OnProjektChanged()
|
||||
{
|
||||
ProjektChanged?.Invoke(this, new EventArgs());
|
||||
}
|
||||
private void OnSchachtChanged()
|
||||
{
|
||||
SchachtChanged?.Invoke(this, new EventArgs());
|
||||
}
|
||||
private void OnHaltungChanged()
|
||||
{
|
||||
HaltungChanged?.Invoke(this, new EventArgs());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,11 @@ namespace SewerStammGen.WPF.ViewModel.State
|
||||
event EventHandler? ProjektChanged;
|
||||
// TODO: ProjektID set entfernen!
|
||||
int ProjektID { get; set; }
|
||||
int SchachtID { get; }
|
||||
int HaltungID { get; }
|
||||
|
||||
void SetProjekt(Projekt projekt, bool notification = true);
|
||||
void SetSchacht(Schacht schacht, bool notification = true);
|
||||
void SetHaltung(Kanal haltung, bool notification = true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user