public Tip() { Loaded += delegate { AddPlacementTargetEvents(PlacementTarget); }; Unloaded += delegate { hwndSource?.Dispose(); RemovePlacementTargetEvents(PlacementTarget); }; BuildWindow(); }
protected override void OnClosed(EventArgs e) { hwndSource?.Dispose(); hwndSource = null; base.OnClosed(e); Application.Current.Shutdown(); }
protected virtual void Dispose(bool _disposing) { if (_disposing) { _source?.Dispose(); } }
protected virtual void Dispose(bool disposing) { if (disposing) { _hWndSource?.Dispose(); } }
public void Dispose() { if (source != null) { source.RemoveHook(hwndSourceHook); source.Dispose(); } }
protected override void OnClosed(EventArgs e) { hwndSource?.Dispose(); hwndSource = null; base.OnClosed(e); SystemEvents.SessionSwitch -= SystemEvents_SessionSwitch; Application.Current.Shutdown(); }
public void OnDetaching() { this.associatedObject.SourceInitialized -= AssociatedObject_SourceInitialized; if (hwndSource != null) { hwndSource.RemoveHook(WindowProc); hwndSource.Dispose(); } }
protected override void DestroyWindowCore(System.Runtime.InteropServices.HandleRef hwnd) { if (_internalHwndSource != null) { _internalHwndSource.ContentRendered -= _internalHwndSource_ContentRendered; _internalHwndSource.Dispose(); _internalHwndSource = null; } }
public void Dispose() { if (_hwndSource != null) { _hwndSource.Dispose(); } WebView.SetHandle(IntPtr.Zero); WebView.Destroy(); }
protected override void OnClosed(EventArgs e) { if (_hwndSource != null) { _hwndSource.Dispose(); _hwndSource = null; } base.OnClosed(e); }
/// <summary> /// Closes and destroys the Control. /// </summary> public void Close() { if (_hwndSource != null) { _hwndSource.Dispose(); _hwndSource = null; } _instance = null; }
protected override void DestroyWindowCore(HandleRef hwnd) { _manager.InternalRemoveLogicalChild(_rootPresenter); if (_wpfContentHost != null) { _wpfContentHost.Dispose(); _wpfContentHost = null; } }
protected override void DestroyWindowCore(HandleRef hwnd) { if (_internalHwndSource != null) { _internalHwndSource.ContentRendered -= _internalHwndSource_ContentRendered; _internalHwndSource.Dispose(); _internalHwndSource = null; } }
protected override void OnClosing(CancelEventArgs e) { base.OnClosing(e); if (hwndSource != null) { hwndSource.RemoveHook(WindowRawInputHandler); hwndSource.Dispose(); } }
public void Deactivate() { if (mIsActivated) { mHwndSource.Dispose(); ViewModel.Dispose(); } mIsActivated = false; }
/// <summary> /// Закрывает редактор. /// </summary> public void Close() { if (hwndSource != null) { hwndSource.Dispose(); hwndSource = null; } instance = null; }
public void Close() { if (_hwndSource != null) { _hwndSource.Dispose(); _hwndSource = null; } Control = null; }
internal static void Unload() { while (hotkeys.Keys.Count > 0) { Unregister(hotkeys.Keys.ElementAt(0)); } source.RemoveHook(HwndHook); source.Dispose(); hWnd = IntPtr.Zero; }
private void Dispose(bool disposing) { _windowHandleSource.RemoveHook(EventCallback); UnregisterHotKey(Win32Handler.Instance.MainWindowHandle, _id); if (disposing) { _windowHandleSource.Dispose(); } }
public void Dispose() { _hwndSource.RemoveHook(WndProc); _hwndSource?.Dispose(); _hwndSource = null; _contextMenu = null; _contextMenu2 = null; _contextMenu3 = null; }
void OnUnloaded(object sender, RoutedEventArgs e) { this.Unloaded -= new RoutedEventHandler(OnUnloaded); if (_hwndSrc != null) { _hwndSrc.RemoveHook(_hwndSrcHook); _hwndSrc.Dispose(); _hwndSrc = null; } }
public void Dispose() { if (!disposed) { hwndSource.Dispose(); foreach (var id in hotkeyIds) { NativeMethods.UnregisterHotKey(hwndSource.Handle, id); } } }
void OnViewClosed(object sender, EventArgs e) { //_hwndSource.RemoveHook(MessageProc); _hwndSource.Dispose(); var handler = OnShellClosed; if (handler != null) { OnShellClosed(); } }
public void Dispose() { if (!disposed) { NativeMethods.RemoveClipboardFormatListener(hwndSource.Handle); hwndSource.RemoveHook(WndProc); hwndSource.Dispose(); disposed = true; } }
protected virtual void Dispose(bool disposing) { if (disposing) { _target?.Dispose(); } if (IntPtr.Zero != _thumb) { ReleaseThumbnail(); } }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { // Unregister hot keys. foreach (var hotKey in _registered) { WinApi.UnregisterHotKey(_windowHandleSource.Handle, hotKey.Value); } _windowHandleSource.RemoveHook(messagesHandler); _windowHandleSource.Dispose(); }
protected override void OnClosed(EventArgs e) { if (_hwndSource != null) { _hwndSource.RemoveHook(WindowExtension.WindowProc); _hwndSource.Dispose(); _hwndSource = null; } base.OnClosed(e); }
protected override void OnClosed(EventArgs e) { if (AppUtil.IsHotKeyEnabled) { SystemHotKey.UnRegHotKey(_thisWindowHandle, c_hotKeyId); } hwndSource?.Dispose(); hwndSource = null; base.OnClosed(e); Application.Current.Shutdown(); }
protected virtual void Dispose(bool disposing) { if (!_disposed) { Win32Utils.UnregisterNotification(m_hNotifyDevNode); m_hNotifyDevNode = IntPtr.Zero; hwndSource.Dispose(); _disposed = true; } }
private void OnUnloaded(object sender, RoutedEventArgs args) { if (_context == null) { return; } ReleaseOpenGLResources(); _windowInfo?.Dispose(); _hwnd?.Dispose(); }