예제 #1
0
 private void AnswersDemo_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (AnswerList.SelectedIndex < 0)
     {
         TestsDemo.Clear();
         AnswersDemo.IsEnabled = false;
         return;
     }
     TestFilesButtons.Check();
 }
예제 #2
0
 private void TestsWindowSave_Click(object sender, RoutedEventArgs e)
 {
     if (TestList.SelectedIndex != -1)
     {
         var test = Tests[TestList.SelectedIndex];
         if (test != null)
         {
             File.WriteAllText(test, TestsDemo.Text);
         }
     }
     if (AnswerList.SelectedIndex != -1)
     {
         var answer = Answers[AnswerList.SelectedIndex];
         if (answer != null)
         {
             File.WriteAllText(answer, AnswersDemo.Text);
         }
     }
     TestFilesButtons.Check();
 }
예제 #3
0
 private void TestsWindowCancel_Click(object sender, RoutedEventArgs e)
 {
     TestsDemo.Text   = SelectedTest;
     AnswersDemo.Text = SelectedAnswer;
     TestFilesButtons.Check();
 }