private void btnEdit_Click( object sender, EventArgs e )
 {
     ScheduleForm sf = new ScheduleForm( job );
     if( sf.ShowDialog( this ) == DialogResult.OK ) {
         try {
             sf.Job.Persist();
             //if( !string.Equals( job.Name, sf.Job.Name ) ) {
                 Form1.Instance.RefreshJobs();
             //}
         } catch( Exception ex ) {
             MessageBox.Show( "Error saving schedule: {0}".FillBlanks( ex.Message ) );
             return;
         }
     }
 }
Beispiel #2
0
 void ShowJobSettings( object sender, EventArgs e )
 {
     MenuItem si = sender as MenuItem;
     if( si == null ) {
         return;
     }
     BackupScheduleWrapper job = Configuration.GetSchedule( (int)si.Tag );
     ScheduleForm sf = new ScheduleForm( job );
     sf.ShowInTaskbar = true;
     if( sf.ShowDialog( this ) == DialogResult.OK ) {
         try {
             sf.Job.Persist();
         } catch( Exception ex ) {
             MessageBox.Show( "Error saving schedule: {0}".FillBlanks( ex.Message ) );
             return;
         }
     }
 }