示例#1
0
        /// <summary>
        /// Starts moving the mouse in the grid mode, in the specified
        /// direction
        /// </summary>
        /// <param name="direction">down or up</param>
        private void startGridSweep(GridMouseMover.GridSweepDirections direction)
        {
            if (_gridMouseMover.IsIdle())
            {
                _mode = MouseMode.Grid;

                pause();
                _gridMouseMover.SetGridSweepDirection(direction);

                AuditLog.Audit(new AuditEventMouseMover("grid", direction.ToString()));

                _gridMouseMover.Start();
            }
        }
示例#2
0
        /// <summary>
        /// Form loader.  Initialize, subscribe to events.
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="e">event arg</param>
        private void MouseScannerScreen_Load(object sender, EventArgs e)
        {
            _scannerCommon.HideTalkWindow();

            _scannerCommon.OnLoad();

            _radarMouseMover = createRadarMouseMover();
            _gridMouseMover = createGridMouseMover();

            Context.AppActuatorManager.EvtSwitchHook += AppActuatorManager_EvtSwitchHook;
            var actuator = Context.AppActuatorManager.GetActuator(typeof(KeyboardActuator));
            if (actuator is KeyboardActuator)
            {
                _keyboardActuator = actuator as KeyboardActuator;
                _keyboardActuator.EvtMouseDown += MouseScannerScreen_EvtMouseDown;
            }

            _scannerCommon.GetAnimationManager().Start(_scannerCommon.GetRootWidget());
        }
示例#3
0
文件: MouseScanner.cs 项目: glwu/acat
        /// <summary>
        /// Starts moving the mouse in the grid mode, in the specified
        /// direction
        /// </summary>
        /// <param name="direction">down or up</param>
        private void startGridSweep(GridMouseMover.Direction direction)
        {
            pause();

            _gridMouseMover = createGridMouseMover();

            AuditLog.Audit(new AuditEventMouseMover(direction.ToString()));

            _gridMouseMover.GridRectangleDirection = direction;

            _gridMouseMover.Start();

            _gridMouseMover = null;

            resume();
        }
示例#4
0
        /// <summary>
        /// Creates and initializes the object that will handle grid mouse 
        /// movement.
        /// </summary>
        /// <returns>The created object</returns>
        private GridMouseMover createGridMouseMover()
        {
            var gridMouseMover = new GridMouseMover
            {
                Cycles = Common.AppPreferences.MouseGridVerticalSweeps,
                Sweeps = Common.AppPreferences.MouseGridHorizontalSweeps,
                MouseSpeed = Common.AppPreferences.MouseGridHorizontalSpeed,
                ScanSpeed = Common.AppPreferences.MouseGridVerticalSpeed,
                LineWidth = Common.AppPreferences.MouseGridLineWidth,
                StartFromLastCursorPos = Common.AppPreferences.MouseGridStartFromLastCursorPos,
                GridScanSpeedMultiplier = Common.AppPreferences.MouseGridScanSpeedMultiplier,
                MouseMoveSpeedMultiplier = Common.AppPreferences.MouseGridMouseMoveSpeedMultiplier
            };
            gridMouseMover.Init();
            gridMouseMover.EvtMouseMoverStateChanged += _gridMouseMover_EvtMouseMoverStateChanged;

            return gridMouseMover;
        }
示例#5
0
文件: MouseScanner.cs 项目: glwu/acat
        /// <summary>
        /// Creates and initializes the object that will handle grid mouse
        /// movement.
        /// </summary>
        /// <returns>The created object</returns>
        private GridMouseMover createGridMouseMover()
        {
            var gridMouseMover = new GridMouseMover
            {
                GridRectangleSpeed = Common.AppPreferences.MouseGridRectangleSpeed,
                GridRectangleCycles = Common.AppPreferences.MouseGridRectangleCycles,
                GridLineSpeed = Common.AppPreferences.MouseGridLineSpeed,
                GridLineCycles = Common.AppPreferences.MouseGridRectangleCycles,
                GridLineThickness = Common.AppPreferences.MouseGridLineThickness,
                EnableVerticalGridRectangle = Common.AppPreferences.MouseGridEnableVerticalRectangleScan
            };

            return gridMouseMover;
        }