32 lines
850 B
C#
32 lines
850 B
C#
namespace DanieleMarotta.RiversongCodeShowcase
|
|
{
|
|
public class PopulationPanelModel : UIModel
|
|
{
|
|
public int Population { get; set; }
|
|
|
|
public int Happiness { get; set; }
|
|
|
|
public LaborTier LaborTier { get; set; }
|
|
|
|
public void Update(int population, int happiness, LaborTier laborTier)
|
|
{
|
|
if (Population != population)
|
|
{
|
|
Population = population;
|
|
NotifyPropertyChanged(nameof(Population));
|
|
}
|
|
|
|
if (Happiness != happiness)
|
|
{
|
|
Happiness = happiness;
|
|
NotifyPropertyChanged(nameof(Happiness));
|
|
}
|
|
|
|
if (LaborTier != laborTier)
|
|
{
|
|
LaborTier = laborTier;
|
|
NotifyPropertyChanged(nameof(LaborTier));
|
|
}
|
|
}
|
|
}
|
|
} |