Esempio n. 1
0
 /// <summary>
 /// 鼠标点击事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Hook_OnMouseActivity(object sender, POINT e)
 {
     if (Common.isAllWindowCap && Process.GetCurrentProcess().Id != FindWindowInfo.GetProcessIDByHWND(FindWindowInfo.GetWindowHWND(e.x, e.y)) ||
         Common.OCRWinHwnd == (IntPtr)FindWindowInfo.GetWindowHWND(e.x, e.y))
     {
         OCR();
     }
 }
        /// <summary>
        /// 鼠标点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void Hook_OnMouseActivity(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            if (e.Button == Common.UsingHotKey.MouseButton)
            {
                if ((Common.isAllWindowCap == true && Process.GetCurrentProcess().Id != FindWindowInfo.GetProcessIDByHWND(FindWindowInfo.GetWindowHWND(e.X, e.Y))) ||
                    Common.OCRWinHwnd == (IntPtr)FindWindowInfo.GetWindowHWND(e.X, e.Y))
                {
                    OCR();
                }
            }

            hook.Stop();
            MouseKeyboardHook_Init();
        }
Esempio n. 3
0
        /// <summary>
        /// 鼠标点击事件
        /// </summary>
        void Hook_OnMouseActivity(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            if (e.Button == System.Windows.Forms.MouseButtons.Left)
            {
                SelectedHwnd = FindWindowInfo.GetWindowHWND(e.X, e.Y);
                string gameName = FindWindowInfo.GetWindowName(SelectedHwnd);
                int    pid      = FindWindowInfo.GetProcessIDByHWND(SelectedHwnd);

                if (Process.GetCurrentProcess().Id != pid)
                {
                    WinNameTag.Text = "[实时]" + gameName + "—" + pid;
                }
                hook.Stop();
                IsChoosingWin = false;
            }
        }