public CameraDetailsViewModel(Camera camera) { ShowCommand = new RelayCommand(OnShow); SetPtzPresetCommand = new RelayCommand(OnSetPtzPreset, CanSetPtzPreset); AlarmSetChannelCommand = new RelayCommand(OnAlarmSetChannel, CanAlarmSetChannel); AlarmDisableChannelCommand = new RelayCommand(OnAlarmDisableChannel, CanAlarmDisableChannel); Camera = camera; Title = Camera.PresentationName; Camera.StatusChanged += OnCameraStatusChanged; Presets = new ObservableCollection<int>(); for (int i = 0; i < camera.CountPresets; i++) { Presets.Add(i + 1); } SelectedPreset = Presets.FirstOrDefault(); if (Camera != null) { Width = Camera.ShowDetailsWidth; Height = Camera.ShowDetailsHeight; MarginLeft = Camera.ShowDetailsMarginLeft; MarginTop = Camera.ShowDetailsMarginTop; IsRecordOnline = Camera.IsRecordOnline; IsOnGuard = Camera.IsOnGuard; Status = Camera.Status; PlanLinks = new PlanLinksViewModel(Camera); } }
public SKDZoneDetailsViewModel(GKSKDZone zone) { ShowCommand = new RelayCommand(OnShow); ShowJournalCommand = new RelayCommand(OnShowJournal); OpenCommand = new RelayCommand(OnOpen); CloseCommand = new RelayCommand(OnClose); Zone = zone; Title = Zone.PresentationName; State.StateChanged += new Action(OnStateChanged); PlanLinks = new PlanLinksViewModel(Zone); }
public ZoneDetailsViewModel(GKZone zone) { ShowCommand = new RelayCommand(OnShow); ShowJournalCommand = new RelayCommand(OnShowJournal); ResetFireCommand = new RelayCommand(OnResetFire, CanResetFire); SetIgnoreCommand = new RelayCommand(OnSetIgnore, CanSetIgnore); ResetIgnoreCommand = new RelayCommand(OnResetIgnore, CanResetIgnore); Zone = zone; Title = Zone.PresentationName; State.StateChanged += new Action(OnStateChanged); PlanLinks = new PlanLinksViewModel(Zone); }
public DelayDetailsViewModel(GKDelay delay) { Delay = delay; Title = Delay.PresentationName; State.StateChanged += new Action(OnStateChanged); PlanLinks = new PlanLinksViewModel(Delay); ShowCommand = new RelayCommand(OnShow); ShowJournalCommand = new RelayCommand(OnShowJournal); SetAutomaticStateCommand = new RelayCommand(OnSetAutomaticState, CanSetAutomaticState); SetManualStateCommand = new RelayCommand(OnSetManualState, CanSetManualState); SetIgnoreStateCommand = new RelayCommand(OnSetIgnoreState, CanSetIgnoreState); TurnOnCommand = new RelayCommand(OnTurnOn); TurnOnNowCommand = new RelayCommand(OnTurnOnNow); TurnOffCommand = new RelayCommand(OnTurnOff); }
public DirectionDetailsViewModel(GKDirection direction) { Direction = direction; Title = Direction.PresentationName; State.StateChanged += new Action(OnStateChanged); PlanLinks = new PlanLinksViewModel(Direction); ShowCommand = new RelayCommand(OnShow); ShowJournalCommand = new RelayCommand(OnShowJournal); SetAutomaticStateCommand = new RelayCommand(OnSetAutomaticState, CanSetAutomaticState); SetManualStateCommand = new RelayCommand(OnSetManualState, CanSetManualState); SetIgnoreStateCommand = new RelayCommand(OnSetIgnoreState, CanSetIgnoreState); TurnOnCommand = new RelayCommand(OnTurnOn); TurnOnNowCommand = new RelayCommand(OnTurnOnNow); TurnOffCommand = new RelayCommand(OnTurnOff); ForbidStartCommand = new RelayCommand(OnForbidStart); }
public MPTDetailsViewModel(GKMPT mpt) { MPT = mpt; Title = MPT.PresentationName; State.StateChanged += new Action(OnStateChanged); PlanLinks = new PlanLinksViewModel(MPT); ShowCommand = new RelayCommand(OnShow); ShowJournalCommand = new RelayCommand(OnShowJournal); SetAutomaticStateCommand = new RelayCommand(OnSetAutomaticState, CanSetAutomaticState); SetManualStateCommand = new RelayCommand(OnSetManualState, CanSetManualState); SetIgnoreStateCommand = new RelayCommand(OnSetIgnoreState, CanSetIgnoreState); TurnOnCommand = new RelayCommand(OnTurnOn); TurnOnNowCommand = new RelayCommand(OnTurnOnNow); TurnOffCommand = new RelayCommand(OnTurnOff); ForbidStartCommand = new RelayCommand(OnForbidStart); }
public GuardZoneDetailsViewModel(GKGuardZone zone) { ShowCommand = new RelayCommand(OnShow); ShowJournalCommand = new RelayCommand(OnShowJournal); SetAutomaticStateCommand = new RelayCommand(OnSetAutomaticState, CanSetAutomaticState); SetManualStateCommand = new RelayCommand(OnSetManualState, CanSetManualState); SetIgnoreStateCommand = new RelayCommand(OnSetIgnoreState, CanSetIgnoreState); TurnOnCommand = new RelayCommand(OnTurnOn); TurnOnNowCommand = new RelayCommand(OnTurnOnNow); TurnOffCommand = new RelayCommand(OnTurnOff); TurnOffNowCommand = new RelayCommand(OnTurnOffNow); ResetCommand = new RelayCommand(OnReset, CanReset); Zone = zone; Title = Zone.PresentationName; State.StateChanged += new Action(OnStateChanged); PlanLinks = new PlanLinksViewModel(Zone); }
public DeviceDetailsViewModel(GKDevice device) { ShowCommand = new RelayCommand(OnShow); ShowParentCommand = new RelayCommand(OnShowParent, CanShowParent); ShowZoneCommand = new RelayCommand(OnShowZone); ShowJournalCommand = new RelayCommand(OnShowJournal); Device = device; DeviceStateViewModel = new DeviceStateViewModel(State, device.Driver.IsAm); State.StateChanged += OnStateChanged; State.MeasureParametersChanged += OnMeasureParametersChanged; DeviceCommandsViewModel = new DeviceCommandsViewModel(Device); DevicePropertiesViewModel = new DevicePropertiesViewModel(Device); PlanLinks = new PlanLinksViewModel(Device); Title = Device.PresentationName; StartMeasureParametersMonitoring(); ServiceFactory.Events.GetEvent<GKObjectsPropertyChangedEvent>().Unsubscribe(OnGKObjectsPropertyChanged); ServiceFactory.Events.GetEvent<GKObjectsPropertyChangedEvent>().Subscribe(OnGKObjectsPropertyChanged); }
public DoorDetailsViewModel(GKDoor door) { ShowCommand = new RelayCommand(OnShow); ShowJournalCommand = new RelayCommand(OnShowJournal); SetAutomaticStateCommand = new RelayCommand(OnSetAutomaticState, CanSetAutomaticState); SetManualStateCommand = new RelayCommand(OnSetManualState, CanSetManualState); SetIgnoreStateCommand = new RelayCommand(OnSetIgnoreState, CanSetIgnoreState); TurnOnCommand = new RelayCommand(OnTurnOn); TurnOffCommand = new RelayCommand(OnTurnOff); TurnOffNowCommand = new RelayCommand(OnTurnOffNow); ResetCommand = new RelayCommand(OnReset); SetRegimeNormCommand = new RelayCommand(OnSetRegimeNorm); SetRegimeOpenCommand = new RelayCommand(OnSetRegimeOpen); SetRegimeCloseCommand = new RelayCommand(OnSetRegimeClose); Door = door; State.StateChanged -= OnStateChanged; State.StateChanged += OnStateChanged; Planlink = new PlanLinksViewModel(Door); Title = Door.PresentationName; }
public void InitializePlanLink() { var IplanElement = Alarm.GkBaseEntity as IPlanPresentable; if (IplanElement != null) PlanLinks = new PlanLinksViewModel(IplanElement); }