public MTSViewModel(MTS mts) { AddMTSBoosterCommand = new DelegateCommand(AddMTSBooster); RemoveMTSBoosterCommand = new DelegateCommand <MTSBoosterViewModel>(RemoveMTSBooster); if (mts != null) { LoadFrom(mts); } }
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)); } }
public bool IsViewModelOf(MTS mts) { return(mts == _mts); }