void fireWindowClosedEvent(OoWindowEventArgs e) { if (WindowClosed != null) { try { WindowClosed.Invoke(this, e); } catch { } } }
public void Close() { gameObject.SetActive(false); if (NotificationSystem.Instance != null) { NotificationSystem.Instance.CanShowMessages = true; } WindowClosed?.Invoke(this, EventArgs.Empty); }
static void HandleWndVisibleChanged(object sender, EventArgs args) { if (!wnd.Visible) { isShowing = false; ParameterInformationWindowManager.UpdateWindow(wnd.Extension, wnd.CompletionWidget); WindowClosed?.Invoke(null, EventArgs.Empty); } }
private void WindowClosedHandler() { if (tabViewModel != null) { tabViewModel.CloseTabRequested -= CloseTabRequested; tabViewModel.SelectDownloadRequested -= SelectDownloadRequestedHandler; } OnWindowClosing(); WindowClosed?.Invoke(this, EventArgs.Empty); }
private void DestroyWindow(X11.Window xWindow) { Services.Logger.LogWindowingSystemEvent("Destroying window {0}.", xWindow); var window = _windows.First(w => w.XWindow == xWindow); window.Close(); WindowClosed?.Invoke(new WindowEventArgs(window)); }
private void fireWindowClosedEvent(unoidl.com.sun.star.lang.EventObject source) { if (WindowClosed != null) { try { WindowClosed.DynamicInvoke(this, new OoEventArgs(source)); } catch (Exception ex) { Logger.Instance.Log(LogPriority.DEBUG, this, "can't fire window closed event", ex); } } }
void fireWindowClosedEvent(unoidl.com.sun.star.lang.EventObject Source) { if (WindowClosed != null) { try { WindowClosed.Invoke(this, new EventObjectForwarder(Source)); } catch { } } }
static void AddClosedHandler(IntPtr handle) { Automation.AddAutomationEventHandler( WindowPattern.WindowClosedEvent, AutomationElement.FromHandle(handle), TreeScope.Subtree, (sender, e) => { Debug.WriteLine(handle.ToString() + " IS KILL"); WindowClosed?.Invoke(null, new WindowEventArgs(new ProgramWindow(handle))); }); }
/// <summary> /// Closes the specified do close sound. /// </summary> /// <param name="doCloseSound">if set to <c>true</c> [do close sound].</param> public override void Close(bool doCloseSound = false) { if (!confirmed) { Reset(); SoundDefOf.Click.PlayOneShotOnCamera(); } else { SoundDefOf.Checkbox_TurnedOn.PlayOneShotOnCamera(); } base.Close(doCloseSound); WindowClosed?.Invoke(this, addedMutations); }
private void InitButtons(string[] buttonsText, ButtonCommands[] buttonCommands) { for (var i = 0; i < buttonsText.Length; i++) { var buttonInstance = GameObject.Instantiate(View.ButtonTemplate, View.ButtonsContainer); buttonInstance.gameObject.SetActive(true); buttonInstance.Text.text = buttonsText[i]; var buttonComand = buttonCommands[i]; buttonInstance.Button.onClick.AddListener(() => { ButtonClickHandle(buttonComand); }); } void ButtonClickHandle(ButtonCommands commandId) { GameObject.Destroy(View.gameObject); WindowClosed?.Invoke(this, commandId); } }
static ProgramWindow() { Automation.AddAutomationEventHandler( WindowPattern.WindowOpenedEvent, AutomationElement.RootElement, TreeScope.Children, (sender, e) => WindowOpened?.Invoke(null, new WindowEventArgs( new ProgramWindow(new IntPtr(((AutomationElement)sender).Current.NativeWindowHandle))))); Automation.AddAutomationEventHandler( WindowPattern.WindowClosedEvent, AutomationElement.RootElement, TreeScope.Subtree, (sender, e) => WindowClosed?.Invoke(null, new WindowEventArgs( new ProgramWindow(new IntPtr(((AutomationElement)sender).Cached.NativeWindowHandle))))); }
protected override void WinEventCallback(WinEventConstant eventType, IntPtr handle, int objectId, int childId) { if (handle == _targetHandle && objectId == 0) { if (eventType == WinEventConstant.EVENT_OBJECT_DESTROY) { // Target window was closed WindowClosed?.Invoke(this, EventArgs.Empty); } else if (eventType == WinEventConstant.EVENT_OBJECT_LOCATIONCHANGE) { // Target window size has changed SendWindowDimensions(handle); } else if (eventType == WinEventConstant.EVENT_OBJECT_NAMECHANGE) { // Target window title has changed SendWindowTitle(handle); } } }
public void CloseWindow(string windowHandle) { if (!IsOpened) { return; } if (!OpenedWindows.Contains(windowHandle)) { throw new ArgumentException($"Can`t find window with handle = {windowHandle}"); } if (OpenedWindows.Count == 1) { Quit(); return; } string currentHandle = DriverKeeper.GetDriver.CurrentWindowHandle; bool windowChanged = false; if (currentHandle != windowHandle) { DriverKeeper.GetDriver.SwitchTo().Window(windowHandle).Close(); DriverKeeper.GetDriver.SwitchTo().Window(currentHandle); } else { DriverKeeper.GetDriver.Close(); DriverKeeper.GetDriver.SwitchTo().Window(OpenedWindows.Last()); windowChanged = true; } WindowClosed?.Invoke(windowHandle); if (windowChanged) { WindowChanged?.Invoke(OpenedWindows.Last()); } }
public void Close() { gameObject.SetActive(false); WindowClosed?.Invoke(this, EventArgs.Empty); }
public void Window_Closed(object sender, EventArgs eventArgs) => WindowClosed?.Invoke(sender, eventArgs);
private void RaiseClosed(object sender, EventArgs e) { WindowClosed?.Invoke(sender, e); }
public void CloseWindow() { WindowClosed?.Invoke(this, null); Close(); }
public void CloseAndNotify(bool saveSession) { WindowClosed?.Invoke(this, saveSession); Close(); }
public void Close() { WindowClosed?.Invoke(); WindowClosed = null; Destroy(gameObject); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { WindowClosed?.Invoke(this, EventArgs.Empty); }
private void OnClose(object p) { WindowClosed?.Invoke(this, EventArgs.Empty); }
/// <inheritdoc /> public virtual void OnWindowClosed(IDockWindow?window) { WindowClosed?.Invoke(this, new WindowClosedEventArgs(window)); }
public void CloseAndNotify() { WindowClosed?.Invoke(this, null); Close(); }
protected virtual void OnWindowClosed(WindowClosedEventArgs e) { WindowClosed?.Invoke(this, e); }
public void Close() { this.Visible = false; WindowClosed?.Invoke(this); }