예제 #1
0
        public ScheduledTaskConfig()
        {
            InitializeComponent();
            //check if scheduled task already configured

            var certifyManager = new Certify.Management.CertifyManager();

            TaskConfigured = certifyManager.IsWindowsScheduledTaskPresent();

            if (TaskConfigured)
            {
                AutoRenewPrompt.Text       = SR.ScheduledTaskConfig_AlreadyConfiged;
                AutoRenewPrompt.Foreground = Brushes.DarkGreen;
            }
        }
예제 #2
0
        public ScheduledTaskConfig()
        {
            InitializeComponent();
            //check if scheduled task already configured

            var certifyManager = new Certify.Management.CertifyManager();

            TaskConfigured = certifyManager.IsWindowsScheduledTaskPresent();

            if (TaskConfigured)
            {
                AutoRenewPrompt.Text       = "The auto renewal task is already configured. If required you can change the admin user account used to execute the task.";
                AutoRenewPrompt.Foreground = Brushes.DarkGreen;
            }
        }
예제 #3
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);
     }
 }
예제 #4
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.");
     }
 }