Beispiel #1
0
        public MTSViewModel(MTS mts)
        {
            AddMTSBoosterCommand    = new DelegateCommand(AddMTSBooster);
            RemoveMTSBoosterCommand = new DelegateCommand <MTSBoosterViewModel>(RemoveMTSBooster);

            if (mts != null)
            {
                LoadFrom(mts);
            }
        }
Beispiel #2
0
 override public void LoadFrom(Subsystem mts)
 {
     _mts       = (MTS)mts;
     Controller = new MTSControllerViewModel(_mts.controller);
     Boosters   = new ObservableCollection <MTSBoosterViewModel>();
     foreach (MTSBooster booster in _mts.boosters)
     {
         Boosters.Add(new MTSBoosterViewModel(booster));
     }
 }
Beispiel #3
0
 public bool IsViewModelOf(MTS mts)
 {
     return(mts == _mts);
 }