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; } }
public DeviceLogicViewModel(XDevice device, XDeviceLogic deviceLogic) { if (device.DriverType == XDriverType.System) Title = "Настройка логики"; else Title = "Настройка логики устройства " + device.PresentationName; Device = device; if (deviceLogic.Clauses.Count == 0) { deviceLogic.Clauses.Add(new XClause()); } OnLogicViewModel = new LogicViewModel(device, deviceLogic.Clauses); OffLogicViewModel = new LogicViewModel(device, deviceLogic.OffClauses); SelectedMROMessageNo = deviceLogic.ZoneLogicMROMessageNo; SelectedMROMessageType = deviceLogic.ZoneLogicMROMessageType; }
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; } }