private void ApplySettings()
        {
            List <EchoScheduledTaskOptions> matchingJobs;

            // update registry
            try
            {
                if (StartupManager.IsRegisteredForStartup() != startWithWindowsCheckBox.Checked)
                {
                    if (startWithWindowsCheckBox.Checked)
                    {
                        StartupManager.RegisterStartupApplication();
                    }
                    else
                    {
                        StartupManager.UnregisterStartupApplication();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(string.Format("Failed to process startup changes. {0}", ex.GetBaseException().Message), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            // first remove deleted jobs
            matchingJobs = this.Manager.Where(j => _jobs.All(j2 => j.Id != j2.Id)).ToList();
            foreach (EchoScheduledTaskOptions options in matchingJobs)
            {
                this.Manager.KillJob(options.Id);
            }

            // remove and re-add any changed jobs
            foreach (EchoScheduledTaskOptions options in _jobs)
            {
                EchoScheduledTaskOptions originalJob;

                originalJob = this.Manager.SingleOrDefault(j => j.Id == options.Id);
                if (originalJob != null && !options.Equals(originalJob))
                {
                    this.Manager.KillJob(originalJob.Id);

                    this.Manager.Schedule(options);
                }
            }

            // now add the new jobs
            matchingJobs = _jobs.Where(j => this.Manager.All(j2 => j.Id != j2.Id)).ToList();
            foreach (EchoScheduledTaskOptions options in matchingJobs)
            {
                this.Manager.Schedule(options);
            }

            this.Manager.Save();
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            foreach (EchoScheduledTaskOptions job in this.Manager)
            {
                _jobs.Add(job.Clone());
            }

            try
            {
                startWithWindowsCheckBox.Checked = StartupManager.IsRegisteredForStartup();
            }
            catch (Exception ex)
            {
                MessageBox.Show(string.Format("Failed to obtain startup status. {0}", ex.GetBaseException().Message), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            foreach (EchoScheduledTaskOptions job in _jobs)
            {
                this.ListJob(job);
            }
        }