Exemple #1
0
 private void AnswersDemo_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (AnswerList.SelectedIndex < 0)
     {
         TestsDemo.Clear();
         AnswersDemo.IsEnabled = false;
         return;
     }
     TestFilesButtons.Check();
 }
Exemple #2
0
        private void TestList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            int index = TestList.SelectedIndex;

            if (index < 0)
            {
                TestsDemo.Clear();
                TestsDemo.IsEnabled = false;
                return;
            }
            AnswerList.SelectedIndex    = index >= Answers.Count ? -1 : index;
            TestsDemo.Text              = File.ReadAllText(Tests[index]);
            TestsWindowDelete.IsEnabled = true;
            TestsDemo.IsEnabled         = true;
        }