Ejemplo n.º 1
0
            void _Detect()
            {
                if (AMouse.IsPressed(MButtons.Left | MButtons.Right | MButtons.Middle))
                {
                    _prev.mDirection = 0;
                    return;
                }

                int x = _x, y = _y;

                if (x == _prev.xx && y == _prev.yy) /*AOutput.Write("same x y");*/ return {
                    ;
                }
Ejemplo n.º 2
0
        //Every 30 ms while in drag mode.
        void _Timer()
        {
            if (!_isDragMode)
            {
                return;
            }

            //when mouse released, end drag mode with ~100 ms delay
            if (!AMouse.IsPressed(MButtons.Left | MButtons.Right))              //calls GetKeyStateAsync. GetKeyState somehow unreliable when in drag mode.
            {
                if (++_endCounter == 4)
                {
                    _EndedDragMode();
                }
                return;
            }
            _endCounter = 0;
            //end drag mode if _wTransparent died, eg did not find useful data on drag enter
            if (!_wTransparent.Is0 && !_wTransparent.IsAlive)
            {
                _EndedDragMode();
                return;
            }

            var w = AWnd.FromMouse(WXYFlags.NeedWindow);

            if (!_isProcess2)
            {
                if (!w.IsOfThisProcess)
                {
                    return;
                }
                //AOutput.Write("drag");
                _isProcess2 = true;
                _wWindow    = w;
                new Au.Util.ProcessStarter_("Au.Editor.exe", "/dd " + CommandLine.MsgWnd.Handle.ToString()).StartUserIL();
                //new Au.Util.ProcessStarter_("Au.Editor.exe", $"/dd {CommandLine.MsgWnd.Handle.ToString()} {ATime.PerfMilliseconds}").StartUserIL(); //test process startup speed
            }
            else if (w != _wTransparent)
            {
                _wWindow = w;
                _SetTransparentSizeZorder();
            }
        }