riversong code showcase
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user