Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/12/21 14:00:36 (4 years ago)
Author:
gkronber
Message:

#3073: intermediate comment while refactoring the branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataConstraintView.cs

    r17607 r17887  
    3232namespace HeuristicLab.Problems.DataAnalysis.Views {
    3333  [View("ParsedConstraint View")]
    34   [Content(typeof(ProblemDataConstraint), true)]
     34  [Content(typeof(ShapeConstraints), true)]
    3535  public partial class ProblemDataConstraintView : AsynchronousContentView {
    36     private readonly CheckedItemList<IntervalConstraint>
    37       intervalConstraints = new CheckedItemList<IntervalConstraint>();
     36    private readonly CheckedItemList<ShapeConstraint>
     37      intervalConstraints = new CheckedItemList<ShapeConstraint>();
    3838
    39     public new ProblemDataConstraint Content {
    40       get => (ProblemDataConstraint) base.Content;
     39    public new ShapeConstraints Content {
     40      get => (ShapeConstraints) base.Content;
    4141      set => base.Content = value;
    4242    }
     
    7373
    7474
    75     private IEnumerable<IntervalConstraint> ParseConstraints(string input) {
    76       return IntervalConstraintsParser.ParseInput(input, Content.ProblemData.TargetVariable,
     75    private IEnumerable<ShapeConstraint> ParseConstraints(string input) {
     76      return ShapeConstraintsParser.ParseInput(input, Content.ProblemData.TargetVariable,
    7777                                                  Content.ProblemData.AllowedInputVariables);
    7878    }
     
    9090        }
    9191        catch (ArgumentException ex) {
    92           Content.Constraints = new List<IntervalConstraint>();
     92          Content.Constraints = new List<ShapeConstraint>();
    9393          Content.InfoText    = ex.Message.Replace("Parameter name", "@Line");
    9494          Content.InfoColor   = Color.DarkRed;
     
    117117
    118118    private void constraint_Changed(object sender, EventArgs e) {
    119       var constraint = (IntervalConstraint) sender;
     119      var constraint = (ShapeConstraint) sender;
    120120      intervalConstraints.SetItemCheckedState(constraint, constraint.Enabled);
    121121    }
    122122
    123123    private void constraints_Updated(object                                                           sender,
    124                                      CollectionItemsChangedEventArgs<IndexedItem<IntervalConstraint>> e) {
     124                                     CollectionItemsChangedEventArgs<IndexedItem<ShapeConstraint>> e) {
    125125      foreach (var addedItem in e.Items) addedItem.Value.Changed += constraint_Changed;
    126126    }
    127127
    128     private void constraint_removed(object sender, CollectionItemsChangedEventArgs<IndexedItem<IntervalConstraint>> e) {
     128    private void constraint_removed(object sender, CollectionItemsChangedEventArgs<IndexedItem<ShapeConstraint>> e) {
    129129      foreach (var removedItem in e.Items) removedItem.Value.Changed -= constraint_Changed;
    130130    }
    131131
    132132    private void constraint_CheckedItemChanged(object                                                           sender,
    133                                                CollectionItemsChangedEventArgs<IndexedItem<IntervalConstraint>> e) {
    134       ICheckedItemList<IntervalConstraint> checkedItemList           = (ICheckedItemList<IntervalConstraint>) sender;
     133                                               CollectionItemsChangedEventArgs<IndexedItem<ShapeConstraint>> e) {
     134      ICheckedItemList<ShapeConstraint> checkedItemList           = (ICheckedItemList<ShapeConstraint>) sender;
    135135      foreach (var indexedItem in e.Items) indexedItem.Value.Enabled = checkedItemList.ItemChecked(indexedItem.Value);
    136136    }
Note: See TracChangeset for help on using the changeset viewer.