public void Execute(object parameter) { var p = GetParameter(parameter).Value; DesktopPanelToolService.SaveSettings(); if (p && AppSettings.EnableNotifications) { NotificationBarService.Notify("settings have been saved"); } }
protected override void OnExit(ExitEventArgs e) { try { base.OnExit(e); DesktopPanelToolService.SaveSettings(); } #if DEBUG catch (Exception ex) { DesktopPanelTool.Lib.Debug.WriteLine($"{ex}"); #else catch (Exception) { #endif } NotificationBarService.HideNotifyIcon(); // fix visual studio designer exception (bug) Environment.Exit(0); }