示例#1
0
 private void chkRegion_CheckedChanged(object sender, EventArgs e)
 {
     btnRegion.Enabled = chkRegion.Checked;
     if (chkRegion.Checked && WinRect != Rectangle.Empty)
     {
         txtMouseSubregion.Text = WinRect.ToString();
     }
     else
     {
         txtMouseSubregion.Text = "No subregion selected.";
     }
 }
示例#2
0
        private void btnRegion_Click(object sender, EventArgs e)
        {
            //mouse REGION
            DialogResult res;

            if (string.IsNullOrEmpty(cmbProcessMouse.Text.Trim()) || cmbProcessMouse.Text.Equals("<any>", StringComparison.OrdinalIgnoreCase))
            {
                res = wm.ShowDialog(null, WinRect);
            }
            else
            {
                res = wm.ShowDialog(cmbProcessMouse.Text.Split('|'), _clearOffset ? Rectangle.Empty : WinRect);
            }
            if (res == DialogResult.OK)
            {
                WinRect = wm.GetRect();
                txtMouseSubregion.Text = WinRect.ToString();
            }
            _clearOffset = false;
        }