void OnShowLogic() { DelaysViewModel.Current.SelectedDelay = this; var logicViewModel = new LogicViewModel(Delay, Delay.Logic, true); if (ServiceFactory.DialogService.ShowModalWindow(logicViewModel)) { GKManager.SetDelayLogic(Delay, logicViewModel.GetModel()); OnPropertyChanged(() => PresentationLogic); ServiceFactory.SaveService.GKChanged = true; } }
void OnShowLogic() { DirectionsViewModel.Current.SelectedDirection = this; var logicViewModel = new LogicViewModel(Direction, Direction.Logic, true, hasStopClause: true); if (ServiceFactory.DialogService.ShowModalWindow(logicViewModel)) { GKManager.SetDirectionLogic(Direction, logicViewModel.GetModel()); OnPropertyChanged(() => PresentationLogic); ServiceFactory.SaveService.GKChanged = true; } }
void OnChangeAutomaticOffLogic() { var logicViewModel = new LogicViewModel(PumpStation, PumpStation.AutomaticOffLogic); if (DialogService.ShowModalWindow(logicViewModel)) { GKManager.SetPumpStationAutomaticOffLogic(PumpStation, logicViewModel.GetModel()); OnPropertyChanged(() => AutomaticOffPresentationName); ServiceFactory.SaveService.GKChanged = true; } }
void OnChangeCloseRegimeLogic() { var logicViewModel = new LogicViewModel(Door, Door.CloseRegimeLogic); if (DialogService.ShowModalWindow(logicViewModel)) { GKManager.SetDoorCloseRegimeLogic(Door, logicViewModel.GetModel()); OnPropertyChanged(() => CloseRegimeLogicPresentationName); ServiceFactory.SaveService.GKChanged = true; } }
void OnChangeSuspendLogic() { var logicViewModel = new LogicViewModel(MPT, MPT.MptLogic, hasStopClause: true, hasOnClause: false); if (DialogService.ShowModalWindow(logicViewModel)) { GKManager.SetMPTLogic(MPT, logicViewModel.GetModel()); OnPropertyChanged(() => SuspendPresentationName); ServiceFactory.SaveService.GKChanged = true; } }
void OnChangeStartLogic() { var logicViewModel = new LogicViewModel(MPT, MPT.MptLogic); if (DialogService.ShowModalWindow(logicViewModel)) { GKManager.SetMPTLogic(MPT, logicViewModel.GetModel()); OnPropertyChanged(() => StartPresentationName); ServiceFactory.SaveService.GKChanged = true; } }