31 lines
694 B
C#
31 lines
694 B
C#
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());
|
|
}
|
|
}
|
|
}
|