Exemplo n.º 1
0
        private void RecordModeSwitch_OnValueChange(object sender, EventArgs e)
        {
            if (this.Root == null)
            {
                return;
            }

            this.synchronizeUI();

            this.recordFileNameTextBox.Invoke(new MethodInvoker(delegate()
            {
                this.recordFileNameTextBox.BackColor = this.recordModeSwitch.Value ? Color.White : Color.Gainsboro;
                this.recordFileNameTextBox.Text      = this.recordModeSwitch.Value ? "파일경로를 선택해주세요." : "녹화 모드를 On 해주세요.";
            }));

            this.recordFileBrowseButton.Invoke(new MethodInvoker(delegate()
            {
                this.recordFileBrowseButton.IdleForecolor = this.recordModeSwitch.Value ? System.Drawing.Color.Salmon : SystemColors.ControlDarkDark;
                this.recordFileBrowseButton.IdleLineColor = this.recordModeSwitch.Value ? System.Drawing.Color.Salmon : SystemColors.ControlDarkDark;
            }));

            if (this.recordModeSwitch.Value)
            {
                var message     = "순찰모드와 같이 사용할 수 없습니다.";
                var messageform = new Fire_Detector.Dialog.MessageDialog(message, SystemColors.ControlLightLight);
                messageform.ShowDialog(this.Root);

                this.recordFileSettingButton.Visible = true;
            }
            else
            {
                this.recordFileSettingButton.Invoke(new MethodInvoker(delegate()
                {
                    this.recordFileSettingButton.Visible = false;
                }));
                this.recordStateLabel.Invoke(new MethodInvoker(delegate()
                {
                    this.recordStateLabel.Visible = false;
                }));

                this.recordStateProgressbar.Invoke(new MethodInvoker(delegate()
                {
                    this.recordStateProgressbar.Visible = false;
                }));

                this.recordTime.Invoke(new MethodInvoker(delegate()
                {
                    this.recordTime.Visible = false;
                }));
            }
        }
Exemplo n.º 2
0
        private void PatrolModeSwitch_OnValueChange(object sender, EventArgs e)
        {
            if (this.Root == null)
            {
                return;
            }

            this.PatrolFileName = null;

            this.patrolFileTextBox.Invoke(new MethodInvoker(delegate()
            {
                this.patrolFileTextBox.BackColor = this.patrolModeSwitch.Value ? Color.White : Color.Gainsboro;
                this.patrolFileTextBox.Text      = this.patrolModeSwitch.Value ? "순찰파일을 선택해주세요." : "순찰 모드를 On 해주세요.";
            }));

            this.patrolFileBrowseButton.Invoke(new MethodInvoker(delegate()
            {
                this.patrolFileBrowseButton.IdleForecolor = this.patrolModeSwitch.Value ? System.Drawing.Color.Salmon : SystemColors.ControlDarkDark;
                this.patrolFileBrowseButton.IdleLineColor = this.patrolModeSwitch.Value ? System.Drawing.Color.Salmon : SystemColors.ControlDarkDark;
            }));

            this.patrolVersionSwitch.Invoke(new MethodInvoker(delegate()
            {
                this.patrolVersionSwitch.Visible = patrolModeSwitch.Value;
                this.patrolVersionLabel.Visible  = patrolModeSwitch.Value;
            }));


            if (this.patrolModeSwitch.Value)
            {
                var message     = "녹화모드와 같이 사용할 수 없습니다.";
                var messageform = new Fire_Detector.Dialog.MessageDialog(message, SystemColors.Control);
                messageform.ShowDialog(this.Root);
            }
            else
            {
                this.Root.Patrol.Stop();
                this.ElapsedTime = 0;
            }

            this.synchronizeUI();
        }