/// <summary> /// Close the switch windows scanner /// </summary> private void closeScanner() { if (_switchWindowsScanner != null) { Windows.CloseForm(_switchWindowsScanner); _switchWindowsScanner = null; } }
/// <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) { if (_switchWindowsScanner != null) { unsubscribeFromEvents(); } _switchWindowsScanner = null; }
/// <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) { subscribeToEvents(); _switchWindowsScanner.FilterByProcessName = FilterByProcessName; Context.AppPanelManager.ShowDialog(_switchWindowsScanner); } return(true); }
/// <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) { subscribeToEvents(); _switchWindowsScanner.FilterByProcessName = FilterByProcessName; Context.AppPanelManager.ShowDialog(_switchWindowsScanner); } return true; }