Exemple #1
0
        public MainPageViewModel()
        {
            //Get Channels//
            var channels = Data_CRUD.GetChannels();

            Channel1 = channels[0] as UI_Channel_Display;
            Channel2 = channels[1] as UI_Channel_Display;



            MainButtonCommand = new MainPageCommand(MainButtonExecuted, param => this.CanMainButtonExecute);

            SettingsButtonCommand = new MainPageCommand(SettingsButtonExecuted, param => this.canExecute);
            PlaybackButtonCommand = new MainPageCommand(PlaybackButtonExecuted, param => this.canExecute);

            IsRecordingLeft_Command  = new MainPageCommand(IsRecordingLeftExecuted, param => this.CanExecute);
            IsRecordingRight_Command = new MainPageCommand(IsRecordingRightExecuted, param => this.CanExecute);


            Channel1FirstAlertCommand  = new MainPageCommand(Channel1FirstAlertCommand_Executed, param => this.canExecute);
            Channel1SecondAlertCommand = new MainPageCommand(Channel1SecondAlertCommand_Executed, param => this.canExecute);
            Channel1ThirdAlertCommand  = new MainPageCommand(Channel1ThirdAlertCommand_Executed, param => this.canExecute);

            Channel2FirstAlertCommand  = new MainPageCommand(Channel2FirstAlertCommand_Executed, param => this.canExecute);
            Channel2SecondAlertCommand = new MainPageCommand(Channe21SecondAlertCommand_Executed, param => this.canExecute);
            Channel2ThirdAlertCommand  = new MainPageCommand(Channel2ThirdAlertCommand_Executed, param => this.canExecute);


            Channel1_Playback_Command = new MainPageCommand(Channel1_Playback_Command_Executed, param => this.canExecute);
            Channel2_Playback_Command = new MainPageCommand(Channel2_Playback_Command_Executed, param => this.canExecute);
        }
Exemple #2
0
        public CameraControlPageViewModel()
        {
            //Get channels from database//
            var channels = Data_CRUD.GetChannels();

            MainButtonCommand     = new MainPageCommand(MainButtonCommandExecuted, param => this.CanExecute);
            BasicButtonCommand    = new MainPageCommand(BasicButtonCommandExecuted, param => this.canExecute);
            ControlButtonCommand  = new MainPageCommand(ControlButtonCommandExecuted, param => this.canExecute);
            TriggerButtonCommand  = new MainPageCommand(TriggerButtonCommandExecuted, param => this.CanExecute);
            TutorialButtonCommand = new MainPageCommand(TutorialButtonCommandExecuted, param => this.CanExecute);


            PTZUpButtonCommand    = new MainPageCommand(PTZUpButtonCommandExecuted, param => this.CanExecute);
            PTZDownButtonCommand  = new MainPageCommand(PTZDownButtonCommandExecuted, param => this.canExecute);
            PTZLeftButtonCommand  = new MainPageCommand(PTZLeftButtonCommandExecuted, param => this.canExecute);
            PTZRightButtonCommand = new MainPageCommand(PTZRightButtonCommandExecuted, param => this.CanExecute);


            PTZUpRightButtonCommand   = new MainPageCommand(PTZUpRigntButtonCommandExecuted, param => this.CanExecute);
            PTZUpLeftButtonCommand    = new MainPageCommand(PTZUpLeftButtonCommandExecuted, param => this.canExecute);
            PTZDownRightButtonCommand = new MainPageCommand(PTZDownRightButtonCommandExecuted, param => this.canExecute);
            PTZDownLeftButtonCommand  = new MainPageCommand(PTZDownLeftButtonCommandExecuted, param => this.CanExecute);



            PTZZoomInButtonCommand  = new MainPageCommand(PTZZoomInButtonCommandExecuted, param => this.CanExecute);
            PTZZoomOutButtonCommand = new MainPageCommand(PTZZoomOutButtonCommandExecuted, param => this.CanExecute);


            _UI_PTZ = new  UI_PTZ();
        }
Exemple #3
0
 public void PTZZoomOutButtonCommandExecuted(object obj)
 {
     //MessageBox.Show("PTZZoomOutButtonCommandExecuted Button executed!");
     _UI_PTZ.Zoom      = PTZoom.Out;
     _UI_PTZ.Direction = PTZDirection.None;
     Data_CRUD.UpdateChannelDisplay(_UI_PTZ);
 }
Exemple #4
0
        public void IsRecordingRightExecuted(object obj)
        {
            //MessageBox.Show(obj.ToString());

            bool _IsRecording = (bool)obj;

            Channel2.IsRecording = _IsRecording;
            Data_CRUD.UpdateChannelDisplay(Channel2);
        }