protected override void OnPause() { base.OnPause(); var tasks = new Tasks(); tasks.RestoreTasks(); }
protected override void OnContinue() { var tasks = new Tasks(); tasks.RestoreTasks(); base.OnContinue(); }
protected override void OnStart(string[] args) { var tasks = new Tasks(); tasks.RestoreTasks(); base.OnStart(args); }
private void UtilityDashboard_Load(object sender, EventArgs e) { Settings.Init(); var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); config.AppSettings.Settings["ApiKey"].Value = Settings.GetApiKey(); config.Save(ConfigurationSaveMode.Modified); ConfigurationManager.RefreshSection("appSettings"); if (!string.IsNullOrEmpty(config.AppSettings.Settings["ApiKey"].Value)) { Settings.SetupUserConfig(config.AppSettings.Settings["ApiKey"].Value); } var Tasks = new Tasks(); Tasks.RestoreTasks(); Log.PurgeLog(); }