private readonly int _time; //Variable time in query, -1 means no time.

        #endregion Fields

        #region Constructors

        public ConditionAtTimeQuery(QuestionType questionType, string condition, int time = -1)
            : base(QueryType.SatisfyConditionAtTime, questionType)
        {
            _condition = condition;
            _time = time;
            _logicExp = new SimpleLogicExpression(_condition);
            _fluentNames = _logicExp.GetFluentNames();

            _logger.Info("Creates:\n " + this);
        }
        public AccesibleConditionQuery(QuestionType questionType, string condition, ScenarioDescription scenario)
            : base(QueryType.AccesibleCondition, questionType)
        {
            _queryType = QueryType.AccesibleCondition;
            _condition = condition;
            var logicExp = new SimpleLogicExpression(this._condition);
            _fluentNames = logicExp.GetFluentNames();
            _scenario = scenario;

            ExecQuery = new ExecutableScenarioQuery(QuestionType.Ever, _scenario);
            CondAtTimeQuery = new ConditionAtTimeQuery(QuestionType.Ever, _condition);

            _logger.Info("Creates:\n " + this);
        }
 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.";
         }
     }
 }
 public SimpleLogicExpression(SimpleLogicExpression logicExpression)
 {
     this._expression = logicExpression._expression;
 }
 public SimpleLogicExpression(SimpleLogicExpression logicExpression)
 {
     this._expression = logicExpression._expression;
 }