protected override void OnClosing(CancelEventArgs e) { base.OnClosing(e); Settings.SetValue("Ketarin", "ShowGroups", olvJobs.ShowGroups); Settings.SetValue("Ketarin", "ShowStatusBar", statusBar.Visible); Settings.SetValue("Ketarin", "ShowLog", mnuLog.Checked); Settings.SetValue("Ketarin", "AutoScroll", mnuAutoScroll.Checked); if (m_Updater.IsBusy) { e.Cancel = true; } else { LogDialog.Instance.Close(); } }
/// <summary> /// Checks for which of the given applications updates /// are available asynchronously. /// </summary> public void BeginCheckForOnlineUpdates(ApplicationJob[] jobs) { DateTime lastUpdate = (DateTime)Settings.GetValue("LastUpdateCheck", DateTime.MinValue); if (lastUpdate.Date == DateTime.Now.Date) { // Only check once a day return; } Settings.SetValue("LastUpdateCheck", DateTime.Now); Thread thread = new Thread(this.CheckForOnlineUpdates) { IsBackground = true }; thread.Start(jobs); }