public MESViewModel(MES mes) { AddMESEngineCommand = new DelegateCommand(AddEngine); RemoveMESEngineCommand = new DelegateCommand <MESEngineViewModel>(RemoveEngine); if (mes != null) { LoadFrom(mes); } }
override public void LoadFrom(Subsystem mes) { _mes = (MES)mes; Engines = new ObservableCollection <MESEngineViewModel>(); foreach (MESEngine engine in _mes.engines) { Engines.Add(new MESEngineViewModel(engine)); } }
public bool IsViewModelOf(MES mes) { return(mes == _mes); }