Infört Observable Property överallt, där tillämpligt

This commit is contained in:
2025-10-13 12:13:12 +02:00
parent b2dbb9993f
commit b4d6c6d530
8 changed files with 111 additions and 456 deletions

View File

@ -6,52 +6,21 @@ public partial class RoundBuilderGroup : ObservableObject
{
public RoundBuilderGroup()
{
_gameRoundId = 0;
_gameRoundStartDate = DateTime.MinValue;
_status = GamePointStatus.New;
GameRoundId = 0;
GameRoundStartDate = DateTime.MinValue;
Status = GamePointStatus.New;
Elements = new List<RoundBuilderElement>();
}
private int _gameRoundId;
private DateTime _gameRoundStartDate;
[ObservableProperty]
private int gameRoundId;
[ObservableProperty]
private DateTime gameRoundStartDate;
[ObservableProperty]
private GamePointStatus _status;
[ObservableProperty]
private List<RoundBuilderElement> elements;
public int GameRoundId
{
get { return _gameRoundId; }
set
{
_gameRoundId = value;
// No need to raise property changed for this example
}
}
public DateTime GameRoundStartDate
{
get { return _gameRoundStartDate; }
set
{
_gameRoundStartDate = value;
// No need to raise property changed for this example
}
}
public GamePointStatus Status
{
get { return _status; }
set
{
_status = value;
// No need to raise property changed for this example
}
}
//public List<RoundBuilderElement> Elements
//{
// get { return _elements; }
// set
// {
// _elements = value;
// OnPropertyChanged(nameof(Elements));
// // No need to raise property changed for this example
// }
//}
}