private StaticTaskbarManager() { if (_myTaskbarIcon != null) { _myTaskbarIcon.Dispose(); } SetupNotifyIcon(); }
protected override void OnExit(ExitEventArgs e) { _hotkeyHandler.Dispose(); _taskbarIcon.Dispose(); base.OnExit(e); }
protected override void OnClosing(System.ComponentModel.CancelEventArgs e) { //clean up notifyicon (would otherwise stay open until application finishes) TaskbarIcon.Dispose(); base.OnClosing(e); }
public MainWindow() { AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException; Application.Current.DispatcherUnhandledException += ApplicationThreadException; Classes.ReportCompatabilityCleanup clean = new Classes.ReportCompatabilityCleanup(); InitializeComponent(); buildString = String.Format("Scoreboard : Build v" + Classes.UsefulFunctions.checkVersion().ToString() + " " + Classes.UsefulFunctions.RetrieveLinkerTimestamp().ToString()); //Check if the program is already open, if so exit imediately if (checkIfAlreadyExists() == true) { TaskbarIcon.Dispose(); MessageBox.Show("KeeperScoreboard Already Running"); MessageBox.Show("KeeperScoreboard Already Running"); Environment.Exit(0); } reloadReports(); reloadServers(); loadSettings(); this.Title = buildString; Classes.CheckUpdate update = new Classes.CheckUpdate(); // int i = 0 / crash(); TaskbarIcon.ToolTip = buildString; }
protected override void OnClosed(EventArgs e) { base.OnClosed(e); //close the notify icon notifyIcon.Dispose(); }
public TrayIconViewModel(App app) { _theApp = app; _trayIcon = (TaskbarIcon)app.FindResource("TrayIcon"); if (_trayIcon == null) { return; } InTray = false; _trayIcon.DataContext = this; // TODO: Load from settings if (!_trayModeEnabled) { _trayIcon.Visibility = Visibility.Collapsed; _trayIcon.Dispose(); return; } var cm = new ContextMenu(); cm.Items.Add(new MenuItem { Header = "Exit Tray Sample App", Command = ExitApplication }); _trayIcon.ContextMenu = cm; _theApp.MainWindow.Closing += MainWindow_Closing; }
protected override void OnExit(ExitEventArgs e) { NotifyIconViewModel.Current.CleanUp(); notifyIcon.Dispose(); //the icon would clean up automatically, but this is cleaner hotkeyManager.Dispose(); base.OnExit(e); }
protected override void OnExit(ExitEventArgs e) { WallpaperManager.Dispose(); NLog.LogManager.Shutdown(); notifyIcon.Dispose(); base.OnExit(e); }
protected override void OnExit(ExitEventArgs e) { notifyIcon.Dispose(); //the icon would clean up automatically, but this is cleaner timer.Stop(); base.OnExit(e); }
private void CleanupNotifyIcon() { if (notifyIcon != null) { notifyIcon.Dispose(); } }
protected override void OnExit(ExitEventArgs e) { LiveWallpaperEngineAPI.WallpaperManager.Instance.Dispose(); NLog.LogManager.Shutdown(); notifyIcon.Dispose(); base.OnExit(e); }
private void DXWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { MessageBoxResult msgBoxResult = WinUIMessageBox.Show("Are you sure you want to exit?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning); if (msgBoxResult == MessageBoxResult.Yes) { string query = "delete from Programs"; ExecuteQuery(query); for (int i = 0; i < programs.Count; i++) { string insertQuery = "INSERT INTO Programs (Id, Title, ProcessName, Brightness, Directory) VALUES('" + i + "', '" + programsTitleList[i] + "','" + programs[i] + "','" + brightnesses[i] + "','" + directoriesList[i] + "')"; ExecuteQuery(insertQuery); } TaskbarIcon.Dispose(); Application.Current.Shutdown(); } else { e.Cancel = true; return; } }
protected override void OnExit(ExitEventArgs e) { notifyIcon.Dispose(); SingleInstance <App> .Cleanup(); base.OnExit(e); }
public void Dispose() { icon.TrayBalloonTipClicked -= icon_TrayBalloonTipClicked; icon.TrayLeftMouseDown -= icon_TrayMouseDown; icon.TrayRightMouseDown -= icon_TrayMouseDown; icon.Dispose(); }
private void Form1_FormClosed(object sender, FormClosedEventArgs e) { receiver.Stop(); icon.Icon = null; icon.Dispose(); }
/// <summary> /// Called when the plugin shuts down. /// </summary> public override void OnShutdown( ) { using (var key = Registry.CurrentUser.OpenSubKey(FeatureBrowserEmulation, true)) { if (key != null) { var valueNames = key.GetValueNames( ).ToList( ); if (valueNames.Contains("ReadiMon.vshost.exe")) { key.DeleteValue("ReadiMon.vshost.exe"); } if (valueNames.Contains("ReadiMon.exe")) { key.DeleteValue("ReadiMon.exe"); } } } if (_notifyIcon != null) { _notifyIcon.Dispose( ); } base.OnShutdown( ); }
private void App_OnExit(object sender, ExitEventArgs e) { if (!_taskbarIcon.IsDisposed) { _taskbarIcon.Dispose(); } }
protected override void OnExit(ExitEventArgs e) { FipHandler.Close(); _notifyIcon.Dispose(); //the icon would clean up automatically, but this is cleaner _hwInfoTokenSource.Cancel(); var hwInfoToken = _hwInfoTokenSource.Token; try { HWInfoTask?.Wait(hwInfoToken); } catch (OperationCanceledException) { Log.Info("HWInfo background task ended"); } finally { _hwInfoTokenSource.Dispose(); } Log.Info("exiting"); base.OnExit(e); }
protected override void OnClosed(EventArgs e) { base.OnClosed(e); //the notify icon only closes automatically on WPF applications //-> dispose the notify icon manually notifyIcon.Dispose(); }
public void Dispose() { if (TaskbarIcon != null) { TaskbarIcon.Visibility = Visibility.Collapsed; TaskbarIcon.Dispose(); } }
protected override void OnExit(ExitEventArgs e) { trayIcon?.Dispose(); serviceProvider.Dispose(); OverlayController.Dispose(); PredictionController.Dispose(); base.OnExit(e); }
protected override void OnDetaching() { base.OnDetaching(); icon.TrayMouseDoubleClick -= OnTrayDoubleClick; icon.Dispose(); AssociatedObject.Closing -= OnWindowClosing; hwndSource.RemoveHook(OnHwndSourceHook); }
//on main window closing protected override void OnClosing(System.ComponentModel.CancelEventArgs e) { //need to hide all visible objects before closing window, or thay will stay visible taskbarIcon.CloseBalloon(); taskbarIcon.Dispose(); base.OnClosing(e); }
protected override void OnExit(ExitEventArgs e) { notifyIcon.Dispose(); displayRootRegistry.UnregisterWindowType <MainViewModel>(); displayRootRegistry.UnregisterWindowType <DialogViewModel>(); displayRootRegistry.UnregisterWindowType <ReklamaViewModel>(); base.OnExit(e); }
public void Dispose() { if (icon != null) { icon.Dispose(); icon = null; } }
public void Dispose() { if (_trayIcon != null) { _trayIcon.Dispose(); _trayIcon = null; } }
private void MainWindow_OnClosing(object sender, CancelEventArgs e) { if (TaskbarIcon != null) { TaskbarIcon.Icon = null; TaskbarIcon.Dispose(); } }
protected override void OnExit(ExitEventArgs e) { base.OnExit(e); taskbarIcon.Dispose(); connectivityMonitor.Dispose(); soundPlayeronhb.Dispose(); SoundPlayertransition_on.Dispose(); }
public void RemoveNotifyIcon() { if (notifyIcon != null) { notifyIcon.Visibility = Visibility.Hidden; notifyIcon.Dispose(); } }
private static void exit(object sender, EventArgs e) { if (RU.IsInitialized) { RU.Close(); } tbi.Dispose(); }