Example #1
0
        public static void showForm(HNStruct.RECT screenRect)
        {
            FormCalibrate formCalibrate = new FormCalibrate(screenRect);

            formCalibrate.Focus();
            int num = (int)formCalibrate.ShowDialog();
        }
Example #2
0
        private void btnIdentify_Click(object sender, EventArgs e)
        {
            if (FormIdentify.ShowCount > 0)
            {
                return;
            }
            for (int index = 0; index < this.displayNum; ++index)
            {
                HNStruct.RECT monitor = this.monitorInfos[index].Monitor;
                new FormIdentify(index + 1, new Point(monitor.Left + 20, monitor.Top + 20),
                                 (long)TabletConfigUtils.config.curScreenIndex == (long)index).Show();
            }

            this.Focus();
        }
Example #3
0
        private void buttonScreenRatio_Click(object sender, EventArgs e)
        {
            HNStruct.RECT screenRect =
                ScreenHelper.getScreenRect((int)TabletConfigUtils.config.curScreenIndex, this.monitorInfos);
            float num1 = (float)(screenRect.Right - screenRect.Left) / (float)(screenRect.Bottom - screenRect.Top);
            float num2 = (float)HNStruct.globalInfo.tabletInfo.maxX / (float)HNStruct.globalInfo.tabletInfo.maxY;

            HNStruct.HNRectRatio hnRectRatio = HNStruct.HNRectRatio.DEFAULT;
            if ((double)num1 > (double)num2)
            {
                hnRectRatio.t = (float)(1.0 - (double)num2 / (double)num1) / 2f;
                hnRectRatio.b = (float)(1.0 + (double)num2 / (double)num1) / 2f;
            }
            else
            {
                hnRectRatio.l = (float)(1.0 - (double)num1 / (double)num2) / 2f;
                hnRectRatio.r = (float)(1.0 + (double)num1 / (double)num2) / 2f;
            }

            this.huionWorkAreaPictureRect1.DeviceRectRatio = hnRectRatio;
        }
Example #4
0
 public FormCalibrate(HNStruct.RECT rect)
 {
     this.InitializeComponent();
     this.mScreenRect = rect;
 }