public void JobRemoved(JenkinsJob Job)
 {
     this.Dispatcher.Invoke(new Action(() =>
     {
         list_jobs.Items.Remove(Job);
         RefreshJobList();
     }));
     persistor.PersistJobs(sentinel);
 }
        private void btn_save_job_Click(object sender, RoutedEventArgs e)
        {
            string jobName = txt_job_name.Text;

            if (jobName == String.Empty)
            {
                jobName = currentJob.JobUrl;
            }
            currentJob.RemoveIfCompleted = check_remove_done_job.IsChecked.Value;

            currentJob.NotifySettings = new NotifySettings
            {
                NotifyWhenJobBecomesGreen = check_notify_green.IsChecked.Value,
                NotifyWhenJobBecomesRed   = check_notify_red.IsChecked.Value,
                NotifyWhenJobStateChanges = check_notify_status_changes.IsChecked.Value,
                NotifyWhenBuildIsComplete = check_notify_build_completed.IsChecked.Value
            };
            persistor.PersistJobs(sentinel);
            jobs.Items.Refresh();
            this.Close();
        }