コード例 #1
0
 private void CleanValues()
 {
     ActionAdd.CleanValues();
     ObservationAdd.CleanValues();
     ActionList.CleanValues();
     LabelValidationScenario.Content = String.Empty;
 }
コード例 #2
0
 private void ButtonAddObservation_Click(object sender, RoutedEventArgs e)
 {
     if (String.IsNullOrEmpty(ObservationAdd.Expression))
     {
         ObservationAdd.LabelValidation.Content = "It is necessary to fill expression.";
     }
     else
     {
         ILogicExpression expression = new SimpleLogicExpression(ObservationAdd.Expression);
         if (ValidationExpression(expression) && ActionList.AddObservation(ObservationAdd.Time, ObservationAdd.Expression))
         {
             _scenarioDescription.observations.Add(new ScenarioObservationRecord(expression, ObservationAdd.Time));
             ObservationAdd.CleanValues();
         }
         else
         {
             ObservationAdd.LabelValidation.Content = "Expression is incorrect.";
         }
     }
 }