Esempio n. 1
0
        /// <summary>
        /// This method is called when the addScheduleToolStripMenuItem's Click event has been fired.
        /// </summary>
        /// <param name="sender">The <see cref="object"/> that fired the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> of the event.</param>
        private void addScheduleToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ScheduleForm sf = new ScheduleForm();

            if (sf.ShowDialog(this) == DialogResult.OK)
            {
                try {
                    sf.Job.Persist();
                    RefreshJobs();
                } catch (Exception ex) {
                    MessageBox.Show("Error saving schedule: {0}{1}".FillBlanks(Environment.NewLine, ex.Message));
                    return;
                }
            }
        }
Esempio n. 2
0
 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;
         }
     }
 }
Esempio n. 3
0
        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;
                }
            }
        }
Esempio n. 4
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;
         }
     }
 }