Beispiel #1
0
        private void hi_OnHotkeyChanged(object sender, EventArgs e)
        {
            foreach (Control c in tabPage3.Controls)
            {
                if (c.GetType() != typeof(HotkeyInputBox))
                {
                    continue;
                }
                HotkeyInputBox hi = (HotkeyInputBox)c;

                hi.ExternalConflictFlag = false;
                foreach (Control c2 in tabPage3.Controls)
                {
                    if (c2.GetType() != typeof(HotkeyInputBox))
                    {
                        continue;
                    }
                    if (c == c2)
                    {
                        continue;
                    }
                    HotkeyInputBox hi2 = (HotkeyInputBox)c2;

                    if (hi.Hotkey.ConflictWith(hi2.Hotkey))
                    {
                        hi.ExternalConflictFlag = true;
                        break;
                    }
                }
            }
        }
Beispiel #2
0
        private void FormOptions_Load(object sender, EventArgs e)
        {
            Root.UnsetHotkey();

            if (Root.EraserEnabled)
            {
                cbEraserEnabled.Checked = true;
            }
            if (Root.PointerEnabled)
            {
                cbPointerEnabled.Checked = true;
            }
            if (Root.SnapEnabled)
            {
                cbSnapEnabled.Checked = true;
            }
            if (Root.UndoEnabled)
            {
                cbUndoEnabled.Checked = true;
            }
            if (Root.ClearEnabled)
            {
                cbClearEnabled.Checked = true;
            }
            WidthAtPenSelCb.Checked = Root.WidthAtPenSel;
            cbWidthEnabled.Checked  = Root.PenWidthEnabled;
            if (Root.PanEnabled)
            {
                cbPanEnabled.Checked = true;
            }
            if (Root.InkVisibleEnabled)
            {
                cbInkVisibleEnabled.Checked = true;
            }
            if (Root.ToolsEnabled)
            {
                cbToolsEnabled.Checked = true;
            }

            if (Root.WhiteTrayIcon)
            {
                cbWhiteIcon.Checked = true;
            }
            if (Root.AllowDraggingToolbar)
            {
                cbAllowDragging.Checked = true;
            }
            if (Root.AllowHotkeyInPointerMode)
            {
                cbAllowHotkeyInPointer.Checked = true;
            }

            ToolBarHeight.Text = string.Format("{0:F1}", Root.ToolbarHeight * 100);
            //MoveToolBarCb.Checked = Root.AllowDraggingToolbar;

            comboCanvasCursor.SelectedIndex = Root.CanvasCursor;

            BoardAtOpenCombo.SelectedIndex = Root.BoardAtOpening;
            BoardCustColorPnl.BackColor    = Color.FromArgb(Root.Gray1[0], Root.Gray1[1], Root.Gray1[2], Root.Gray1[3]);


            tbSnapPath.Text             = Root.SnapshotBasePath;
            this.OpenIntoSnapCb.Checked = Root.OpenIntoSnapMode;
            ShowFloatingWinCb.Checked   = Root.FormOpacity > 0;
            ArrHdAperture.Text          = (Root.ArrowAngle * 180.0 / Math.PI).ToString("#0", CultureInfo.InvariantCulture);
            ArrHdLength.Text            = (Root.ArrowLen / System.Windows.SystemParameters.PrimaryScreenWidth * 100.0).ToString("#0.0000", CultureInfo.InvariantCulture);
            Magnet_TB.Text        = (Root.MagneticRadius / System.Windows.SystemParameters.PrimaryScreenWidth * 100.0).ToString("#0.0000", CultureInfo.InvariantCulture);
            DefArrStartCb.Checked = Root.DefaultArrow_start;
            lbNote.ForeColor      = Color.Black;

            lbcbPens       = new Label();
            lbcbPens.Left  = (int)(this.Width / 500.0 * 25);
            lbcbPens.Width = 100;
            lbcbPens.Top   = 15;

            tabPage2.Controls.Add(lbcbPens);
            lbpboxPens       = new Label();
            lbpboxPens.Left  = (int)(this.Width / 500.0 * 140);
            lbpboxPens.Width = 60;
            lbpboxPens.Top   = 15;

            tabPage2.Controls.Add(lbpboxPens);
            lbcomboPensAlpha       = new Label();
            lbcomboPensAlpha.Left  = (int)(this.Width / 500.0 * 200);
            lbcomboPensAlpha.Width = 100;
            lbcomboPensAlpha.Top   = 15;

            tabPage2.Controls.Add(lbcomboPensAlpha);
            lbcomboPensWidth       = new Label();
            lbcomboPensWidth.Left  = (int)(this.Width / 500.0 * 325);
            lbcomboPensWidth.Width = 100;
            lbcomboPensWidth.Top   = 15;

            tabPage2.Controls.Add(lbcomboPensWidth);

            for (int p = 0; p < Root.MaxPenCount; p++)
            {
                int top = p * (int)(this.Height * 0.075) + (int)(this.Height * 0.09);
                lbPens[p]       = new Label();
                lbPens[p].Left  = (int)(this.Width / 500.0 * 60);
                lbPens[p].Width = 80;
                lbPens[p].Top   = top;

                cbPens[p]                 = new CheckBox();
                cbPens[p].Left            = (int)(this.Width / 500.0 * 30);
                cbPens[p].Width           = 25;
                cbPens[p].Top             = top - 5;
                cbPens[p].Text            = "";
                cbPens[p].Checked         = Root.PenEnabled[p];
                cbPens[p].CheckedChanged += cbPens_CheckedChanged;

                pboxPens[p]           = new PictureBox();
                pboxPens[p].Left      = (int)(this.Width / 500.0 * 145);
                pboxPens[p].Top       = top;
                pboxPens[p].Width     = 15;
                pboxPens[p].Height    = 15;
                pboxPens[p].BackColor = Root.PenAttr[p].Color;
                pboxPens[p].Click    += pboxPens_Click;

                comboPensAlpha[p] = new ComboBox();

                comboPensAlpha[p].Left         = (int)(this.Width / 500.0 * 205);
                comboPensAlpha[p].Top          = top - 2;
                comboPensAlpha[p].Width        = 100;
                comboPensAlpha[p].Text         = (255 - Root.PenAttr[p].Transparency).ToString();
                comboPensAlpha[p].TextChanged += comboPensAlpha_TextChanged;

                comboPensWidth[p] = new ComboBox();

                comboPensWidth[p].Left         = (int)(this.Width / 500.0 * 330);
                comboPensWidth[p].Top          = top - 2;
                comboPensWidth[p].Width        = 100;
                comboPensWidth[p].Text         = ((int)Root.PenAttr[p].Width).ToString();
                comboPensWidth[p].TextChanged += comboPensWidth_TextChanged;

                tabPage2.Controls.Add(lbPens[p]);
                tabPage2.Controls.Add(cbPens[p]);
                tabPage2.Controls.Add(pboxPens[p]);
                tabPage2.Controls.Add(comboPensAlpha[p]);
                tabPage2.Controls.Add(comboPensWidth[p]);
            }

            cbAllowHotkeyInPointer.Top = (int)(this.Height * 0.18);

            for (int p = 0; p < Root.MaxPenCount; p++)
            {
                int top = p * (int)(this.Height * 0.055) + (int)(this.Height * 0.24);
                lbHotkeyPens[p]       = new Label();
                lbHotkeyPens[p].Left  = 20;
                lbHotkeyPens[p].Width = 80;
                lbHotkeyPens[p].Top   = top;

                hiPens[p]                  = new HotkeyInputBox();
                hiPens[p].Hotkey           = Root.Hotkey_Pens[p];
                hiPens[p].Left             = 100;
                hiPens[p].Width            = 120;
                hiPens[p].Top              = top;
                hiPens[p].OnHotkeyChanged += hi_OnHotkeyChanged;

                tabPage3.Controls.Add(lbHotkeyPens[p]);
                tabPage3.Controls.Add(hiPens[p]);
            }

            AltAsOneCommandCb.Checked = Root.AltAsOneCommand;

            hiGlobal.Hotkey     = Root.Hotkey_Global;
            hiEraser.Hotkey     = Root.Hotkey_Eraser;
            hiPan.Hotkey        = Root.Hotkey_Pan;
            hiInkVisible.Hotkey = Root.Hotkey_InkVisible;
            hiPointer.Hotkey    = Root.Hotkey_Pointer;
            hiSnapshot.Hotkey   = Root.Hotkey_Snap;
            hiUndo.Hotkey       = Root.Hotkey_Undo;
            hiRedo.Hotkey       = Root.Hotkey_Redo;
            hiClear.Hotkey      = Root.Hotkey_Clear;
            hiVideo.Hotkey      = Root.Hotkey_Video;
            hiDockUndock.Hotkey = Root.Hotkey_DockUndock;
            hiClose.Hotkey      = Root.Hotkey_Close;

            hiToolHand.Hotkey   = Root.Hotkey_Hand;
            hiToolLine.Hotkey   = Root.Hotkey_Line;
            hiToolRect.Hotkey   = Root.Hotkey_Rect;
            hiToolOval.Hotkey   = Root.Hotkey_Oval;
            hiToolArrow.Hotkey  = Root.Hotkey_Arrow;
            hiToolNumb.Hotkey   = Root.Hotkey_Numb;
            HiToolText.Hotkey   = Root.Hotkey_Text;
            hiToolEdit.Hotkey   = Root.Hotkey_Edit;
            hiToolMagnet.Hotkey = Root.Hotkey_Magnet;

            WsUrlTxt.Text     = Root.ObsUrl;
            WsPwdTxt.Text     = Root.ObsPwd;
            FfmpegCmdTxt.Text = Root.FFMpegCmd;
            switch (Root.VideoRecordMode)
            {
            case VideoRecordMode.NoVideo:
                OptNoVideo.Checked = true;
                break;

            case VideoRecordMode.OBSRec:
                OptObsRecord.Checked = true;
                break;

            case VideoRecordMode.OBSBcst:
                OptObsBcast.Checked = true;
                break;

            case VideoRecordMode.FfmpegRec:
                OptFfmpeg.Checked = true;
                break;

            default:
                throw new System.Exception(String.Format("unk video recording mode", Root.VideoRecordMode));
            }

            FormOptions_LocalReload();
        }
