예제 #1
0
		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;
			}
		}
예제 #2
0
		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;
			}
		}
예제 #3
0
		void OnChangeAutomaticOffLogic()
		{
			var logicViewModel = new LogicViewModel(PumpStation, PumpStation.AutomaticOffLogic);
			if (DialogService.ShowModalWindow(logicViewModel))
			{
				GKManager.SetPumpStationAutomaticOffLogic(PumpStation, logicViewModel.GetModel());
				OnPropertyChanged(() => AutomaticOffPresentationName);
				ServiceFactory.SaveService.GKChanged = true;
			}
		}
예제 #4
0
		void OnChangeCloseRegimeLogic()
		{
			var logicViewModel = new LogicViewModel(Door, Door.CloseRegimeLogic);
			if (DialogService.ShowModalWindow(logicViewModel))
			{
				GKManager.SetDoorCloseRegimeLogic(Door, logicViewModel.GetModel());
				OnPropertyChanged(() => CloseRegimeLogicPresentationName);
				ServiceFactory.SaveService.GKChanged = true;
			}
		}
예제 #5
0
		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;
			}
		}
예제 #6
0
		void OnChangeStartLogic()
		{
			var logicViewModel = new LogicViewModel(MPT, MPT.MptLogic);
			if (DialogService.ShowModalWindow(logicViewModel))
			{
				GKManager.SetMPTLogic(MPT, logicViewModel.GetModel());
				OnPropertyChanged(() => StartPresentationName);
				ServiceFactory.SaveService.GKChanged = true;
			}
		}