コード例 #1
0
ファイル: LaunchAppScanner.cs プロジェクト: glwu/acat
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public LaunchAppScanner()
        {
            InitializeComponent();
            PanelClass = "LaunchAppScanner";
            _pageStartIndex = 0;
            _pageNumber = 0;
            _numPages = 0;
            _invoker = new ExtensionInvoker(this);
            KeyPreview = true;

            subscribeToEvents();

            var actuator = ActuatorManager.Instance.GetActuator(typeof(KeyboardActuator));
            if (actuator is KeyboardActuator)
            {
                _keyboardActuator = actuator as KeyboardActuator;
                _keyboardActuator.EvtKeyPress += _keyboardActuator_EvtKeyPress;
            }

            _dispatcher = new RunCommandDispatcher(this);

            createStatusBar();
        }
コード例 #2
0
ファイル: YesNoScanner.cs プロジェクト: nbsrujan/acat
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        /// <param name="panelClass">Panel class of the scanner</param>
        /// <param name="panelTitle">Title of the scanner</param>
        public YesNoScanner(String panelClass, String panelTitle)
        {
            InitializeComponent();

            Load += ContextMenu_Load;
            FormClosing += ContextMenu_FormClosing;

            Choice = false;
            _title = panelTitle;
            PanelClass = panelClass;
            Caption = String.Empty;

            _invoker = new ExtensionInvoker(this);
            _dispatcher = new Dispatcher(this);

            var actuator = ActuatorManager.Instance.GetActuator(typeof(KeyboardActuator));
            if (actuator is KeyboardActuator)
            {
                _keyboardActuator = actuator as KeyboardActuator;
                _keyboardActuator.EvtKeyPress += _keyboardActuator_EvtKeyPress;
            }
        }
コード例 #3
0
ファイル: AbbreviationsScanner.cs プロジェクト: nbsrujan/acat
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public AbbreviationsScanner()
        {
            InitializeComponent();

            PanelClass = "AbbreviationsScanner";
            _pageStartIndex = 0;
            _pageNumber = 0;
            _numPages = 0;
            _invoker = new ExtensionInvoker(this);

            FormClosing += AbbreviationsScanner_FormClosing;
            KeyDown += AbbreviationsScanner_KeyDown;
            LocationChanged += AbbreviationsScanner_LocationChanged;

            KeyPreview = true;

            var actuator = ActuatorManager.Instance.GetActuator(typeof(KeyboardActuator));
            if (actuator is KeyboardActuator)
            {
                _keyboardActuator = actuator as KeyboardActuator;
                _keyboardActuator.EvtKeyPress += _keyboardActuator_EvtKeyPress;
            }

            _dispatcher = new RunCommandDispatcher(this);
        }
コード例 #4
0
ファイル: AutoPositionScanner.cs プロジェクト: nbsrujan/acat
        /// <summary>
        /// Subscribes the events
        /// </summary>
        private void subscribeToHookEvents()
        {
            Context.AppActuatorManager.EvtSwitchHook += AppActuatorManager_EvtSwitchHook;

            var actuator = Context.AppActuatorManager.GetActuator(typeof(KeyboardActuator));
            if (actuator is KeyboardActuator)
            {
                _keyboardActuator = actuator as KeyboardActuator;
                _keyboardActuator.EvtMouseDown += KeyboardActuator_EvtMouseDown;
            }
        }
コード例 #5
0
ファイル: MouseScanner2.cs プロジェクト: nbsrujan/acat
        /// <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());
        }
