protected void MainWindow_WindowStateEvent(object o, WindowStateEventArgs args) { if (args.Event.NewWindowState == Gdk.WindowState.Iconified) { this.Visible = false; statusIcon.Visible = true; } }
void HandleWindowStateEvent(object o, WindowStateEventArgs args) { if (args.Event.ChangedMask == Gdk.WindowState.Iconified) { if ((args.Event.NewWindowState & Gdk.WindowState.Iconified) == Gdk.WindowState.Iconified) { args.Event.Window.Deiconify(); } } }
protected void OnWindowStateEvent(object sender, WindowStateEventArgs args) { var state = args.Event.NewWindowState; if (state == WindowState.Iconified) { Confirm.Hide(); } args.RetVal = true; }
private void OnWindowStateChanged(object o, WindowStateEventArgs args) { if (args.Event.NewWindowState.HasFlag(WindowState.Maximized)) { this.ViewportPaned.Position = this.ViewportPaned.AllocatedHeight + this.LowerBoxPaned.AllocatedHeight + (int)this.ViewportAlignment.BottomPadding + (int)this.LowerBoxAlignment.TopPadding; } }
private void WindowStateHandler(object obj, WindowStateEventArgs args) { switch (args.Event.NewWindowState) { case Gdk.WindowState.Iconified: SetCloseMenuItemSensitivity(false); break; case (Gdk.WindowState) 0: SetCloseMenuItemSensitivity(true); break; } }
private void OnWindowStateEvent(object o, WindowStateEventArgs args) { if (args.Event.ChangedMask == Gdk.WindowState.Iconified) { var windowState = args.Event.NewWindowState; if (windowState == Gdk.WindowState.Iconified) { _application.SendSleep(); } else { _application.SendResume(); } } }
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //Event: Window private void PosMainWindow_WindowStateEvent(object o, WindowStateEventArgs args) { // Activate Pos Window, ex Activated From BackOffice if (args.Event.NewWindowState == Gdk.WindowState.Fullscreen) { //Always Reset tablePadFamily before Refresh, to Prevent Keep old selected when we delete articles and create a new Familiy //This way we always have the first family when we come from backoffice _tablePadFamily.SelectedButtonOid = Guid.Empty; _tablePadFamily.Refresh(); //Always Apply Filter to prevent error when work in a clean database, and we create first Records //Filter is " AND (Family = '00000000-0000-0000-0000-000000000000')" _tablePadSubFamily.Filter = String.Format(" AND (Family = '{0}')", _tablePadFamily.SelectedButtonOid); _tablePadSubFamily.Refresh(); _tablePadArticle.Refresh(); } }
// End up here if we iconify with the window manager private static void on_mainWindow_window_state_event(object o, WindowStateEventArgs args) { //Console.WriteLine ("state event: type=" + args.Event.Type + // "; new_window_state=" + args.Event.NewWindowState); if (args.Event.NewWindowState == Gdk.WindowState.Iconified) { iconified = true; gfax.MainWindow.SkipTaskbarHint = true; } else { gfax.MainWindow.SkipTaskbarHint = false; iconified = false; } }
private void OnWindowStateChanged(object o, WindowStateEventArgs args) { var winUIApplication = WUX.Application.Current; var winUIWindow = WUX.Window.Current; var newState = args.Event.NewWindowState; var changedState = args.Event.ChangedMask; var isVisible = !(newState.HasFlag(Gdk.WindowState.Withdrawn) || newState.HasFlag(Gdk.WindowState.Iconified)); var isVisibleChanged = changedState.HasFlag(Gdk.WindowState.Withdrawn) || changedState.HasFlag(Gdk.WindowState.Iconified); var focused = newState.HasFlag(Gdk.WindowState.Focused); var focusChanged = changedState.HasFlag(Gdk.WindowState.Focused); if (!focused && focusChanged) { winUIWindow?.OnActivated(Windows.UI.Core.CoreWindowActivationState.Deactivated); } if (isVisibleChanged) { if (isVisible) { winUIApplication?.OnLeavingBackground(); winUIWindow?.OnVisibilityChanged(true); } else { winUIWindow?.OnVisibilityChanged(false); winUIApplication?.OnEnteredBackground(); } } if (focused && focusChanged) { winUIWindow?.OnActivated(Windows.UI.Core.CoreWindowActivationState.CodeActivated); } }
private void OnWindowStateEvent(object sender, WindowStateEventArgs e) { Console.WriteLine("state event: type=" + e.Event.Type + "; new_window_state=" + e.Event.NewWindowState); if (e.Event.Type != Gdk.EventType.WindowState) { return; } switch (e.Event.NewWindowState) { case Gdk.WindowState.Maximized: MaximizeMenu.Active = true; FullscreenMenu.Active = false; break; case Gdk.WindowState.Fullscreen: FullscreenMenu.Active = true; MaximizeMenu.Active = false; break; case (Gdk.WindowState.Fullscreen | Gdk.WindowState.Maximized): MaximizeMenu.Active = true; FullscreenMenu.Active = true; break; case (Gdk.WindowState) 0: FullscreenMenu.Active = false; MaximizeMenu.Active = false; break; default: // ignore break; } }
private void WindowStateEvent_Changed(object o, WindowStateEventArgs args) { _fullScreen.Label = args.Event.NewWindowState.HasFlag(Gdk.WindowState.Fullscreen) ? "Exit Fullscreen" : "Enter Fullscreen"; }
protected void OnWindowStateChanged(object o, WindowStateEventArgs a) { return; }
private void PosMainWindow_WindowStateEvent(object o, WindowStateEventArgs args) { }