Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/12/19 10:32:44 (5 years ago)
Author:
chaider
Message:

#2971
-Fixed Dispose problem
-Added event handling for item selection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Parser/IntervalConstraint.cs

    r16776 r16777  
    4949    public int NumberOfDerivation { get; set; }
    5050
    51     public IntervalConstraint() {}
     51    private bool isChecked;
     52    public bool IsChecked {
     53      get => isChecked;
     54      set {
     55        if (value != isChecked) {
     56          isChecked = value;
     57          OnChanged(EventArgs.Empty);
     58        }
     59      }
     60    }
     61
     62    public IntervalConstraint() {
     63      name = "Empty";
     64      expression = "Empty";
     65      Interval = new Interval(0, 0);
     66      inclusiveLowerBound = true;
     67      inclusiveLowerBound = true;
     68      IsDerivation = false;
     69      isChecked = false;
     70    }
    5271
    5372    public IntervalConstraint(string name) {
    5473      base.name = name;
     74      IsChecked = true;
    5575    }
    5676
    5777    public IntervalConstraint(string expression, string definition, Interval interval, bool inclusiveLowerBound,
    58       bool inclusiveUpperBound, bool isDerivation, string variable, int numberOfDerivation) {
     78      bool inclusiveUpperBound, bool isDerivation, string variable, int numberOfDerivation, bool isChecked) {
    5979      base.name = expression;
    6080      Expression = expression;
     
    6686      Variable = variable;
    6787      NumberOfDerivation = numberOfDerivation;
     88      IsChecked = isChecked;
    6889    }
    6990
     
    82103      this.Variable = original.Variable;
    83104      this.NumberOfDerivation = original.NumberOfDerivation;
     105      this.isChecked = original.isChecked;
    84106    }
    85107
Note: See TracChangeset for help on using the changeset viewer.