Exemple #1
0
 void GetNextProblemOrNewTheory()
 {
     if (!Data.choosedCourseDirectory.Contains(Data.GetCurrentTheme() + "\\Theory"))
     {
         List <string> currentShortProblems = new List <string>();
         currentShortProblems = Data.GetShortProblemNames(Data.GetCurrentTheme());
         string gk = Data.GetCurrentProblem().Substring(Data.GetCurrentTheme().Length + 1);
         int    currentProblemNumber = currentShortProblems.IndexOf(gk);
         if (currentShortProblems.Count - 1 > currentProblemNumber)
         {
             Data.choosedCourseDirectory = Data.courseDirectory + Data.GetCurrentTheme() + "\\" + currentShortProblems.ElementAt(currentProblemNumber + 1);
             choosingProblemOrTheory     = "\\Problem";
         }
         else
         {
             int currentCourseNumber = Data.courses.IndexOf(Data.GetCurrentTheme());
             if (Data.courses.Count - 1 > currentCourseNumber)
             {
                 choosingProblemOrTheory     = "";
                 Data.choosedCourseDirectory = Data.courseDirectory + Data.courses.ElementAt(currentCourseNumber + 1) + "\\Theory";
             }
             else
             {
                 MessageBox.Show("Поздравляем с окончанием курса!");
                 end = true;
             }
         }
     }
     else
     {
         choosingProblemOrTheory     = "\\Problem";
         Data.choosedCourseDirectory = Data.courseDirectory + Data.GetCurrentTheme() + "\\" + Data.GetFirstProblem(Data.GetCurrentTheme());
     }
 }
Exemple #2
0
 private void ThemeOpen_Click(object sender, RoutedEventArgs e)
 {
     Problems.ItemsSource = Data.GetShortProblemNames(Themes.SelectedItem.ToString());
 }