Пример #1
0
        public MTSViewModel(MTS mts)
        {
            AddMTSBoosterCommand    = new DelegateCommand(AddMTSBooster);
            RemoveMTSBoosterCommand = new DelegateCommand <MTSBoosterViewModel>(RemoveMTSBooster);

            if (mts != null)
            {
                LoadFrom(mts);
            }
        }
Пример #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));
     }
 }
Пример #3
0
 public bool IsViewModelOf(MTS mts)
 {
     return(mts == _mts);
 }