Beispiel #1
0
        /// <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();
        }
Beispiel #2
0
        /// <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;
            }
        }
Beispiel #3
0
        /// <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);
        }
Beispiel #4
0
        /// <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;
            }
        }
Beispiel #5
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());
        }
Beispiel #6
0
        /// <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;
                }
            }
        }
Beispiel #7
0
        /// <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();
        }
Beispiel #8
0
 /// <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;
     }
 }
Beispiel #9
0
        /// <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;
        }
Beispiel #10
0
        /// <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();
        }