Example #1
0
 private void button1_Click(object sender, RoutedEventArgs e)
 {
     CoreEdit.direct_command("shutdown /a");
     textBox.Visibility    = Visibility.Visible;
     label_Copy.Visibility = Visibility.Visible;
     button1.Visibility    = Visibility.Hidden;
 }
Example #2
0
 private void button_Copy_Click(object sender, RoutedEventArgs e)
 {
     if (textBox.Text == "")
     {
         return;
     }
     try
     {
         CoreEdit.direct_command("shutdown /s /t " + Convert.ToInt32(Convert.ToDouble(textBox.Text) * 60));
         textBox.Visibility    = Visibility.Hidden;
         label_Copy.Visibility = Visibility.Hidden;
         button1.Visibility    = Visibility.Visible;
     }
     catch
     {
         CoreEdit.direct_command("shutdown /a");
     }
 }