void fireWindowClosingEvent(unoidl.com.sun.star.lang.EventObject Source) { if (WindowClosing != null) { try { WindowClosing.Invoke(this, new EventObjectForwarder(Source)); } catch { } } }
private void fireWindowClosingEvent(unoidl.com.sun.star.lang.EventObject source) { if (WindowClosing != null) { try { WindowClosing.DynamicInvoke(this, new OoEventArgs(source)); } catch (Exception ex) { Logger.Instance.Log(LogPriority.DEBUG, this, "can't fire window closing event", ex); } } }
} // OnScreenSizeChanged #endregion #region Form Closing #if (WINDOWS) /// <summary> /// If the form is closing /// </summary> private static void FormClosing(object sender, FormClosingEventArgs e) { bool ret = false; WindowClosingEventArgs ex = new WindowClosingEventArgs(); if (WindowClosing != null) { WindowClosing.Invoke(null, ex); ret = ex.Cancel; } e.Cancel = ret; } // FormClosing
/// <inheritdoc /> public virtual bool OnWindowClosing(IDockWindow?window) { var canClose = window?.OnClose() ?? true; var eventArgs = new WindowClosingEventArgs(window) { Cancel = !canClose }; WindowClosing?.Invoke(this, eventArgs); return(!eventArgs.Cancel); }
///<summary>Invokes registered user-defined handler methods when the native window is about to close.</summary> internal byte OnWindowClosing() { //C++ handles bool values as a single byte, C# uses 4 bytes byte noClose = 0; var doNotClose = WindowClosing?.Invoke(this, null); if (doNotClose ?? false) { noClose = 1; } return(noClose); }
private void OnClosing(Object sender, CancelEventArgs e) { if (e.Cancel) { return; } FormClosingEventArgs args = new FormClosingEventArgs(CloseReason, e.Cancel); WindowClosing?.Invoke(sender, args); if (args.Cancel) { e.Cancel = true; } }
private void MetroWindow_Closed(object sender, EventArgs e) { Keymapper.Stop(); ProcessWatcher.Stop(); HapticManager.Stop(); var aC = ControllerManager.GetActiveController(); aC?.SetLightbar(0, 0, 0); aC?.Stop(); ControllerManager.Stop(); _notifyIcon.Visible = false; _notifyIcon.Dispose(); WindowClosing?.Invoke(); }
public void Handle(WindowClosing message) { _settings.IsMuted = VideoPlayer.IsMuted; }
private void CloseWindow() { WindowClosing?.Invoke(this, false); }
private void AddStep() { WindowClosing?.Invoke(this, true); }
private void OnWindowClosing() { WindowClosing?.Invoke(this, EventArgs.Empty); }
private void AddRecipe() { WindowClosing?.Invoke(this, true); }
private void AddIngredient() { WindowClosing?.Invoke(this, true); }
protected virtual void OnWindowClosing() { WindowClosing?.Invoke(this, new EventArgs()); }
private void MainWindow_Closing(object sender, CancelEventArgs e) { WindowClosing.Execute(this); ConnectionService.Instance.Dispose(); }