Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17249


Ignore:
Timestamp:
09/12/19 14:13:02 (5 years ago)
Author:
chaider
Message:

#2971 Added label which indicates unparsed changes at constaints input view

Location:
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4
Files:
2 edited

Legend:

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

    r17146 r17249  
    6868
    6969    private IEnumerable<IntervalConstraint> ParseConstraints(string input) {
    70       return IntervalConstraintsParser.ParseInput(input, Content.ProblemData.TargetVariable,
    71         Content.ProblemData.AllowedInputVariables);
     70        return IntervalConstraintsParser.ParseInput(input, Content.ProblemData.TargetVariable,
     71          Content.ProblemData.AllowedInputVariables);
    7272    }
    7373
     
    125125
    126126    private void constraintsInput_TextChanged(object sender, EventArgs e) {
    127       errorOutput.Text = "Unparsed changes! Press parse button to save changes.";
    128       Content.Input = constraintsInput.Text;
     127      if (Content.Input != constraintsInput.Text) {
     128        errorOutput.Text = "Unparsed changes! Press parse button to save changes.";
     129        Content.Input = constraintsInput.Text;
     130      } else {
     131        errorOutput.Text = "";
     132      }
     133
    129134    }
    130135
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataConstraintView.designer.cs

    r17146 r17249  
    2020#endregion
    2121using System;
     22using System.Drawing;
     23using System.Windows.Forms;
     24using HeuristicLab.Core.Views;
    2225
    2326namespace HeuristicLab.Problems.DataAnalysis.Views {
     
    5154      this.constraintsInput = new System.Windows.Forms.TextBox();
    5255      this.parseBtn = new System.Windows.Forms.Button();
     56      this.errorOutput = new System.Windows.Forms.Label();
    5357      this.label1 = new System.Windows.Forms.Label();
    54       this.intervalConstraintsView = new HeuristicLab.Core.Views.CheckedItemListView<IntervalConstraint>();
    55       this.errorOutput = new System.Windows.Forms.Label();
     58      this.intervalConstraintsView = new CheckedItemListView<IntervalConstraint>();
    5659      ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
    5760      this.splitContainer1.Panel1.SuspendLayout();
     
    8285      this.groupBox1.Controls.Add(this.constraintsInput);
    8386      this.groupBox1.Controls.Add(this.parseBtn);
     87      this.groupBox1.Controls.Add(this.errorOutput);
    8488      this.groupBox1.Controls.Add(this.label1);
    8589      this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
     
    9599      this.constraintsInput.AcceptsTab = true;
    96100      this.constraintsInput.Dock = System.Windows.Forms.DockStyle.Fill;
    97       this.constraintsInput.Location = new System.Drawing.Point(3, 198);
     101      this.constraintsInput.Location = new System.Drawing.Point(3, 185);
    98102      this.constraintsInput.Multiline = true;
    99103      this.constraintsInput.Name = "constraintsInput";
     
    106110      //
    107111      this.parseBtn.Dock = System.Windows.Forms.DockStyle.Bottom;
    108       this.parseBtn.Location = new System.Drawing.Point(3, 603);
     112      this.parseBtn.Location = new System.Drawing.Point(3, 590);
    109113      this.parseBtn.Name = "parseBtn";
    110114      this.parseBtn.Size = new System.Drawing.Size(290, 23);
     
    114118      this.parseBtn.Click += new System.EventHandler(this.parseBtn_Click);
    115119      //
     120      // errorOutput
     121      //
     122      this.errorOutput.AutoSize = true;
     123      this.errorOutput.ForeColor = Color.DarkRed;
     124      this.errorOutput.Dock = System.Windows.Forms.DockStyle.Bottom;
     125      this.errorOutput.Location = new System.Drawing.Point(3, 613);
     126      this.errorOutput.Name = "errorOutput";
     127      this.errorOutput.Size = new System.Drawing.Size(35, 13);
     128      this.errorOutput.TabIndex = 3;
     129      this.errorOutput.Text = "label2";
     130      //
    116131      // label1
    117132      //
     
    120135      this.label1.Location = new System.Drawing.Point(3, 16);
    121136      this.label1.Name = "label1";
    122       this.label1.Size = new System.Drawing.Size(250, 182);
     137      this.label1.Size = new System.Drawing.Size(354, 169);
    123138      this.label1.TabIndex = 0;
    124139      this.label1.Text = "To define target variable constraints:" + Environment.NewLine +
     
    138153      //
    139154      this.intervalConstraintsView.Dock = System.Windows.Forms.DockStyle.Fill;
    140       this.intervalConstraintsView.Location = new System.Drawing.Point(3, 16);
     155      this.intervalConstraintsView.Location = new System.Drawing.Point(0, 0);
    141156      this.intervalConstraintsView.Name = "intervalConstraintsView";
    142       this.intervalConstraintsView.Size = new System.Drawing.Size(582, 587);
     157      this.intervalConstraintsView.Size = new System.Drawing.Size(588, 20);
    143158      this.intervalConstraintsView.TabIndex = 2;
    144159      //
    145       // errorOutput
    146       //
    147       this.errorOutput.Dock = System.Windows.Forms.DockStyle.Bottom;
    148       this.errorOutput.ForeColor = System.Drawing.Color.Red;
    149       this.errorOutput.Location = new System.Drawing.Point(3, 603);
    150       this.errorOutput.Name = "errorOutput";
    151       this.errorOutput.Size = new System.Drawing.Size(582, 23);
    152       this.errorOutput.TabIndex = 1;
    153       this.errorOutput.Text = "ERROR";
    154       this.errorOutput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
    155       //
    156       // ParsedConstraintView
     160      // ProblemDataConstraintView
    157161      //
    158162      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    159163      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    160164      this.Controls.Add(this.splitContainer1);
    161       this.Name = "ParsedConstraintView";
     165      this.Name = "ProblemDataConstraintView";
    162166      this.Size = new System.Drawing.Size(888, 629);
    163167      this.splitContainer1.Panel1.ResumeLayout(false);
    164168      this.splitContainer1.Panel2.ResumeLayout(false);
     169      this.splitContainer1.Panel2.PerformLayout();
    165170      ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
    166171      this.splitContainer1.ResumeLayout(false);
     
    179184    private HeuristicLab.Core.Views.CheckedItemListView<IntervalConstraint> intervalConstraintsView;
    180185    private System.Windows.Forms.TextBox constraintsInput;
    181     private System.Windows.Forms.Label errorOutput;
    182 
     186    private Label errorOutput;
    183187  }
    184188}
Note: See TracChangeset for help on using the changeset viewer.