Пример #1
0
 public StandbyViewModel(AirFleet source)
 {
     this.source = source;
     this.CompositeDisposable.Add(new Livet.EventListeners.PropertyChangedEventListener(this.source)
     {
         { nameof(AirFleet.State), (_, __) =>
           {
               this.RaisePropertyChanged(nameof(this.IsReady));
               this.RaisePropertyChanged(nameof(this.IsRelocating));
           } }
     });
 }
Пример #2
0
        public AirFleetViewModel(AirFleet source)
        {
            this.source = source;

            this.standby = new StandbyViewModel(this.source);
            this.sortie  = new SortieViewModel();
            this.defense = new DefenseViewModel();

            this.CompositeDisposable.Add(new PropertyChangedEventListener(this.source)
            {
                (sender, args) => this.RaisePropertyChanged(args.PropertyName),
                { nameof(AirFleet.State), (sender, args) => this.RaisePropertyChanged(nameof(this.QuickStateView)) }
            });
        }