Beispiel #3
0
        private void FormOptions_Load(object sender, EventArgs e)
        {
            Root.UnsetHotkey();

            if (Root.EraserEnabled)
            {
                cbEraserEnabled.Checked = true;
            }
            if (Root.PointerEnabled)
            {
                cbPointerEnabled.Checked = true;
            }
            if (Root.SnapEnabled)
            {
                cbSnapEnabled.Checked = true;
            }
            if (Root.UndoEnabled)
            {
                cbUndoEnabled.Checked = true;
            }
            if (Root.ClearEnabled)
            {
                cbClearEnabled.Checked = true;
            }
            if (Root.PenWidthEnabled)
            {
                cbWidthEnabled.Checked = true;
            }
            if (Root.PanEnabled)
            {
                cbPanEnabled.Checked = true;
            }
            if (Root.InkVisibleEnabled)
            {
                cbInkVisibleEnabled.Checked = true;
            }

            if (Root.WhiteTrayIcon)
            {
                cbWhiteIcon.Checked = true;
            }
            if (Root.AllowDraggingToolbar)
            {
                cbAllowDragging.Checked = true;
            }
            if (Root.AllowHotkeyInPointerMode)
            {
                cbAllowHotkeyInPointer.Checked = true;
            }

            comboCanvasCursor.SelectedIndex = Root.CanvasCursor;

            tbSnapPath.Text = Root.SnapshotBasePath;

            lbNote.ForeColor = Color.Black;

            lbcbPens       = new Label();
            lbcbPens.Left  = 25;
            lbcbPens.Width = 100;
            lbcbPens.Top   = 15;

            tabPage2.Controls.Add(lbcbPens);
            lbpboxPens       = new Label();
            lbpboxPens.Left  = 140;
            lbpboxPens.Width = 60;
            lbpboxPens.Top   = 15;

            tabPage2.Controls.Add(lbpboxPens);
            lbcomboPensAlpha       = new Label();
            lbcomboPensAlpha.Left  = 200;
            lbcomboPensAlpha.Width = 100;
            lbcomboPensAlpha.Top   = 15;

            tabPage2.Controls.Add(lbcomboPensAlpha);
            lbcomboPensWidth       = new Label();
            lbcomboPensWidth.Left  = 325;
            lbcomboPensWidth.Width = 100;
            lbcomboPensWidth.Top   = 15;

            tabPage2.Controls.Add(lbcomboPensWidth);

            for (int p = 0; p < Root.MaxPenCount; p++)
            {
                int top = p * 32 + 40;
                lbPens[p]       = new Label();
                lbPens[p].Left  = 60;
                lbPens[p].Width = 80;
                lbPens[p].Top   = top;

                cbPens[p]                 = new CheckBox();
                cbPens[p].Left            = 30;
                cbPens[p].Width           = 15;
                cbPens[p].Top             = top - 5;
                cbPens[p].Text            = "";
                cbPens[p].Checked         = Root.PenEnabled[p];
                cbPens[p].CheckedChanged += cbPens_CheckedChanged;

                pboxPens[p]           = new PictureBox();
                pboxPens[p].Left      = 145;
                pboxPens[p].Top       = top;
                pboxPens[p].Width     = 15;
                pboxPens[p].Height    = 15;
                pboxPens[p].BackColor = Root.PenAttr[p].Color;
                pboxPens[p].Click    += pboxPens_Click;

                comboPensAlpha[p] = new ComboBox();

                comboPensAlpha[p].Left         = 205;
                comboPensAlpha[p].Top          = top - 2;
                comboPensAlpha[p].Width        = 100;
                comboPensAlpha[p].Text         = (255 - Root.PenAttr[p].Transparency).ToString();
                comboPensAlpha[p].TextChanged += comboPensAlpha_TextChanged;

                comboPensWidth[p] = new ComboBox();

                comboPensWidth[p].Left         = 330;
                comboPensWidth[p].Top          = top - 2;
                comboPensWidth[p].Width        = 100;
                comboPensWidth[p].Text         = ((int)Root.PenAttr[p].Width).ToString();
                comboPensWidth[p].TextChanged += comboPensWidth_TextChanged;

                tabPage2.Controls.Add(lbPens[p]);
                tabPage2.Controls.Add(cbPens[p]);
                tabPage2.Controls.Add(pboxPens[p]);
                tabPage2.Controls.Add(comboPensAlpha[p]);
                tabPage2.Controls.Add(comboPensWidth[p]);
            }

            for (int p = 0; p < Root.MaxPenCount; p++)
            {
                int top = p * 25 + 120;
                lbHotkeyPens[p]       = new Label();
                lbHotkeyPens[p].Left  = 20;
                lbHotkeyPens[p].Width = 80;
                lbHotkeyPens[p].Top   = top;

                hiPens[p]                  = new HotkeyInputBox();
                hiPens[p].Hotkey           = Root.Hotkey_Pens[p];
                hiPens[p].Left             = 100;
                hiPens[p].Width            = 120;
                hiPens[p].Top              = top;
                hiPens[p].OnHotkeyChanged += hi_OnHotkeyChanged;

                tabPage3.Controls.Add(lbHotkeyPens[p]);
                tabPage3.Controls.Add(hiPens[p]);
            }

            hiGlobal.Hotkey     = Root.Hotkey_Global;
            hiEraser.Hotkey     = Root.Hotkey_Eraser;
            hiPan.Hotkey        = Root.Hotkey_Pan;
            hiInkVisible.Hotkey = Root.Hotkey_InkVisible;
            hiPointer.Hotkey    = Root.Hotkey_Pointer;
            hiSnapshot.Hotkey   = Root.Hotkey_Snap;
            hiUndo.Hotkey       = Root.Hotkey_Undo;
            hiRedo.Hotkey       = Root.Hotkey_Redo;
            hiClear.Hotkey      = Root.Hotkey_Clear;

            FormOptions_LocalReload();
        }
