Exemple #1
0
 /// <summary>
 /// Close the switch windows scanner
 /// </summary>
 private void closeScanner()
 {
     if (_switchWindowsScanner != null)
     {
         Windows.CloseForm(_switchWindowsScanner);
         _switchWindowsScanner = null;
     }
 }
Exemple #2
0
        /// <summary>
        /// Invoked when the Functional agent is activated.  This is
        /// the entry point.
        /// </summary>
        /// <returns>true on success</returns>
        public override bool Activate()
        {
            _windowInfo           = null;
            ExitCode              = CompletionCode.ContextSwitch;
            _switchWindowsScanner = Context.AppPanelManager.CreatePanel("SwitchWindowsScanner") as SwitchWindowsScanner;

            if (_switchWindowsScanner != null)
            {
                _switchWindowsScanner.FormClosing       += _form_FormClosing;
                _switchWindowsScanner.EvtDone           += _form_EvtDone;
                _switchWindowsScanner.EvtActivateWindow += _switchWindowsScanner_EvtActivateWindow;

                _switchWindowsScanner.FilterByProcessName = FilterByProcessName;
                Context.AppPanelManager.ShowDialog(_switchWindowsScanner);
            }

            return(true);
        }
Exemple #3
0
 /// <summary>
 /// Release resources, reinitialize for next activation
 /// </summary>
 /// <param name="sender">event sender</param>
 /// <param name="e">event args</param>
 private void _form_FormClosing(object sender, FormClosingEventArgs e)
 {
     _switchWindowsScanner.EvtDone -= _form_EvtDone;
     initProperties();
     _switchWindowsScanner = null;
 }
Exemple #4
0
 /// <summary>
 /// Release resources, reinitialize for next activation
 /// </summary>
 /// <param name="sender">event sender</param>
 /// <param name="e">event args</param>
 private void _form_FormClosing(object sender, FormClosingEventArgs e)
 {
     _switchWindowsScanner.EvtDone -= _form_EvtDone;
     initProperties();
     _switchWindowsScanner = null;
 }
Exemple #5
0
 /// <summary>
 /// Close the switch windows scanner
 /// </summary>
 private void closeScanner()
 {
     if (_switchWindowsScanner != null)
     {
         Windows.CloseForm(_switchWindowsScanner);
         _switchWindowsScanner = null;
     }
 }
Exemple #6
0
        /// <summary>
        /// Invoked when the Functional agent is activated.  This is
        /// the entry point.
        /// </summary>
        /// <returns>true on success</returns>
        public override bool Activate()
        {
            _windowInfo = null;
            ExitCode = CompletionCode.ContextSwitch;
            _switchWindowsScanner = Context.AppPanelManager.CreatePanel("SwitchWindowsScanner") as SwitchWindowsScanner;

            if (_switchWindowsScanner != null)
            {
                _switchWindowsScanner.FormClosing += _form_FormClosing;
                _switchWindowsScanner.EvtDone += _form_EvtDone;
                _switchWindowsScanner.EvtActivateWindow += _switchWindowsScanner_EvtActivateWindow;

                _switchWindowsScanner.FilterByProcessName = FilterByProcessName;
                Context.AppPanelManager.ShowDialog(_switchWindowsScanner);
            }

            return true;
        }