Beispiel #1
0
 private void OK_Click(object sender, RoutedEventArgs e)
 {
     //create/update scheduled task
     if (!String.IsNullOrEmpty(Username.Text) && (!String.IsNullOrEmpty(Password.Password)))
     {
         var certifyManager = new Certify.Management.CertifyManager();
         if (certifyManager.CreateWindowsScheduledTask(Username.Text, Password.Password))
         {
             MessageBox.Show(SR.ScheduledTaskConfig_TaskCreated);
             this.Close();
         }
         else
         {
             MessageBox.Show(SR.ScheduledTaskConfig_FailedToCreateTask);
         }
     }
     else
     {
         MessageBox.Show(SR.ScheduledTaskConfig_PleaseProvideCredential);
     }
 }
Beispiel #2
0
 private void OK_Click(object sender, RoutedEventArgs e)
 {
     //create/update scheduled task
     if (!String.IsNullOrEmpty(Username.Text) && (!String.IsNullOrEmpty(Password.Password)))
     {
         var certifyManager = new Certify.Management.CertifyManager();
         if (certifyManager.CreateWindowsScheduledTask(Username.Text, Password.Password))
         {
             MessageBox.Show("Scheduled task created");
             this.Close();
         }
         else
         {
             MessageBox.Show("Failed to create scheduled task with given credentials");
         }
     }
     else
     {
         MessageBox.Show("Please provide the username and password for an admin level user.");
     }
 }