private void Quit_Click(object sender, RoutedEventArgs e) { switch (WindowState) { case WindowState.Minimized: _NotifyIcon.Visible = false; OnMaximize?.Invoke(); break; case WindowState.Normal: _NotifyIcon.Visible = true; OnMinimize?.Invoke(); Hide(); break; } }
public void OnMinimizeButtonPressed() { controller.SetVisibility(false); OnMinimize?.Invoke(); }
internal static void HandleMinimize() { OnMinimize?.Invoke(); }