Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/09/19 14:58:24 (6 years ago)
Author:
chaider
Message:

#2971

  • Fixes and updates in IntervalConstraintView
  • Changed Parser
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/ParsedConstraintView.cs

    r16772 r16773  
    11using System;
    2 using System.Collections.Generic;
    3 using System.ComponentModel;
    4 using System.Drawing;
    5 using System.Data;
    6 using System.Linq;
    7 using System.Text;
    8 using System.Threading.Tasks;
    9 using System.Windows.Forms;
     2
    103using HeuristicLab.Core;
    114using HeuristicLab.MainForm;
     
    2114      set => base.Content = value;
    2215    }
     16
    2317    public ParsedConstraintView() {
    2418      InitializeComponent();
     
    3832
    3933    private ItemList<IntervalConstraint> ParseConstraints(string input) {
    40       ItemList<IntervalConstraint> constraints = new ItemList<IntervalConstraint>(IntervalConstraintsParser.Parse(input));
     34      ItemList<IntervalConstraint> constraints = new ItemList<IntervalConstraint>(IntervalConstraintsParser.ParseInput(input, Content.TargetVariable, Content.AllowedVariables));
    4135      return constraints;
    42     }
    43 
    44     private string ConstraintsOutput(IEnumerable<IntervalConstraint> constraints) {
    45       var result = "";
    46       var count = 1;
    47       foreach (var constraint in constraints) {
    48         result += "Constraint #" + count + ": " + Environment.NewLine;
    49         result += constraint.Expression + Environment.NewLine + Environment.NewLine;
    50         count++;
    51       }
    52 
    53       return result;
    5436    }
    5537
Note: See TracChangeset for help on using the changeset viewer.