Projekte können erstellt und geladen werden
This commit is contained in:
30
SewerStammGen/ViewModel/State/ActualState.cs
Normal file
30
SewerStammGen/ViewModel/State/ActualState.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Shared.Domain;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SewerStammGen.WPF.ViewModel.State
|
||||
{
|
||||
internal class ActualState : IActualState
|
||||
{
|
||||
public int ProjektID { get; private set; }
|
||||
|
||||
public void SetProjekt(Projekt projekt, bool notification = true)
|
||||
{
|
||||
ProjektID = projekt.Id;
|
||||
if(notification)
|
||||
{
|
||||
OnProjektChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public event EventHandler? ProjektChanged;
|
||||
private void OnProjektChanged()
|
||||
{
|
||||
ProjektChanged?.Invoke(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user