示例#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;
                }));
            }
        }
示例#2
0
        private void confirmButton_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.Points == null || this.Points.Length == 0)
                {
                    throw new Exception("영억을 설정해야 합니다.");
                }

                this.DialogResult = DialogResult.OK;
                this.Close();
            }
            catch (Exception exc)
            {
                var dialog = new MessageDialog(exc.Message);
                dialog.ShowDialog(this);
            }
        }
示例#3
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();
        }
示例#4
0
        private void confirmButton_Click(object sender, EventArgs e)
        {
            try
            {
                var selectedItems = this.patrolFileListView.SelectedItems;
                if (selectedItems.Count == 0)
                {
                    throw new Exception("순찰 파일을 선택하세요");
                }

                this.FileName     = selectedItems[0].FileName;
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
            catch (Exception exc)
            {
                var dialog = new MessageDialog(exc.Message);
                dialog.ShowDialog(this);
            }
        }