feat: add view models for all entities

This commit is contained in:
k0t9i
2023-01-29 20:44:24 +04:00
parent 16630de6a4
commit 8b27c84a9e
4413 changed files with 1150 additions and 122 deletions

View File

@@ -1,16 +1,28 @@
namespace Client.Domain.ValueObjects
using Client.Domain.Common;
namespace Client.Domain.ValueObjects
{
public class ExperienceInfo
public class ExperienceInfo : NotifyPropertyChanged
{
public uint Level { get; set; }
public uint Exp { get; set; }
public uint Sp { get; set; }
private uint level;
private uint exp;
private uint sp;
public uint Level { get => level; set { if (value != level) { level = value; OnPropertyChanged("Level"); OnPropertyChanged("ExpToLevel"); } } }
public uint Exp { get => exp; set { if (value != exp) { exp = value; OnPropertyChanged("Exp"); } } }
public uint Sp { get => sp; set { if (value != sp) { sp = value; OnPropertyChanged("Sp"); } } }
public uint ExpToLevel {
get
{
return level * 200;
}
}
public ExperienceInfo(uint level, uint exp, uint sp)
{
Level = level;
Exp = exp;
Sp = sp;
this.level = level;
this.exp = exp;
this.sp = sp;
}
}
}