Beispiel #4
0
        private void FormOptions_Load(object sender, EventArgs e)
        {
            //Root.UnsetHotkey();
            ToolbarDwg.BackColor = Color.FromArgb(Root.ToolbarBGColor[0], Root.ToolbarBGColor[1], Root.ToolbarBGColor[2], Root.ToolbarBGColor[3]);
            ToolbarOrientationBtn.BackgroundImage = ToolBarOrientationIcons[Root.ToolbarOrientation];
            Clip1Btn.BackColor       = ToolbarDwg.BackColor;
            Clip1Btn.BackgroundImage = FormCollection.getImgFromDiskOrRes(Root.ImageStamp1);
            Clip2Btn.BackColor       = ToolbarDwg.BackColor;
            Clip2Btn.BackgroundImage = FormCollection.getImgFromDiskOrRes(Root.ImageStamp2);
            Clip3Btn.BackColor       = ToolbarDwg.BackColor;
            Clip3Btn.BackgroundImage = FormCollection.getImgFromDiskOrRes(Root.ImageStamp3);

            if (Root.EraserEnabled)
            {
                cbEraserEnabled.Checked = true;
            }
            if (Root.PointerEnabled)
            {
                cbPointerEnabled.Checked = true;
            }
            if (Root.SnapEnabled)
            {
                cbSnapEnabled.Checked = true;
            }
            if (Root.UndoEnabled)
            {
                cbUndoEnabled.Checked = true;
            }
            if (Root.ClearEnabled)
            {
                cbClearEnabled.Checked = true;
            }
            WidthAtPenSelCb.Checked = Root.WidthAtPenSel;
            cbWidthEnabled.Checked  = Root.PenWidthEnabled;
            if (Root.PanEnabled)
            {
                cbPanEnabled.Checked = true;
            }
            if (Root.InkVisibleEnabled)
            {
                cbInkVisibleEnabled.Checked = true;
            }
            if (Root.ToolsEnabled)
            {
                cbToolsEnabled.Checked = true;
            }

            if (Root.WhiteTrayIcon)
            {
                cbWhiteIcon.Checked = true;
            }
            if (Root.AllowDraggingToolbar)
            {
                cbAllowDragging.Checked = true;
            }
            if (Root.AllowHotkeyInPointerMode)
            {
                cbAllowHotkeyInPointer.Checked = true;
            }
            cbLoadSaveEnabled.Checked = Root.LoadSaveEnabled;

            AltTabActivateCb.Checked = Root.AltTabPointer;

            ToolBarHeight.Text = string.Format("{0:F1}", Root.ToolbarHeight * 100);
            //MoveToolBarCb.Checked = Root.AllowDraggingToolbar;

            comboCanvasCursor.SelectedIndex = Root.CanvasCursor;

            BoardAtOpenCombo.SelectedIndex = Root.BoardAtOpening;
            BoardCustColorPnl.BackColor    = Color.FromArgb(Root.Gray1[0], Root.Gray1[1], Root.Gray1[2], Root.Gray1[3]);


            tbSnapPath.Text             = Root.SnapshotBasePath;
            this.OpenIntoSnapCb.Checked = Root.OpenIntoSnapMode;
            ShowFloatingWinCb.Checked   = Root.FormOpacity > 0;
            ArrHdAperture.Text          = (Root.ArrowAngle * 180.0 / Math.PI).ToString("#0", CultureInfo.InvariantCulture);
            ArrHdLength.Text            = (Root.ArrowLen / System.Windows.SystemParameters.PrimaryScreenWidth * 100.0).ToString("#0.0000", CultureInfo.InvariantCulture);
            Magnet_TB.Text        = (Root.MagneticRadius / System.Windows.SystemParameters.PrimaryScreenWidth * 100.0).ToString("#0.0000", CultureInfo.InvariantCulture);
            DefArrStartCb.Checked = Root.DefaultArrow_start;

            ZoomEnabledCb.SelectedIndex = Root.ZoomEnabled;
            ZoomWidthEd.Text            = Root.ZoomWidth.ToString();
            ZoomHeightEd.Text           = Root.ZoomHeight.ToString();
            ZoomScaleEd.Text            = Root.ZoomScale.ToString();
            ZoomContinousCb.Checked     = Root.ZoomContinous;

            lbNote.ForeColor = Color.Black;

            /*lbcbPens = new Label();
             *          lbcbPens.Left = (int)(this.Width / 500.0 * 25);
             *          lbcbPens.Width = 100;
             *          lbcbPens.Top = 15;
             *          tabPage2.Controls.Add(lbcbPens);
             *
             * lbpboxPens = new Label();
             *          lbpboxPens.Left = (int)(this.Width / 500.0 * 125);
             *          lbpboxPens.Width = 60;
             *          lbpboxPens.Top = 15;
             *          tabPage2.Controls.Add(lbpboxPens);
             *
             *          lbcomboPensAlpha = new Label();
             *          lbcomboPensAlpha.Left = (int)(this.Width / 500.0 * 185);
             *          lbcomboPensAlpha.Width = 100;
             *          lbcomboPensAlpha.Top = 15;
             *          tabPage2.Controls.Add(lbcomboPensAlpha);
             *
             *          lbcomboPensWidth = new Label();
             *          lbcomboPensWidth.Left = (int)(this.Width / 500.0 * 275);
             *          lbcomboPensWidth.Width = 100;
             *          lbcomboPensWidth.Top = 15;
             *          tabPage2.Controls.Add(lbcomboPensWidth);
             *
             * lbcomboPensFading = new Label();
             * lbcomboPensFading.Left = (int)(this.Width / 500.0 * 375);
             * lbcomboPensFading.Width = 100;
             * lbcomboPensFading.Top = 15;
             * lbcomboPensFading.AutoSize = true;
             * tabPage2.Controls.Add(lbcomboPensFading);
             */

            lbPens[0] = lbPens0; lbPens[1] = lbPens1; lbPens[2] = lbPens2; lbPens[3] = lbPens3; lbPens[4] = lbPens4;
            lbPens[5] = lbPens5; lbPens[6] = lbPens6; lbPens[7] = lbPens7; lbPens[8] = lbPens8; lbPens[9] = lbPens9;

            for (int p = 0; p < Root.MaxPenCount; p++)
            {
                //int top = p * (int)(this.Height * 0.075) + (int)(this.Height * 0.09);
                int top = lbPens0.Top + p * (lbPens1.Top - lbPens0.Top);

                /*lbPens[p] = new Label();
                 *              lbPens[p].Left = (int)(this.Width / 500.0 * 60);
                 *              lbPens[p].Width = 80;
                 *              lbPens[p].Top = top;*/

                cbPens[p]                 = new CheckBox();
                cbPens[p].Left            = (int)(this.Width / 500.0 * 30);
                cbPens[p].Width           = 25;
                cbPens[p].Top             = top - 5;
                cbPens[p].Text            = "";
                cbPens[p].Checked         = Root.PenEnabled[p];
                cbPens[p].CheckedChanged += cbPens_CheckedChanged;

                pboxPens[p]           = new PictureBox();
                pboxPens[p].Left      = (int)(this.Width / 500.0 * 130);
                pboxPens[p].Top       = top;
                pboxPens[p].Width     = 15;
                pboxPens[p].Height    = 15;
                pboxPens[p].BackColor = Root.PenAttr[p].Color;
                pboxPens[p].Click    += pboxPens_Click;

                comboPensAlpha[p] = new ComboBox();

                comboPensAlpha[p].Left         = (int)(this.Width / 500.0 * 180);
                comboPensAlpha[p].Top          = top - 2;
                comboPensAlpha[p].Width        = 80;
                comboPensAlpha[p].Text         = (255 - Root.PenAttr[p].Transparency).ToString();
                comboPensAlpha[p].TextChanged += comboPensAlpha_TextChanged;

                comboPensWidth[p] = new ComboBox();

                comboPensWidth[p].Left         = (int)(this.Width / 500.0 * 270);
                comboPensWidth[p].Top          = top - 2;
                comboPensWidth[p].Width        = 80;
                comboPensWidth[p].Text         = ((int)Root.PenAttr[p].Width).ToString();
                comboPensWidth[p].TextChanged += comboPensWidth_TextChanged;

                comboPensFading[p] = new CheckBox();

                comboPensFading[p].Left            = (int)(this.Width / 500.0 * 380);
                comboPensFading[p].Top             = top - 2;
                comboPensFading[p].Width           = 20;
                comboPensFading[p].Checked         = Root.PenAttr[p].ExtendedProperties.Contains(Root.FADING_PEN);
                comboPensFading[p].CheckedChanged += comboPensFading_Changed;

                tabPage2.Controls.Add(lbPens[p]);
                tabPage2.Controls.Add(cbPens[p]);
                tabPage2.Controls.Add(pboxPens[p]);
                tabPage2.Controls.Add(comboPensAlpha[p]);
                tabPage2.Controls.Add(comboPensWidth[p]);
                tabPage2.Controls.Add(comboPensFading[p]);
            }

            FadingTimeEd.Text      = Root.TimeBeforeFading.ToString();
            InverseWheelCb.Checked = Root.InverseMousewheel;

            cbAllowHotkeyInPointer.Top = (int)(this.Height * 0.18);

            for (int p = 0; p < Root.MaxPenCount; p++)
            {
                int top = p * (int)(this.Height * 0.055) + (int)(this.Height * 0.24);
                lbHotkeyPens[p]       = new Label();
                lbHotkeyPens[p].Left  = 20;
                lbHotkeyPens[p].Width = 80;
                lbHotkeyPens[p].Top   = top;

                hiPens[p]                  = new HotkeyInputBox();
                hiPens[p].Hotkey           = Root.Hotkey_Pens[p];
                hiPens[p].Left             = 100;
                hiPens[p].Width            = 120;
                hiPens[p].Top              = top;
                hiPens[p].OnHotkeyChanged += hi_OnHotkeyChanged;

                tabPage3.Controls.Add(lbHotkeyPens[p]);
                tabPage3.Controls.Add(hiPens[p]);
            }

            AltAsOneCommandCb.Checked = Root.AltAsOneCommand;

            SnapInPointerHoldCb.SelectedIndex  = (int)(Root.SnapInPointerHoldKey);
            SnapInPointerTwiceCb.SelectedIndex = (int)(Root.SnapInPointerPressTwiceKey);

            hiGlobal.Hotkey     = Root.Hotkey_Global;
            hiEraser.Hotkey     = Root.Hotkey_Eraser;
            hiPan.Hotkey        = Root.Hotkey_Pan;
            hiInkVisible.Hotkey = Root.Hotkey_InkVisible;
            hiPointer.Hotkey    = Root.Hotkey_Pointer;
            hiSnapshot.Hotkey   = Root.Hotkey_Snap;
            hiUndo.Hotkey       = Root.Hotkey_Undo;
            hiRedo.Hotkey       = Root.Hotkey_Redo;
            hiClear.Hotkey      = Root.Hotkey_Clear;
            hiVideo.Hotkey      = Root.Hotkey_Video;
            hiDockUndock.Hotkey = Root.Hotkey_DockUndock;
            hiClose.Hotkey      = Root.Hotkey_Close;

            hiToolHand.Hotkey     = Root.Hotkey_Hand;
            hiToolLine.Hotkey     = Root.Hotkey_Line;
            hiToolRect.Hotkey     = Root.Hotkey_Rect;
            hiToolOval.Hotkey     = Root.Hotkey_Oval;
            hiToolArrow.Hotkey    = Root.Hotkey_Arrow;
            hiToolNumb.Hotkey     = Root.Hotkey_Numb;
            HiToolText.Hotkey     = Root.Hotkey_Text;
            hiToolEdit.Hotkey     = Root.Hotkey_Edit;
            hiToolMagnet.Hotkey   = Root.Hotkey_Magnet;
            hiToolClipArt.Hotkey  = Root.Hotkey_ClipArt;
            hiToolClipArt1.Hotkey = Root.Hotkey_ClipArt1;
            hiToolClipArt2.Hotkey = Root.Hotkey_ClipArt2;
            hiToolClipArt3.Hotkey = Root.Hotkey_ClipArt3;
            hiZoom.Hotkey         = Root.Hotkey_Zoom;

            WsUrlTxt.Text     = Root.ObsUrl;
            WsPwdTxt.Text     = Root.ObsPwd;
            FfmpegCmdTxt.Text = Root.FFMpegCmd;
            switch (Root.VideoRecordMode)
            {
            case VideoRecordMode.NoVideo:
                OptNoVideo.Checked = true;
                break;

            case VideoRecordMode.OBSRec:
                OptObsRecord.Checked = true;
                break;

            case VideoRecordMode.OBSBcst:
                OptObsBcast.Checked = true;
                break;

            case VideoRecordMode.FfmpegRec:
                OptFfmpeg.Checked = true;
                break;

            default:
                throw new System.Exception(String.Format("unk video recording mode", Root.VideoRecordMode));
            }

            FormOptions_LocalReload();
        }