void WindowsExplorerDialogContextMenu_FormClosing(object sender, FormClosingEventArgs e) { Log.Debug(); try { disposeControlHighlight(); _autoScanTimer.Dispose(); _dockScanner.Dispose(); _scannerCommon.OnClosing(); } catch (Exception exp) { Log.Debug(exp.ToString()); } }
void MenuContextMenu_FormClosing(object sender, FormClosingEventArgs e) { if (_hWnd != IntPtr.Zero && _automationElementDockTo != null) { try { AutomationEventManager.RemoveAutomationPropertyChangedEventHandler(_hWnd, AutomationElement.BoundingRectangleProperty, _automationElementDockTo, onWindowPositionChanged); } catch { } } _screenCommon.GetAnimationManager().EvtPlayerStateChanged -= MenuContextMenu_EvtPlayerStateChanged; _autoScanTimer.Dispose(); _screenCommon.OnClosing(); }