Example #1
0
        private void HuionWorkAreaPictrueView1_Callback(object sender, EventArgs e)
        {
            HuionWorkAreaPictureView workAreaPictureView = (HuionWorkAreaPictureView)sender;

            workAreaPictureView.Location = new Point((this.Width - workAreaPictureView.Width) / 2,
                                                     workAreaPictureView.Location.Y);
            this.huionWorkAreaPictureRect1.Location         = new Point(0, 0);
            this.huionWorkAreaPictureRect1.Width            = workAreaPictureView.Width;
            this.huionWorkAreaPictureRect1.Height           = workAreaPictureView.Height;
            this.huionWorkAreaPictureRect1.ScreenRect       = workAreaPictureView.ScreenshotRect;
            this.huionWorkAreaPictureRect1.DeviceRect       = workAreaPictureView.PenWorkRect;
            this.huionWorkAreaPictureRect1.DeviceRectRotate = ((PictureViewEventArgs)e).Rotate;
        }
Example #2
0
 private void InitializeComponent()
 {
     this.labelSelectScreen    = new Label();
     this.comboBoxSelectScreen = new ComboBox();
     this.buttonWhileBoard     = new Button();
     this.buttonScreenRatio    = new Button();
     this.labelTop             = new Label();
     this.labelBottom          = new Label();
     this.labelLeft            = new Label();
     this.labelRight           = new Label();
     this.textBoxTop           = new TextBox();
     this.textBoxBottom        = new TextBox();
     this.textBoxLeft          = new TextBox();
     this.textBoxRight         = new TextBox();
     this.buttonCalibration    = new Button();
     this.groupBoxRotate       = new GroupBox();
     this.rotateThreeNinety    = new RadioButton();
     this.rotateTwoNinety      = new RadioButton();
     this.rotateNinety         = new RadioButton();
     this.rotateZero           = new RadioButton();
     this.label1                    = new Label();
     this.buttonWhileDisplay        = new Button();
     this.groupBoxCustomArea        = new GroupBox();
     this.btnIdentify               = new Button();
     this.huionWorkAreaPictureRect1 = new HuionWorkAreaPictureRect();
     this.huionWorkAreaPictrueView1 = new HuionWorkAreaPictureView();
     this.groupBoxRotate.SuspendLayout();
     this.groupBoxCustomArea.SuspendLayout();
     ((ISupportInitialize)this.huionWorkAreaPictureRect1).BeginInit();
     ((ISupportInitialize)this.huionWorkAreaPictrueView1).BeginInit();
     this.SuspendLayout();
     this.labelSelectScreen.Font                         = new Font("微软雅黑", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte)134);
     this.labelSelectScreen.Location                     = new Point(3, 7);
     this.labelSelectScreen.Name                         = "labelSelectScreen";
     this.labelSelectScreen.Size                         = new Size(179, 20);
     this.labelSelectScreen.TabIndex                     = 0;
     this.labelSelectScreen.Text                         = "Select Current Display";
     this.labelSelectScreen.TextAlign                    = ContentAlignment.MiddleRight;
     this.comboBoxSelectScreen.DropDownStyle             = ComboBoxStyle.DropDownList;
     this.comboBoxSelectScreen.FormattingEnabled         = true;
     this.comboBoxSelectScreen.Location                  = new Point(183, 5);
     this.comboBoxSelectScreen.Margin                    = new Padding(3, 4, 3, 4);
     this.comboBoxSelectScreen.Name                      = "comboBoxSelectScreen";
     this.comboBoxSelectScreen.Size                      = new Size(385, 25);
     this.comboBoxSelectScreen.TabIndex                  = 1;
     this.comboBoxSelectScreen.SelectionChangeCommitted +=
         new EventHandler(this.comboBoxSelectScreen_SelectIndexCommitted);
     this.buttonWhileBoard.Anchor       = AnchorStyles.Bottom | AnchorStyles.Left;
     this.buttonWhileBoard.AutoEllipsis = true;
     this.buttonWhileBoard.BackColor    = Color.Transparent;
     this.buttonWhileBoard.FlatAppearance.BorderColor = Color.DarkGray;
     this.buttonWhileBoard.FlatStyle = FlatStyle.Flat;
     this.buttonWhileBoard.Location  = new Point(4, 405);
     this.buttonWhileBoard.Margin    = new Padding(3, 4, 3, 4);
     this.buttonWhileBoard.Name      = "buttonWhileBoard";
     this.buttonWhileBoard.Size      = new Size(181, 25);
     this.buttonWhileBoard.TabIndex  = 3;
     this.buttonWhileBoard.Text      = "全局区";
     this.buttonWhileBoard.UseVisualStyleBackColor = false;
     this.buttonWhileBoard.Click        += new EventHandler(this.buttonWhileBoard_Click);
     this.buttonScreenRatio.Anchor       = AnchorStyles.Bottom | AnchorStyles.Left;
     this.buttonScreenRatio.AutoEllipsis = true;
     this.buttonScreenRatio.BackColor    = Color.Transparent;
     this.buttonScreenRatio.FlatAppearance.BorderColor = Color.DarkGray;
     this.buttonScreenRatio.FlatStyle = FlatStyle.Flat;
     this.buttonScreenRatio.Location  = new Point(4, 438);
     this.buttonScreenRatio.Margin    = new Padding(3, 4, 3, 4);
     this.buttonScreenRatio.Name      = "buttonScreenRatio";
     this.buttonScreenRatio.Size      = new Size(181, 25);
     this.buttonScreenRatio.TabIndex  = 4;
     this.buttonScreenRatio.Text      = "与屏幕等比例";
     this.buttonScreenRatio.UseVisualStyleBackColor = false;
     this.buttonScreenRatio.Click       += new EventHandler(this.buttonScreenRatio_Click);
     this.labelTop.Anchor                = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
     this.labelTop.AutoEllipsis          = true;
     this.labelTop.FlatStyle             = FlatStyle.Flat;
     this.labelTop.Location              = new Point(2, 55);
     this.labelTop.Name                  = "labelTop";
     this.labelTop.Size                  = new Size(55, 23);
     this.labelTop.TabIndex              = 7;
     this.labelTop.Text                  = "上";
     this.labelTop.TextAlign             = ContentAlignment.MiddleRight;
     this.labelBottom.Anchor             = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
     this.labelBottom.AutoEllipsis       = true;
     this.labelBottom.FlatStyle          = FlatStyle.Flat;
     this.labelBottom.Location           = new Point(103, 55);
     this.labelBottom.Name               = "labelBottom";
     this.labelBottom.Size               = new Size(55, 23);
     this.labelBottom.TabIndex           = 8;
     this.labelBottom.Text               = "下";
     this.labelBottom.TextAlign          = ContentAlignment.MiddleRight;
     this.labelLeft.Anchor               = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
     this.labelLeft.AutoEllipsis         = true;
     this.labelLeft.FlatStyle            = FlatStyle.Flat;
     this.labelLeft.Location             = new Point(2, 26);
     this.labelLeft.Name                 = "labelLeft";
     this.labelLeft.Size                 = new Size(55, 23);
     this.labelLeft.TabIndex             = 9;
     this.labelLeft.Text                 = "左";
     this.labelLeft.TextAlign            = ContentAlignment.MiddleRight;
     this.labelRight.Anchor              = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
     this.labelRight.AutoEllipsis        = true;
     this.labelRight.FlatStyle           = FlatStyle.Flat;
     this.labelRight.Location            = new Point(103, 26);
     this.labelRight.Name                = "labelRight";
     this.labelRight.Size                = new Size(55, 23);
     this.labelRight.TabIndex            = 10;
     this.labelRight.Text                = "右";
     this.labelRight.TextAlign           = ContentAlignment.MiddleRight;
     this.textBoxTop.Location            = new Point(59, 55);
     this.textBoxTop.Margin              = new Padding(3, 4, 3, 4);
     this.textBoxTop.MaxLength           = 7;
     this.textBoxTop.Name                = "textBoxTop";
     this.textBoxTop.Size                = new Size(42, 23);
     this.textBoxTop.TabIndex            = 11;
     this.textBoxTop.TextChanged        += new EventHandler(this.customer_TextChanged);
     this.textBoxTop.KeyPress           += new KeyPressEventHandler(this.inputNumber_Key);
     this.textBoxBottom.Location         = new Point(161, 55);
     this.textBoxBottom.Margin           = new Padding(3, 4, 3, 4);
     this.textBoxBottom.Name             = "textBoxBottom";
     this.textBoxBottom.Size             = new Size(42, 23);
     this.textBoxBottom.TabIndex         = 12;
     this.textBoxBottom.TextChanged     += new EventHandler(this.customer_TextChanged);
     this.textBoxBottom.KeyPress        += new KeyPressEventHandler(this.inputNumber_Key);
     this.textBoxLeft.CharacterCasing    = CharacterCasing.Upper;
     this.textBoxLeft.Location           = new Point(59, 26);
     this.textBoxLeft.Margin             = new Padding(3, 4, 3, 4);
     this.textBoxLeft.Name               = "textBoxLeft";
     this.textBoxLeft.Size               = new Size(42, 23);
     this.textBoxLeft.TabIndex           = 9;
     this.textBoxLeft.TextChanged       += new EventHandler(this.customer_TextChanged);
     this.textBoxLeft.KeyPress          += new KeyPressEventHandler(this.inputNumber_Key);
     this.textBoxRight.Location          = new Point(161, 26);
     this.textBoxRight.Margin            = new Padding(3, 4, 3, 4);
     this.textBoxRight.Name              = "textBoxRight";
     this.textBoxRight.Size              = new Size(42, 23);
     this.textBoxRight.TabIndex          = 10;
     this.textBoxRight.TextChanged      += new EventHandler(this.customer_TextChanged);
     this.textBoxRight.KeyPress         += new KeyPressEventHandler(this.inputNumber_Key);
     this.buttonCalibration.Anchor       = AnchorStyles.Bottom;
     this.buttonCalibration.AutoEllipsis = true;
     this.buttonCalibration.BackColor    = Color.Transparent;
     this.buttonCalibration.FlatAppearance.BorderColor = Color.DarkGray;
     this.buttonCalibration.FlatStyle = FlatStyle.Flat;
     this.buttonCalibration.Location  = new Point(352, 535);
     this.buttonCalibration.Margin    = new Padding(3, 4, 3, 4);
     this.buttonCalibration.Name      = "buttonCalibration";
     this.buttonCalibration.Size      = new Size(160, 25);
     this.buttonCalibration.TabIndex  = 13;
     this.buttonCalibration.Text      = "数位屏校准";
     this.buttonCalibration.UseVisualStyleBackColor = false;
     this.buttonCalibration.Visible = false;
     this.groupBoxRotate.Anchor     = AnchorStyles.Bottom | AnchorStyles.Right;
     this.groupBoxRotate.BackColor  = SystemColors.Control;
     this.groupBoxRotate.Controls.Add((Control)this.rotateThreeNinety);
     this.groupBoxRotate.Controls.Add((Control)this.rotateTwoNinety);
     this.groupBoxRotate.Controls.Add((Control)this.rotateNinety);
     this.groupBoxRotate.Controls.Add((Control)this.rotateZero);
     this.groupBoxRotate.Location    = new Point(691, 425);
     this.groupBoxRotate.Margin      = new Padding(3, 4, 3, 4);
     this.groupBoxRotate.Name        = "groupBoxRotate";
     this.groupBoxRotate.Padding     = new Padding(3, 4, 3, 4);
     this.groupBoxRotate.Size        = new Size(143, 134);
     this.groupBoxRotate.TabIndex    = 17;
     this.groupBoxRotate.TabStop     = false;
     this.groupBoxRotate.Text        = "旋转";
     this.rotateThreeNinety.AutoSize = true;
     this.rotateThreeNinety.Location = new Point(17, 104);
     this.rotateThreeNinety.Margin   = new Padding(3, 4, 3, 4);
     this.rotateThreeNinety.Name     = "rotateThreeNinety";
     this.rotateThreeNinety.Size     = new Size(52, 21);
     this.rotateThreeNinety.TabIndex = 8;
     this.rotateThreeNinety.TabStop  = true;
     this.rotateThreeNinety.Text     = "270°";
     this.rotateThreeNinety.UseVisualStyleBackColor = true;
     this.rotateThreeNinety.CheckedChanged         += new EventHandler(this.rotateThreeNinety_CheckedChanged);
     this.rotateTwoNinety.AutoSize = true;
     this.rotateTwoNinety.Location = new Point(17, 77);
     this.rotateTwoNinety.Margin   = new Padding(3, 4, 3, 4);
     this.rotateTwoNinety.Name     = "rotateTwoNinety";
     this.rotateTwoNinety.Size     = new Size(52, 21);
     this.rotateTwoNinety.TabIndex = 7;
     this.rotateTwoNinety.TabStop  = true;
     this.rotateTwoNinety.Text     = "180°";
     this.rotateTwoNinety.UseVisualStyleBackColor = true;
     this.rotateTwoNinety.CheckedChanged         += new EventHandler(this.rotateTwoNinety_CheckedChanged);
     this.rotateNinety.AutoSize = true;
     this.rotateNinety.Location = new Point(17, 50);
     this.rotateNinety.Margin   = new Padding(3, 4, 3, 4);
     this.rotateNinety.Name     = "rotateNinety";
     this.rotateNinety.Size     = new Size(45, 21);
     this.rotateNinety.TabIndex = 6;
     this.rotateNinety.TabStop  = true;
     this.rotateNinety.Text     = "90°";
     this.rotateNinety.UseVisualStyleBackColor = true;
     this.rotateNinety.CheckedChanged         += new EventHandler(this.rotateNinety_CheckedChanged);
     this.rotateZero.AutoSize = true;
     this.rotateZero.Location = new Point(17, 23);
     this.rotateZero.Margin   = new Padding(3, 4, 3, 4);
     this.rotateZero.Name     = "rotateZero";
     this.rotateZero.Size     = new Size(38, 21);
     this.rotateZero.TabIndex = 5;
     this.rotateZero.Text     = "0°";
     this.rotateZero.UseVisualStyleBackColor = true;
     this.rotateZero.CheckedChanged         += new EventHandler(this.rotateZero_CheckedChanged);
     this.label1.AutoSize = true;
     this.label1.Location = new Point(629, 455);
     this.label1.Name     = "label1";
     this.label1.Size     = new Size(0, 17);
     this.label1.TabIndex = 18;
     this.buttonWhileDisplay.AutoEllipsis = true;
     this.buttonWhileDisplay.BackColor    = Color.Transparent;
     this.buttonWhileDisplay.FlatAppearance.BorderColor = Color.DarkGray;
     this.buttonWhileDisplay.FlatStyle = FlatStyle.Flat;
     this.buttonWhileDisplay.Location  = new Point(571, 5);
     this.buttonWhileDisplay.Margin    = new Padding(3, 4, 3, 4);
     this.buttonWhileDisplay.Name      = "buttonWhileDisplay";
     this.buttonWhileDisplay.Size      = new Size(155, 25);
     this.buttonWhileDisplay.TabIndex  = 2;
     this.buttonWhileDisplay.Text      = "全屏幕区域";
     this.buttonWhileDisplay.UseVisualStyleBackColor = false;
     this.buttonWhileDisplay.Click    += new EventHandler(this.buttonWhileDisplay_Click);
     this.groupBoxCustomArea.Anchor    = AnchorStyles.Bottom | AnchorStyles.Left;
     this.groupBoxCustomArea.BackColor = SystemColors.Control;
     this.groupBoxCustomArea.Controls.Add((Control)this.labelLeft);
     this.groupBoxCustomArea.Controls.Add((Control)this.textBoxLeft);
     this.groupBoxCustomArea.Controls.Add((Control)this.textBoxTop);
     this.groupBoxCustomArea.Controls.Add((Control)this.labelTop);
     this.groupBoxCustomArea.Controls.Add((Control)this.labelRight);
     this.groupBoxCustomArea.Controls.Add((Control)this.textBoxRight);
     this.groupBoxCustomArea.Controls.Add((Control)this.textBoxBottom);
     this.groupBoxCustomArea.Controls.Add((Control)this.labelBottom);
     this.groupBoxCustomArea.Location            = new Point(4, 470);
     this.groupBoxCustomArea.Margin              = new Padding(3, 4, 3, 4);
     this.groupBoxCustomArea.Name                = "groupBoxCustomArea";
     this.groupBoxCustomArea.Padding             = new Padding(3, 4, 3, 4);
     this.groupBoxCustomArea.Size                = new Size(207, 89);
     this.groupBoxCustomArea.TabIndex            = 20;
     this.groupBoxCustomArea.TabStop             = false;
     this.groupBoxCustomArea.Text                = "自定义区域";
     this.btnIdentify.Anchor                     = AnchorStyles.Top | AnchorStyles.Right;
     this.btnIdentify.AutoEllipsis               = true;
     this.btnIdentify.BackColor                  = Color.Transparent;
     this.btnIdentify.FlatAppearance.BorderColor = Color.DarkGray;
     this.btnIdentify.FlatStyle                  = FlatStyle.Flat;
     this.btnIdentify.Location                   = new Point(729, 5);
     this.btnIdentify.Margin                     = new Padding(3, 4, 3, 4);
     this.btnIdentify.Name     = "btnIdentify";
     this.btnIdentify.Size     = new Size(106, 25);
     this.btnIdentify.TabIndex = 23;
     this.btnIdentify.Text     = "button1";
     this.btnIdentify.UseVisualStyleBackColor = false;
     this.btnIdentify.Click += new EventHandler(this.btnIdentify_Click);
     this.huionWorkAreaPictureRect1.BackColor            = Color.Transparent;
     this.huionWorkAreaPictureRect1.DeviceRect           = new Rectangle(0, 0, 0, 0);
     this.huionWorkAreaPictureRect1.DeviceRectRotate     = 0;
     this.huionWorkAreaPictureRect1.Location             = new Point(146, (int)sbyte.MaxValue);
     this.huionWorkAreaPictureRect1.Margin               = new Padding(3, 4, 3, 4);
     this.huionWorkAreaPictureRect1.Name                 = "huionWorkAreaPictureRect1";
     this.huionWorkAreaPictureRect1.ScreenRect           = new Rectangle(0, 0, 0, 0);
     this.huionWorkAreaPictureRect1.Size                 = new Size(87, 57);
     this.huionWorkAreaPictureRect1.TabIndex             = 22;
     this.huionWorkAreaPictureRect1.TabStop              = false;
     this.huionWorkAreaPictrueView1.DeviceImage          = (Bitmap)null;
     this.huionWorkAreaPictrueView1.DeviceImageMaxHeight = 190;
     this.huionWorkAreaPictrueView1.DeviceImageMaxWidth  = 400;
     this.huionWorkAreaPictrueView1.IntervalSpace        = 5;
     this.huionWorkAreaPictrueView1.Location             = new Point(117, 36);
     this.huionWorkAreaPictrueView1.Margin               = new Padding(5, 6, 5, 6);
     this.huionWorkAreaPictrueView1.Name                 = "huionWorkAreaPictrueView1";
     this.huionWorkAreaPictrueView1.Rotate               = 0;
     this.huionWorkAreaPictrueView1.Screenshot           = (Bitmap)null;
     this.huionWorkAreaPictrueView1.ScreenshotMaxHeight  = 300;
     this.huionWorkAreaPictrueView1.ScreenshotMaxWidth   = 640;
     this.huionWorkAreaPictrueView1.Size                 = new Size(38, 25);
     this.huionWorkAreaPictrueView1.TabIndex             = 21;
     this.huionWorkAreaPictrueView1.TabStop              = false;
     this.AutoScaleDimensions = new SizeF(96f, 96f);
     this.AutoScaleMode       = AutoScaleMode.Dpi;
     this.ClientSize          = new Size(840, 560);
     this.Controls.Add((Control)this.btnIdentify);
     this.Controls.Add((Control)this.huionWorkAreaPictureRect1);
     this.Controls.Add((Control)this.groupBoxCustomArea);
     this.Controls.Add((Control)this.buttonWhileDisplay);
     this.Controls.Add((Control)this.label1);
     this.Controls.Add((Control)this.groupBoxRotate);
     this.Controls.Add((Control)this.buttonCalibration);
     this.Controls.Add((Control)this.buttonScreenRatio);
     this.Controls.Add((Control)this.buttonWhileBoard);
     this.Controls.Add((Control)this.comboBoxSelectScreen);
     this.Controls.Add((Control)this.labelSelectScreen);
     this.Controls.Add((Control)this.huionWorkAreaPictrueView1);
     this.Font            = new Font("微软雅黑", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte)134);
     this.FormBorderStyle = FormBorderStyle.None;
     this.KeyPreview      = true;
     this.Margin          = new Padding(3, 4, 3, 4);
     this.Name            = nameof(FormWorkArea);
     this.Text            = nameof(FormWorkArea);
     this.Load           += new EventHandler(this.FormWorkArea_Load);
     this.groupBoxRotate.ResumeLayout(false);
     this.groupBoxRotate.PerformLayout();
     this.groupBoxCustomArea.ResumeLayout(false);
     this.groupBoxCustomArea.PerformLayout();
     ((ISupportInitialize)this.huionWorkAreaPictureRect1).EndInit();
     ((ISupportInitialize)this.huionWorkAreaPictrueView1).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }