private void PostponeButton_Click(object sender, RoutedEventArgs e)
 {
     // get the number of minute
     if (PostponeComboBox.SelectedItem.Equals(OneMinItem))
     {
         numberOfMinute = 1;
     }
     else if (PostponeComboBox.SelectedItem.Equals(FiveMinItem))
     {
         numberOfMinute = 5;
     }
     else if (PostponeComboBox.SelectedItem.Equals(TenMinItem))
     {
         numberOfMinute = 10;
     }
     else if (PostponeComboBox.SelectedItem.Equals(ThirtyMinItem))
     {
         numberOfMinute = 30;
     }
     else if (PostponeComboBox.SelectedItem.Equals(OneHourItem))
     {
         numberOfMinute = 60;
     }
     else if (PostponeComboBox.SelectedItem.Equals(EightHourItem))
     {
         numberOfMinute = 480;
     }
     else if (PostponeComboBox.SelectedItem.Equals(OneDayItem))
     {
         numberOfMinute = 1440;
     }
     commonSet.PostponePrintingTime(numberOfMinute);
     commonSet.SaveNextTime();
     this.Close();
 }
        private void ApplyButton_Click(object sender, RoutedEventArgs e)
        {
            // save the configuration
            commonSet.SaveConfiguration();

            // apply the autostart setting
            commonSet.ApplyAutoStartSetting(AutoStartCheckBox.IsChecked.Value);

            // save the time of next printing
            commonSet.ComputeNextTime();
            commonSet.SaveNextTime();

            MessageBox.Show("Configuration saved");

            // update scheduled time
            commonSet.LoadNextTime();
            ScheduledTimeTextBlock.Text = commonSet.loadedNextPrintingTime.ToString();
        }