Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17937


Ignore:
Timestamp:
04/13/21 09:08:26 (4 years ago)
Author:
chaider
Message:

#3073 Minor changes to views

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/ShapeConstraintView.Designer.cs

    r17902 r17937  
    4747    /// </summary>
    4848    private void InitializeComponent() {
    49       this.components = new System.ComponentModel.Container();
    50       this.lowerboundLabel = new System.Windows.Forms.Label();
    51       this.upperboundLabel = new System.Windows.Forms.Label();
    52       this.variableLabel = new System.Windows.Forms.Label();
    53       this.numberOfDerivationLabel = new System.Windows.Forms.Label();
    54       this.upperboundInput = new System.Windows.Forms.TextBox();
    55       this.lowerboundInput = new System.Windows.Forms.TextBox();
    56       this.variableInput = new System.Windows.Forms.TextBox();
    57       this.groupBox = new System.Windows.Forms.GroupBox();
    58       this.weightTextBox = new System.Windows.Forms.TextBox();
    59       this.weightLabel = new System.Windows.Forms.Label();
    60       this.regionLabel = new System.Windows.Forms.Label();
    61       this.regionView = new HeuristicLab.Problems.DataAnalysis.Views.IntervalCollectionView();
    62       this.numberOfDerivationsComboBox = new System.Windows.Forms.ComboBox();
    63       this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
    64       this.groupBox.SuspendLayout();
    65       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    66       this.SuspendLayout();
    67       //
    68       // lowerboundLabel
    69       //
    70       this.lowerboundLabel.AutoSize = true;
    71       this.lowerboundLabel.Location = new System.Drawing.Point(8, 75);
    72       this.lowerboundLabel.Name = "lowerboundLabel";
    73       this.lowerboundLabel.Size = new System.Drawing.Size(72, 13);
    74       this.lowerboundLabel.TabIndex = 4;
    75       this.lowerboundLabel.Text = "Lower bound:";
    76       //
    77       // upperboundLabel
    78       //
    79       this.upperboundLabel.AutoSize = true;
    80       this.upperboundLabel.Location = new System.Drawing.Point(8, 101);
    81       this.upperboundLabel.Name = "upperboundLabel";
    82       this.upperboundLabel.Size = new System.Drawing.Size(72, 13);
    83       this.upperboundLabel.TabIndex = 6;
    84       this.upperboundLabel.Text = "Upper bound:";
    85       //
    86       // variableLabel
    87       //
    88       this.variableLabel.AutoSize = true;
    89       this.variableLabel.Location = new System.Drawing.Point(8, 22);
    90       this.variableLabel.Name = "variableLabel";
    91       this.variableLabel.Size = new System.Drawing.Size(48, 13);
    92       this.variableLabel.TabIndex = 0;
    93       this.variableLabel.Text = "Variable:";
    94       //
    95       // numberderivationLabel
    96       //
    97       this.numberOfDerivationLabel.AutoSize = true;
    98       this.numberOfDerivationLabel.Location = new System.Drawing.Point(8, 48);
    99       this.numberOfDerivationLabel.Name = "numberderivationLabel";
    100       this.numberOfDerivationLabel.Size = new System.Drawing.Size(58, 13);
    101       this.numberOfDerivationLabel.TabIndex = 2;
    102       this.numberOfDerivationLabel.Text = "Derivative:";
    103       //
    104       // upperboundInput
    105       //
    106       this.upperboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    107             | System.Windows.Forms.AnchorStyles.Right)));
    108       this.upperboundInput.Location = new System.Drawing.Point(86, 98);
    109       this.upperboundInput.Name = "upperboundInput";
    110       this.upperboundInput.Size = new System.Drawing.Size(495, 20);
    111       this.upperboundInput.TabIndex = 7;
    112       this.upperboundInput.Validating += new System.ComponentModel.CancelEventHandler(this.upperboundInput_Validating);
    113       this.upperboundInput.Validated += new System.EventHandler(this.upperboundInput_Validated);
    114       //
    115       // lowerboundInput
    116       //
    117       this.lowerboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    118             | System.Windows.Forms.AnchorStyles.Right)));
    119       this.lowerboundInput.Location = new System.Drawing.Point(86, 72);
    120       this.lowerboundInput.Name = "lowerboundInput";
    121       this.lowerboundInput.Size = new System.Drawing.Size(495, 20);
    122       this.lowerboundInput.TabIndex = 5;
    123       this.lowerboundInput.Validating += new System.ComponentModel.CancelEventHandler(this.lowerboundInput_Validating);
    124       this.lowerboundInput.Validated += new System.EventHandler(this.lowerboundInput_Validated);
    125       //
    126       // variableInput
    127       //
    128       this.variableInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    129             | System.Windows.Forms.AnchorStyles.Right)));
    130       this.variableInput.Location = new System.Drawing.Point(86, 19);
    131       this.variableInput.Name = "variableInput";
    132       this.variableInput.Size = new System.Drawing.Size(495, 20);
    133       this.variableInput.TabIndex = 1;
    134       //
    135       // groupBox
    136       //
    137       this.groupBox.Controls.Add(this.weightTextBox);
    138       this.groupBox.Controls.Add(this.weightLabel);
    139       this.groupBox.Controls.Add(this.regionLabel);
    140       this.groupBox.Controls.Add(this.regionView);
    141       this.groupBox.Controls.Add(this.numberOfDerivationsComboBox);
    142       this.groupBox.Controls.Add(this.variableInput);
    143       this.groupBox.Controls.Add(this.lowerboundInput);
    144       this.groupBox.Controls.Add(this.upperboundInput);
    145       this.groupBox.Controls.Add(this.numberOfDerivationLabel);
    146       this.groupBox.Controls.Add(this.variableLabel);
    147       this.groupBox.Controls.Add(this.upperboundLabel);
    148       this.groupBox.Controls.Add(this.lowerboundLabel);
    149       this.groupBox.Dock = System.Windows.Forms.DockStyle.Fill;
    150       this.groupBox.Location = new System.Drawing.Point(0, 0);
    151       this.groupBox.Name = "groupBox";
    152       this.groupBox.Size = new System.Drawing.Size(587, 380);
    153       this.groupBox.TabIndex = 0;
    154       this.groupBox.TabStop = false;
    155       this.groupBox.Text = "Shape Constraint Detail";
    156       //
    157       // weightInput
    158       //
    159       this.weightTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    160             | System.Windows.Forms.AnchorStyles.Right)));
    161       this.weightTextBox.Location = new System.Drawing.Point(86, 124);
    162       this.weightTextBox.Name = "weightInput";
    163       this.weightTextBox.Size = new System.Drawing.Size(495, 20);
    164       this.weightTextBox.TabIndex = 9;
    165       this.weightTextBox.TextChanged += new System.EventHandler(this.weightInput_TextChanged);
    166       //
    167       // WeightLab
    168       //
    169       this.weightLabel.AutoSize = true;
    170       this.weightLabel.Location = new System.Drawing.Point(8, 127);
    171       this.weightLabel.Name = "WeightLab";
    172       this.weightLabel.Size = new System.Drawing.Size(44, 13);
    173       this.weightLabel.TabIndex = 8;
    174       this.weightLabel.Text = "Weight:";
    175       //
    176       // regionLab
    177       //
    178       this.regionLabel.AutoSize = true;
    179       this.regionLabel.Location = new System.Drawing.Point(8, 150);
    180       this.regionLabel.Name = "regionLab";
    181       this.regionLabel.Size = new System.Drawing.Size(49, 13);
    182       this.regionLabel.TabIndex = 10;
    183       this.regionLabel.Text = "Regions:";
    184       //
    185       // regionView
    186       //
    187       this.regionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    188             | System.Windows.Forms.AnchorStyles.Left)
    189             | System.Windows.Forms.AnchorStyles.Right)));
    190       this.regionView.Caption = "IntervalCollection View";
    191       this.regionView.Content = null;
    192       this.regionView.Location = new System.Drawing.Point(86, 150);
    193       this.regionView.Name = "regionView";
    194       this.regionView.ReadOnly = false;
    195       this.regionView.Size = new System.Drawing.Size(495, 224);
    196       this.regionView.TabIndex = 11;
    197       this.regionView.TabStop = false;
    198       //
    199       // numberderivationInput
    200       //
    201       this.numberOfDerivationsComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    202             | System.Windows.Forms.AnchorStyles.Right)));
    203       this.numberOfDerivationsComboBox.FormattingEnabled = true;
    204       this.numberOfDerivationsComboBox.Location = new System.Drawing.Point(86, 45);
    205       this.numberOfDerivationsComboBox.Name = "numberderivationInput";
    206       this.numberOfDerivationsComboBox.Size = new System.Drawing.Size(495, 21);
    207       this.numberOfDerivationsComboBox.TabIndex = 3;
    208       this.numberOfDerivationsComboBox.SelectedIndexChanged += new System.EventHandler(this.numberderivationInput_SelectedIndexChanged);
    209       //
    210       // errorProvider
    211       //
    212       this.errorProvider.ContainerControl = this;
    213       this.errorProvider.RightToLeft = true;
    214       //
    215       // ShapeConstraintView
    216       //
    217       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    218       this.Controls.Add(this.groupBox);
    219       this.Name = "ShapeConstraintView";
    220       this.Size = new System.Drawing.Size(587, 380);
    221       this.groupBox.ResumeLayout(false);
    222       this.groupBox.PerformLayout();
    223       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    224       this.ResumeLayout(false);
     49            this.components = new System.ComponentModel.Container();
     50            this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
     51            this.lowerboundLabel = new System.Windows.Forms.Label();
     52            this.upperboundLabel = new System.Windows.Forms.Label();
     53            this.variableLabel = new System.Windows.Forms.Label();
     54            this.numberOfDerivationLabel = new System.Windows.Forms.Label();
     55            this.upperboundInput = new System.Windows.Forms.TextBox();
     56            this.lowerboundInput = new System.Windows.Forms.TextBox();
     57            this.variableInput = new System.Windows.Forms.TextBox();
     58            this.numberOfDerivationsComboBox = new System.Windows.Forms.ComboBox();
     59            this.regionLabel = new System.Windows.Forms.Label();
     60            this.weightLabel = new System.Windows.Forms.Label();
     61            this.weightTextBox = new System.Windows.Forms.TextBox();
     62            this.regionView = new HeuristicLab.Problems.DataAnalysis.Views.IntervalCollectionView();
     63            ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     64            this.SuspendLayout();
     65            //
     66            // errorProvider
     67            //
     68            this.errorProvider.ContainerControl = this;
     69            this.errorProvider.RightToLeft = true;
     70            //
     71            // lowerboundLabel
     72            //
     73            this.lowerboundLabel.AutoSize = true;
     74            this.lowerboundLabel.Location = new System.Drawing.Point(2, 59);
     75            this.lowerboundLabel.Name = "lowerboundLabel";
     76            this.lowerboundLabel.Size = new System.Drawing.Size(72, 13);
     77            this.lowerboundLabel.TabIndex = 4;
     78            this.lowerboundLabel.Text = "Lower bound:";
     79            //
     80            // upperboundLabel
     81            //
     82            this.upperboundLabel.AutoSize = true;
     83            this.upperboundLabel.Location = new System.Drawing.Point(2, 85);
     84            this.upperboundLabel.Name = "upperboundLabel";
     85            this.upperboundLabel.Size = new System.Drawing.Size(72, 13);
     86            this.upperboundLabel.TabIndex = 6;
     87            this.upperboundLabel.Text = "Upper bound:";
     88            //
     89            // variableLabel
     90            //
     91            this.variableLabel.AutoSize = true;
     92            this.variableLabel.Location = new System.Drawing.Point(2, 6);
     93            this.variableLabel.Name = "variableLabel";
     94            this.variableLabel.Size = new System.Drawing.Size(48, 13);
     95            this.variableLabel.TabIndex = 0;
     96            this.variableLabel.Text = "Variable:";
     97            //
     98            // numberOfDerivationLabel
     99            //
     100            this.numberOfDerivationLabel.AutoSize = true;
     101            this.numberOfDerivationLabel.Location = new System.Drawing.Point(2, 32);
     102            this.numberOfDerivationLabel.Name = "numberOfDerivationLabel";
     103            this.numberOfDerivationLabel.Size = new System.Drawing.Size(58, 13);
     104            this.numberOfDerivationLabel.TabIndex = 2;
     105            this.numberOfDerivationLabel.Text = "Derivative:";
     106            //
     107            // upperboundInput
     108            //
     109            this.upperboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     110            | System.Windows.Forms.AnchorStyles.Right)));
     111            this.upperboundInput.Location = new System.Drawing.Point(80, 82);
     112            this.upperboundInput.Name = "upperboundInput";
     113            this.upperboundInput.Size = new System.Drawing.Size(495, 20);
     114            this.upperboundInput.TabIndex = 7;
     115            this.upperboundInput.Validating += new System.ComponentModel.CancelEventHandler(this.upperboundInput_Validating);
     116            this.upperboundInput.Validated += new System.EventHandler(this.upperboundInput_Validated);
     117            //
     118            // lowerboundInput
     119            //
     120            this.lowerboundInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     121            | System.Windows.Forms.AnchorStyles.Right)));
     122            this.lowerboundInput.Location = new System.Drawing.Point(80, 56);
     123            this.lowerboundInput.Name = "lowerboundInput";
     124            this.lowerboundInput.Size = new System.Drawing.Size(495, 20);
     125            this.lowerboundInput.TabIndex = 5;
     126            this.lowerboundInput.Validating += new System.ComponentModel.CancelEventHandler(this.lowerboundInput_Validating);
     127            this.lowerboundInput.Validated += new System.EventHandler(this.lowerboundInput_Validated);
     128            //
     129            // variableInput
     130            //
     131            this.variableInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     132            | System.Windows.Forms.AnchorStyles.Right)));
     133            this.variableInput.Location = new System.Drawing.Point(80, 3);
     134            this.variableInput.Name = "variableInput";
     135            this.variableInput.Size = new System.Drawing.Size(495, 20);
     136            this.variableInput.TabIndex = 1;
     137            this.variableInput.TextChanged += new System.EventHandler(this.variableInput_TextChanged);
     138            //
     139            // numberOfDerivationsComboBox
     140            //
     141            this.numberOfDerivationsComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     142            | System.Windows.Forms.AnchorStyles.Right)));
     143            this.numberOfDerivationsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     144            this.numberOfDerivationsComboBox.FormattingEnabled = true;
     145            this.numberOfDerivationsComboBox.Items.AddRange(new object[] {
     146            "1",
     147            "2",
     148            "3"});
     149            this.numberOfDerivationsComboBox.Location = new System.Drawing.Point(80, 29);
     150            this.numberOfDerivationsComboBox.Name = "numberOfDerivationsComboBox";
     151            this.numberOfDerivationsComboBox.Size = new System.Drawing.Size(495, 21);
     152            this.numberOfDerivationsComboBox.TabIndex = 3;
     153            this.numberOfDerivationsComboBox.SelectedIndexChanged += new System.EventHandler(this.numberderivationInput_SelectedIndexChanged);
     154            //
     155            // regionLabel
     156            //
     157            this.regionLabel.AutoSize = true;
     158            this.regionLabel.Location = new System.Drawing.Point(2, 134);
     159            this.regionLabel.Name = "regionLabel";
     160            this.regionLabel.Size = new System.Drawing.Size(49, 13);
     161            this.regionLabel.TabIndex = 10;
     162            this.regionLabel.Text = "Regions:";
     163            //
     164            // weightLabel
     165            //
     166            this.weightLabel.AutoSize = true;
     167            this.weightLabel.Location = new System.Drawing.Point(2, 111);
     168            this.weightLabel.Name = "weightLabel";
     169            this.weightLabel.Size = new System.Drawing.Size(44, 13);
     170            this.weightLabel.TabIndex = 8;
     171            this.weightLabel.Text = "Weight:";
     172            //
     173            // weightTextBox
     174            //
     175            this.weightTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     176            | System.Windows.Forms.AnchorStyles.Right)));
     177            this.weightTextBox.Location = new System.Drawing.Point(80, 108);
     178            this.weightTextBox.Name = "weightTextBox";
     179            this.weightTextBox.Size = new System.Drawing.Size(495, 20);
     180            this.weightTextBox.TabIndex = 9;
     181            this.weightTextBox.TextChanged += new System.EventHandler(this.weightInput_TextChanged);
     182            //
     183            // regionView
     184            //
     185            this.regionView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     186            | System.Windows.Forms.AnchorStyles.Right)));
     187            this.regionView.AutoSize = true;
     188            this.regionView.Caption = "IntervalCollection View";
     189            this.regionView.Content = null;
     190            this.regionView.Location = new System.Drawing.Point(80, 134);
     191            this.regionView.Name = "regionView";
     192            this.regionView.ReadOnly = false;
     193            this.regionView.Size = new System.Drawing.Size(495, 243);
     194            this.regionView.TabIndex = 11;
     195            this.regionView.TabStop = false;
     196            //
     197            // ShapeConstraintView
     198            //
     199            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
     200            this.Controls.Add(this.weightTextBox);
     201            this.Controls.Add(this.weightLabel);
     202            this.Controls.Add(this.variableInput);
     203            this.Controls.Add(this.regionLabel);
     204            this.Controls.Add(this.lowerboundLabel);
     205            this.Controls.Add(this.regionView);
     206            this.Controls.Add(this.upperboundLabel);
     207            this.Controls.Add(this.numberOfDerivationsComboBox);
     208            this.Controls.Add(this.variableLabel);
     209            this.Controls.Add(this.numberOfDerivationLabel);
     210            this.Controls.Add(this.lowerboundInput);
     211            this.Controls.Add(this.upperboundInput);
     212            this.Name = "ShapeConstraintView";
     213            this.Size = new System.Drawing.Size(587, 380);
     214            ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     215            this.ResumeLayout(false);
     216            this.PerformLayout();
    225217
    226218    }
    227219
    228220    #endregion
    229 
     221    private System.Windows.Forms.ErrorProvider errorProvider;
     222    private System.Windows.Forms.TextBox weightTextBox;
     223    private System.Windows.Forms.Label weightLabel;
     224    private System.Windows.Forms.TextBox variableInput;
     225    private System.Windows.Forms.Label regionLabel;
    230226    private System.Windows.Forms.Label lowerboundLabel;
     227    private IntervalCollectionView regionView;
    231228    private System.Windows.Forms.Label upperboundLabel;
     229    private System.Windows.Forms.ComboBox numberOfDerivationsComboBox;
    232230    private System.Windows.Forms.Label variableLabel;
    233231    private System.Windows.Forms.Label numberOfDerivationLabel;
     232    private System.Windows.Forms.TextBox lowerboundInput;
    234233    private System.Windows.Forms.TextBox upperboundInput;
    235     private System.Windows.Forms.TextBox lowerboundInput;
    236     private System.Windows.Forms.TextBox variableInput;
    237     private System.Windows.Forms.GroupBox groupBox;
    238     private System.Windows.Forms.ErrorProvider errorProvider;
    239     private System.Windows.Forms.ComboBox numberOfDerivationsComboBox;
    240     private IntervalCollectionView regionView;
    241     private System.Windows.Forms.Label regionLabel;
    242     private System.Windows.Forms.TextBox weightTextBox;
    243     private System.Windows.Forms.Label weightLabel;
    244234  }
    245235}
  • trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/ShapeConstraintView.cs

    r17907 r17937  
    6565    protected override void SetEnabledStateOfControls() {
    6666      base.SetEnabledStateOfControls();
    67       variableInput.Enabled = Content != null && !Locked && !ReadOnly;
     67      variableInput.Enabled = Content != null && !Locked && !ReadOnly && Content.Variable != String.Empty;
    6868      numberOfDerivationsComboBox.Enabled = Content != null && !Locked && !ReadOnly;
    6969      lowerboundInput.Enabled = Content != null && !Locked && !ReadOnly;
     
    112112        numberOfDerivationsComboBox.Enabled = false;
    113113        numberOfDerivationsComboBox.SelectedItem = null;
    114         numberOfDerivationsComboBox.Text = "0";
    115114      } else {
    116         numberOfDerivationLabel.Visible = true;
    117         numberOfDerivationsComboBox.Visible = true;
    118115        numberOfDerivationsComboBox.Enabled = true;
    119116        numberOfDerivationsComboBox.SelectedItem = Content.NumberOfDerivations;
    120117      }
    121118
    122       regionView.Content = Content.Regions;
     119      if (Content.Regions.Count > 0) {
     120        regionView.Content = Content.Regions;
     121        regionLabel.Visible = true;
     122        regionView.Visible = true;
     123      } else {
     124        regionLabel.Visible = false;
     125        regionView.Visible = false;
     126      }
    123127    }
    124128
     
    197201    }
    198202
     203    private void variableInput_TextChanged(object sender, EventArgs e) {
     204      var value = variableInput.Text;
     205      if (!String.IsNullOrEmpty(value)) Content.Variable = value;
     206    }
    199207
    200208    #endregion
     
    206214    }
    207215
    208    #endregion
     216
     217    #endregion
    209218  }
    210219}
  • trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/ShapeConstraint.cs

    r17906 r17937  
    3535    public string Variable {
    3636      get => variable;
    37       private set {
     37      set {
    3838        if (variable == value)
    3939          return;
     
    149149      Weight = original.weight;
    150150    }
     151
    151152
    152153    public event EventHandler Changed;
Note: See TracChangeset for help on using the changeset viewer.