Beispiel #1
0
 private void SelectEvaluationPage_Unloaded(object sender, RoutedEventArgs e)
 {
     Evaluation.EvaluationDictionary.Clear();
     Evaluation.FailedEvaluationValues.Clear();
     if (Evaluation is Percent)
     {
         foreach (EvaluationSelectElement element in PercentList.Children)
         {
             Evaluation.AddEvaluationElement(Convert.ToInt32(element.ValueContent.Text.Substring(0, element.ValueContent.Text.Length - 1)), element.TextContent.Text);
             if (element.CheckBoxFailed.IsChecked == true)
             {
                 Evaluation.AddFailedEvaluationValue(Convert.ToInt32(element.ValueContent.Text.Substring(0, element.ValueContent.Text.Length - 1)));
             }
         }
     }
     else
     {
         (Evaluation as Points).UpdateMaxPoints(MaxPoints);
         Evaluation.EvaluationDictionary.Clear();
         foreach (EvaluationSelectElement element in PointsList.Children)
         {
             Evaluation.AddEvaluationElement(Convert.ToInt32(element.ValueContent.Text), element.TextContent.Text);
             if (element.CheckBoxFailed.IsChecked == true)
             {
                 Evaluation.AddFailedEvaluationValue(Convert.ToInt32(element.ValueContent.Text));
             }
         }
     }
     if (ReturnData != null)
     {
         ReturnData(new object[] { Evaluation }, CreateTestTypePage.SelectEvaluationPage);
     }
 }