private void _HideBalloon() { Taskbar.Show(); _allowExit = true; notifyIconMain.Visible = false; Hide(); }
private static void Run() { AppDomain.CurrentDomain.ProcessExit += OnProcessExit; Taskbar.Show(); Debug.WriteLine(Setting.Instance); SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); CheckBattery(); GlobalConfiguration.Configuration.UseMemoryStorage(); //FormMain.Instance.ShowBalloon(Setting.Instance.MinBatteryAlertTitle, Setting.Instance.MinBatteryAlertMessage,false); using (new BackgroundJobServer()) { RecurringJob.AddOrUpdate("Main", () => CheckBattery(), Cron.Minutely); Application.Run(); } }
private static void OnProcessExit(object sender, EventArgs e) { Taskbar.Show(); }