public void ApplySettings() { if (chkStartScheduler.Checked) { bool needToSave = false; if (chkOverrideMaxActive.Checked) { Settings.Default.MaxJobs = (int)numMaxJobs.Value; needToSave = true; } if (chkDisableWorkOnlyAt.Checked) { Settings.Default.WorkOnlyOnSpecifiedTimes = false; needToSave = true; } if (needToSave) { Settings.Default.Save(); } AutoDownloadsExtension scheduler = (AutoDownloadsExtension)AppManager.Instance. Application.GetExtensionByType(typeof(AutoDownloadsExtension)); scheduler.Active = true; } }
private void DownloadList_Load(object sender, EventArgs e) { DownloadManager.Instance.BeginAddBatchDownloads += Instance_BeginAddBatchDownloads; DownloadManager.Instance.EndAddBatchDownloads += Instance_EndAddBatchDownloads; scheduler = App.Instance.GetExtensionByType <AutoDownloadsExtension>(); }
private void DownloadList_Load(object sender, EventArgs e) { DownloadManager.Instance.BeginAddBatchDownloads += new EventHandler(Instance_BeginAddBatchDownloads); DownloadManager.Instance.EndAddBatchDownloads += new EventHandler(Instance_EndAddBatchDownloads); scheduler = (AutoDownloadsExtension)App.Instance.GetExtensionByType(typeof(AutoDownloadsExtension)); clipMonitor = new ClipboardMonitor(this, this.Handle); this.Disposed += delegate(object snd, EventArgs ea) { clipMonitor.Dispose(); }; }