Révision 957bebf1 GES_PAC/ViewModel/ChambersViewModel.cs

Voir les différences:

GES_PAC/ViewModel/ChambersViewModel.cs
19 19

  
20 20
        #region Propriétés
21 21
        public TimerPublisher Timer { get; }
22
        public List<ChamberButtonViewModel> Buttons { get; } = new();
23

  
22 24
        #endregion
23 25

  
24 26
        #region Constructeurs
......
45 47
        internal async void OnAppearing()
46 48
        {
47 49
            CurrentSet = JourneeViewModel.Instance.GetCurrentSet();
50
            RefreshAll();
51

  
48 52
            if (CurrentSet == null)
49 53
            {
50 54
                IsBusy = true;
......
52 56
                IsBusy = false;
53 57
            }
54 58
        }
59
        public void RegisterButton(ChamberButtonViewModel vm)
60
        {
61
            if (!Buttons.Contains(vm))
62
                Buttons.Add(vm);
63
        }
64
        public void RefreshAll()
65
        {
66
            foreach (var btn in Buttons)
67
                btn.UpdateProperties();
68
        }
69

  
55 70
        #endregion
56 71
    }
57 72
}

Formats disponibles : Unified diff