Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16898


Ignore:
Timestamp:
05/06/19 14:17:54 (5 years ago)
Author:
chaider
Message:

#2971

  • Added all fields to IntervalConstraintView
  • Rearanged fields
  • Updated NumberOfDerivation event
Location:
branches/2971_named_intervals
Files:
3 edited

Legend:

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

    r16862 r16898  
    4545    private void InitializeComponent() {
    4646      this.components = new System.ComponentModel.Container();
    47       this.definitionLabel = new System.Windows.Forms.Label();
    4847      this.lowerboundLabel = new System.Windows.Forms.Label();
    4948      this.upperboundLabel = new System.Windows.Forms.Label();
     
    5251      this.variableLabel = new System.Windows.Forms.Label();
    5352      this.numberderivationLabel = new System.Windows.Forms.Label();
    54       this.definitionInput = new System.Windows.Forms.TextBox();
    5553      this.upperboundInput = new System.Windows.Forms.TextBox();
    5654      this.lowerboundInput = new System.Windows.Forms.TextBox();
     
    6563      this.incllowerboundInput = new System.Windows.Forms.CheckBox();
    6664      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
     65      this.enabledLabel = new System.Windows.Forms.Label();
    6766      this.groupBox1.SuspendLayout();
    6867      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    6968      this.SuspendLayout();
    7069      //
    71       // definitionLabel
    72       //
    73       this.definitionLabel.AutoSize = true;
    74       this.definitionLabel.Location = new System.Drawing.Point(11, 72);
    75       this.definitionLabel.Name = "definitionLabel";
    76       this.definitionLabel.Size = new System.Drawing.Size(54, 13);
    77       this.definitionLabel.TabIndex = 1;
    78       this.definitionLabel.Text = "Definition:";
    79       //
    8070      // lowerboundLabel
    8171      //
    8272      this.lowerboundLabel.AutoSize = true;
    83       this.lowerboundLabel.Location = new System.Drawing.Point(11, 98);
     73      this.lowerboundLabel.Location = new System.Drawing.Point(8, 101);
    8474      this.lowerboundLabel.Name = "lowerboundLabel";
    8575      this.lowerboundLabel.Size = new System.Drawing.Size(69, 13);
     
    9080      //
    9181      this.upperboundLabel.AutoSize = true;
    92       this.upperboundLabel.Location = new System.Drawing.Point(11, 123);
     82      this.upperboundLabel.Location = new System.Drawing.Point(8, 126);
    9383      this.upperboundLabel.Name = "upperboundLabel";
    9484      this.upperboundLabel.Size = new System.Drawing.Size(69, 13);
     
    9989      //
    10090      this.incllowerboundLabel.AutoSize = true;
    101       this.incllowerboundLabel.Location = new System.Drawing.Point(11, 149);
     91      this.incllowerboundLabel.Location = new System.Drawing.Point(8, 153);
    10292      this.incllowerboundLabel.Name = "incllowerboundLabel";
    10393      this.incllowerboundLabel.Size = new System.Drawing.Size(92, 13);
     
    10898      //
    10999      this.inclupperboundLabel.AutoSize = true;
    110       this.inclupperboundLabel.Location = new System.Drawing.Point(11, 174);
     100      this.inclupperboundLabel.Location = new System.Drawing.Point(8, 178);
    111101      this.inclupperboundLabel.Name = "inclupperboundLabel";
    112102      this.inclupperboundLabel.Size = new System.Drawing.Size(92, 13);
     
    117107      //
    118108      this.variableLabel.AutoSize = true;
    119       this.variableLabel.Location = new System.Drawing.Point(11, 199);
     109      this.variableLabel.Location = new System.Drawing.Point(8, 47);
    120110      this.variableLabel.Name = "variableLabel";
    121111      this.variableLabel.Size = new System.Drawing.Size(48, 13);
     
    126116      //
    127117      this.numberderivationLabel.AutoSize = true;
    128       this.numberderivationLabel.Location = new System.Drawing.Point(11, 225);
     118      this.numberderivationLabel.Location = new System.Drawing.Point(8, 74);
    129119      this.numberderivationLabel.Name = "numberderivationLabel";
    130120      this.numberderivationLabel.Size = new System.Drawing.Size(65, 13);
     
    132122      this.numberderivationLabel.Text = "#Derivation:";
    133123      //
    134       // definitionInput
    135       //
    136       this.definitionInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    137             | System.Windows.Forms.AnchorStyles.Right)));
    138       this.definitionInput.Location = new System.Drawing.Point(111, 69);
    139       this.definitionInput.Name = "definitionInput";
    140       this.definitionInput.Size = new System.Drawing.Size(473, 20);
    141       this.definitionInput.TabIndex = 9;
    142       //
    143124      // upperboundInput
    144125      //
    145126      this.upperboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    146127            | System.Windows.Forms.AnchorStyles.Right)));
    147       this.upperboundInput.Location = new System.Drawing.Point(111, 120);
     128      this.upperboundInput.Location = new System.Drawing.Point(108, 123);
    148129      this.upperboundInput.Name = "upperboundInput";
    149130      this.upperboundInput.Size = new System.Drawing.Size(473, 20);
     
    156137      this.lowerboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    157138            | System.Windows.Forms.AnchorStyles.Right)));
    158       this.lowerboundInput.Location = new System.Drawing.Point(111, 95);
     139      this.lowerboundInput.Location = new System.Drawing.Point(108, 98);
    159140      this.lowerboundInput.Name = "lowerboundInput";
    160141      this.lowerboundInput.Size = new System.Drawing.Size(473, 20);
     
    167148      this.variableInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    168149            | System.Windows.Forms.AnchorStyles.Right)));
    169       this.variableInput.Location = new System.Drawing.Point(111, 196);
     150      this.variableInput.Location = new System.Drawing.Point(108, 44);
    170151      this.variableInput.Name = "variableInput";
    171152      this.variableInput.Size = new System.Drawing.Size(473, 20);
     
    174155      // groupBox1
    175156      //
     157      this.groupBox1.Controls.Add(this.enabledLabel);
    176158      this.groupBox1.Controls.Add(this.label1);
    177159      this.groupBox1.Controls.Add(this.numberderivationInput);
     
    184166      this.groupBox1.Controls.Add(this.lowerboundInput);
    185167      this.groupBox1.Controls.Add(this.upperboundInput);
    186       this.groupBox1.Controls.Add(this.definitionInput);
    187168      this.groupBox1.Controls.Add(this.numberderivationLabel);
    188169      this.groupBox1.Controls.Add(this.variableLabel);
     
    191172      this.groupBox1.Controls.Add(this.upperboundLabel);
    192173      this.groupBox1.Controls.Add(this.lowerboundLabel);
    193       this.groupBox1.Controls.Add(this.definitionLabel);
    194174      this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
    195175      this.groupBox1.Location = new System.Drawing.Point(0, 0);
     
    203183      //
    204184      this.label1.AutoSize = true;
    205       this.label1.Location = new System.Drawing.Point(11, 22);
     185      this.label1.Location = new System.Drawing.Point(11, -105);
    206186      this.label1.Name = "label1";
    207187      this.label1.Size = new System.Drawing.Size(49, 13);
     
    214194            | System.Windows.Forms.AnchorStyles.Right)));
    215195      this.numberderivationInput.FormattingEnabled = true;
    216       this.numberderivationInput.Location = new System.Drawing.Point(111, 225);
     196      this.numberderivationInput.Location = new System.Drawing.Point(108, 71);
    217197      this.numberderivationInput.Name = "numberderivationInput";
    218       this.numberderivationInput.Size = new System.Drawing.Size(470, 21);
     198      this.numberderivationInput.Size = new System.Drawing.Size(473, 21);
    219199      this.numberderivationInput.TabIndex = 27;
    220200      this.numberderivationInput.SelectedIndexChanged += new System.EventHandler(this.numberderivationInput_SelectedIndexChanged);
     
    223203      //
    224204      this.ischeckedCheckBox.AutoSize = true;
    225       this.ischeckedCheckBox.Location = new System.Drawing.Point(111, 21);
     205      this.ischeckedCheckBox.Location = new System.Drawing.Point(108, 200);
    226206      this.ischeckedCheckBox.Name = "ischeckedCheckBox";
    227207      this.ischeckedCheckBox.Size = new System.Drawing.Size(15, 14);
     
    234214      this.expressionInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    235215            | System.Windows.Forms.AnchorStyles.Right)));
    236       this.expressionInput.Location = new System.Drawing.Point(111, 44);
     216      this.expressionInput.Location = new System.Drawing.Point(108, 19);
    237217      this.expressionInput.Name = "expressionInput";
    238218      this.expressionInput.Size = new System.Drawing.Size(473, 20);
     
    242222      //
    243223      this.expressionLabel.AutoSize = true;
    244       this.expressionLabel.Location = new System.Drawing.Point(11, 47);
     224      this.expressionLabel.Location = new System.Drawing.Point(8, 22);
    245225      this.expressionLabel.Name = "expressionLabel";
    246226      this.expressionLabel.Size = new System.Drawing.Size(61, 13);
     
    251231      //
    252232      this.inclupperboundInput.AutoSize = true;
    253       this.inclupperboundInput.Location = new System.Drawing.Point(111, 173);
     233      this.inclupperboundInput.Location = new System.Drawing.Point(108, 177);
    254234      this.inclupperboundInput.Name = "inclupperboundInput";
    255235      this.inclupperboundInput.Size = new System.Drawing.Size(15, 14);
     
    261241      //
    262242      this.incllowerboundInput.AutoSize = true;
    263       this.incllowerboundInput.Location = new System.Drawing.Point(111, 149);
     243      this.incllowerboundInput.Location = new System.Drawing.Point(108, 153);
    264244      this.incllowerboundInput.Name = "incllowerboundInput";
    265245      this.incllowerboundInput.Size = new System.Drawing.Size(15, 14);
     
    272252      this.errorProvider.ContainerControl = this;
    273253      this.errorProvider.RightToLeft = true;
     254      //
     255      // enabledLabel
     256      //
     257      this.enabledLabel.AutoSize = true;
     258      this.enabledLabel.Location = new System.Drawing.Point(8, 200);
     259      this.enabledLabel.Name = "enabledLabel";
     260      this.enabledLabel.Size = new System.Drawing.Size(49, 13);
     261      this.enabledLabel.TabIndex = 29;
     262      this.enabledLabel.Text = "Enabled:";
    274263      //
    275264      // IntervalConstraintView
     
    287276
    288277    #endregion
    289     private System.Windows.Forms.Label definitionLabel;
    290278    private System.Windows.Forms.Label lowerboundLabel;
    291279    private System.Windows.Forms.Label upperboundLabel;
     
    294282    private System.Windows.Forms.Label variableLabel;
    295283    private System.Windows.Forms.Label numberderivationLabel;
    296     private System.Windows.Forms.TextBox definitionInput;
    297284    private System.Windows.Forms.TextBox upperboundInput;
    298285    private System.Windows.Forms.TextBox lowerboundInput;
     
    307294    private System.Windows.Forms.ComboBox numberderivationInput;
    308295    private System.Windows.Forms.Label label1;
     296    private System.Windows.Forms.Label enabledLabel;
    309297  }
    310298}
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/IntervalConstraintView.cs

    r16895 r16898  
    3939      int [] items = {1, 2, 3};
    4040      expressionInput.ReadOnly = true;
    41       definitionInput.ReadOnly = true;
    4241      numberderivationInput.DataSource = items;
    4342    }
     
    6362      upperboundInput.Enabled = Content != null && !Locked && !ReadOnly;
    6463      expressionInput.Enabled = Content != null && !Locked && !ReadOnly;
    65       definitionInput.Enabled = Content != null && !Locked && !ReadOnly;
    66       definitionInput.ReadOnly = true;
    6764      expressionInput.ReadOnly = true;
    6865      variableInput.ReadOnly = true;
     
    105102
    106103      expressionInput.Text = Content.Expression;
    107       definitionInput.Text = Content.Definition;
    108104      lowerboundInput.Text = Content.Interval.LowerBound.ToString();
    109105      upperboundInput.Text = Content.Interval.UpperBound.ToString();
     
    112108      variableInput.Text = Content.Variable;
    113109      if (!Content.IsDerivation) {
    114         numberderivationInput.Visible = false;
    115         numberderivationLabel.Visible = false;
     110        numberderivationInput.Enabled = false;
     111        numberderivationInput.SelectedItem = null;
     112        numberderivationInput.SelectedText = "0";
    116113      } else {
    117114        numberderivationLabel.Visible = true;
     
    190187
    191188    private void numberderivationInput_SelectedIndexChanged(object sender, EventArgs e) {
     189      if (numberderivationInput.SelectedItem == null) {
     190        Content.NumberOfDerivation = 0;
     191        return;
     192      }
    192193      if ((int)numberderivationInput.SelectedItem == 1)
    193         Content.numberOfDerivation = 1;
     194        Content.NumberOfDerivation = 1;
    194195      else if ((int)numberderivationInput.SelectedItem == 2)
    195         Content.numberOfDerivation = 2;
     196        Content.NumberOfDerivation = 2;
    196197      else if ((int)numberderivationInput.SelectedItem == 3)
    197         Content.numberOfDerivation = 3;
     198        Content.NumberOfDerivation = 3;
    198199    }
    199200
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalConstraint.cs

    r16896 r16898  
    6262    }
    6363
    64     public int numberOfDerivation;
     64    private int numberOfDerivation;
    6565    [Storable]
    6666    public int NumberOfDerivation {
     
    6969        if (value < 0 || value > 3)
    7070          throw new ArgumentException("Number of derivation has to be between 0 - 3.");
    71         if (value != numberOfDerivation) {
     71        if (numberOfDerivation != value) {
    7272          numberOfDerivation = value;
    7373          UpdateExpression();
Note: See TracChangeset for help on using the changeset viewer.