コード例 #6
0
ファイル: ACATMuteForm.cs プロジェクト: nbsrujan/acat
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public ACATMuteForm()
        {
            InitializeComponent();

            _syncObj = new SyncLock();

            ShowInTaskbar = false;
            if (!initialize())
            {
                Log.Debug("Initialization error!");
            }

            TopMost = true;

            RoundedCornerControl.CreateRoundedControl(Title);

            Windows.ShowWindowBorder(this, Common.AppPreferences.ScannerShowBorder);

            Windows.SetWindowPosition(this, Windows.WindowPosition.CenterScreen);

            _windowOverlapWatchdog = new WindowOverlapWatchdog(this);

            updateDateTime();

            // Title isn't used on this form, but we keep it hidden instead of removing it
            // so we don't have to modify the IScreenInterface GetTitle() method
            Title.Hide();

            // timer used for displaying the time
            timer.Start();

            FormBorderStyle = FormBorderStyle.None;
            WindowState = FormWindowState.Maximized;

            Load += MuteForm_Load;
            FormClosing += MuteForm_FormClosing;

            var actuator = ActuatorManager.Instance.GetActuator(typeof(KeyboardActuator));
            if (actuator != null)
            {
                _keyboardActuator = actuator as KeyboardActuator;
                if (_keyboardActuator != null)
                {
                    _keyboardActuator.EvtKeyDown += _keyboardActuator_EvtKeyDown;
                    _keyboardActuator.EvtKeyUp += _keyboardActuator_EvtKeyUp;
                }
            }
        }
コード例 #7
0
ファイル: YesNoDialogForm.cs プロジェクト: glwu/acat
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public YesNoDialogForm()
        {
            InitializeComponent();

            _invoker = new ExtensionInvoker(this);

            Choice = false;

            Caption = String.Empty;
            TitleBar = "ACAT";

            var actuator = ActuatorManager.Instance.GetActuator(typeof(KeyboardActuator));
            if (actuator is KeyboardActuator)
            {
                _keyboardActuator = actuator as KeyboardActuator;
                _keyboardActuator.EvtKeyDown += keyboardActuator_EvtKeyDown;
            }

            Init();
        }
コード例 #8
0
ファイル: AgentManager.cs プロジェクト: glwu/acat
 /// <summary>
 /// Gets the keyboard actuator object. Also subscribes to events
 /// from the actuator
 /// </summary>
 private void getKeyboardActuator()
 {
     var actuator = ActuatorManager.Instance.GetActuator(typeof(KeyboardActuator));
     if (actuator is KeyboardActuator)
     {
         _keyboardActuator = actuator as KeyboardActuator;
         _keyboardActuator.EvtKeyDown += keyboardActuator_EvtKeyDown;
         _keyboardActuator.EvtKeyUp += keyboardActuator_EvtKeyUp;
         _keyboardActuator.EvtMouseDown += _keyboardActuator_EvtMouseDown;
     }
 }
コード例 #9
0
ファイル: AgentManager.cs プロジェクト: glwu/acat
        /// <summary>
        /// Disposes and releases resources
        /// </summary>
        /// <param name="disposing">disposed before?</param>
        private void Dispose(bool disposing)
        {
            // Check to see if Dispose has already been called.
            if (!_disposed)
            {
                Log.Debug();

                if (disposing)
                {
                    if (_agentsCache != null)
                    {
                        _agentsCache.Dispose();
                    }

                    if (_keyboardActuator != null)
                    {
                        _keyboardActuator.EvtKeyDown -= keyboardActuator_EvtKeyDown;
                        _keyboardActuator.EvtKeyUp -= keyboardActuator_EvtKeyUp;
                        _keyboardActuator = null;
                    }
                }
                // Release unmanaged resources.
            }

            _disposed = true;
        }
コード例 #10
0
ファイル: FileBrowserScanner.cs プロジェクト: glwu/acat
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public FileBrowserScanner()
        {
            InitializeComponent();
            ActionVerb = "Open";
            PanelClass = "FileBrowserScanner";

            _allFilesList = new List<FileInfo>();
            _fileList = new List<FileInfo>();

            _pageStartIndex = 0;
            _pageNumber = 0;
            _numPages = 0;

            _invoker = new ExtensionInvoker(this);
            SelectedFile = String.Empty;
            Folders = new String[] { };

            _includeFileExtensions = new String[] { };
            _excludeFileExtensions = new String[] { };

            KeyPreview = true;

            subscribeToEvents();

            var actuator = ActuatorManager.Instance.GetActuator(typeof(KeyboardActuator));
            if (actuator is KeyboardActuator)
            {
                _keyboardActuator = actuator as KeyboardActuator;
                _keyboardActuator.EvtKeyPress += _keyboardActuator_EvtKeyPress;
            }

            _dispatcher = new RunCommandDispatcher(this);

            createStatusBar();
        }