Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17471


Ignore:
Timestamp:
03/09/20 10:36:09 (5 years ago)
Author:
dpiringe
Message:

#3026:

  • deleted INamedMatrixJsonItem and all corresponding classes/views, because of bad design
  • added ILookupJsonItem and IValueLookupJsonItem (incl. all corresponding implementations, VMs, Views)
  • added IResultJsonItem
  • changed type of property Control from JsonItemBaseControl to UserControl in IJsonItemVM (because the details control now builds up with linked user controls -> allows better construction of dynamic controls)
  • added all properties of INamedMatrixJsonItem in IMatrixJsonItem
  • refactored a lot of views for better usage (TableLayoutPanel is used a lot now -> for better item positioning)
  • property ActualName is now located in ILookupJsonItem instead of IJsonItem
Location:
branches/3026_IntegrationIntoSymSpace
Files:
15 added
4 deleted
36 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/HeuristicLab.JsonInterface.OptimizerIntegration.csproj

    r17464 r17471  
    8787    <Compile Include="Interfaces\IArrayJsonItemVM.cs" />
    8888    <Compile Include="Interfaces\IJsonItemVM.cs" />
     89    <Compile Include="Interfaces\ILookupJsonItemVM.cs" />
    8990    <Compile Include="Interfaces\IMatrixJsonItemVM.cs" />
    90     <Compile Include="Interfaces\INamedMatrixJsonItemVM.cs" />
     91    <Compile Include="Interfaces\IValueLookupJsonItemVM.cs" />
    9192    <Compile Include="Properties\Resources.Designer.cs">
    9293      <AutoGen>True</AutoGen>
     
    108109    <Compile Include="ViewModels\ArrayValueVM.cs" />
    109110    <Compile Include="ViewModels\JsonItemVMBase.cs" />
     111    <Compile Include="ViewModels\LookupJsonItemVM.cs" />
    110112    <Compile Include="ViewModels\MatrixValueVM.cs" />
    111     <Compile Include="ViewModels\NamedMatrixValueVM.cs" />
    112113    <Compile Include="ViewModels\RangedValueBaseVM.cs" />
    113114    <Compile Include="ViewModels\RangeVM.cs" />
     
    115116    <Compile Include="ViewModels\SingleValueVM.cs" />
    116117    <Compile Include="ViewModels\StringValueVM.cs" />
     118    <Compile Include="ViewModels\ValueLookupJsonItemVM.cs" />
    117119    <Compile Include="Views\ExportJsonDialog.cs">
    118120      <SubType>Form</SubType>
     
    156158    <Compile Include="Plugin.cs" />
    157159    <Compile Include="Properties\AssemblyInfo.cs" />
     160    <Compile Include="Views\LookupJsonItemControl.cs">
     161      <SubType>UserControl</SubType>
     162    </Compile>
     163    <Compile Include="Views\LookupJsonItemControl.Designer.cs">
     164      <DependentUpon>LookupJsonItemControl.cs</DependentUpon>
     165    </Compile>
     166    <Compile Include="Views\ValueLookupJsonItemControl.cs">
     167      <SubType>UserControl</SubType>
     168    </Compile>
     169    <Compile Include="Views\ValueLookupJsonItemControl.Designer.cs">
     170      <DependentUpon>ValueLookupJsonItemControl.cs</DependentUpon>
     171    </Compile>
    158172  </ItemGroup>
    159173  <ItemGroup>
     
    227241    <EmbeddedResource Include="Views\JsonItemValidValuesControl.resx">
    228242      <DependentUpon>JsonItemValidValuesControl.cs</DependentUpon>
     243    </EmbeddedResource>
     244    <EmbeddedResource Include="Views\LookupJsonItemControl.resx">
     245      <DependentUpon>LookupJsonItemControl.cs</DependentUpon>
     246    </EmbeddedResource>
     247    <EmbeddedResource Include="Views\ValueLookupJsonItemControl.resx">
     248      <DependentUpon>ValueLookupJsonItemControl.cs</DependentUpon>
    229249    </EmbeddedResource>
    230250  </ItemGroup>
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Interfaces/IJsonItemVM.cs

    r17446 r17471  
    1313    Type JsonItemType { get; }
    1414
    15     JsonItemBaseControl Control { get; }
     15    UserControl Control { get; }
    1616
    1717    IJsonItem Item { get; set; }
     
    2222
    2323    string Description { get; set; }
    24 
    25     string ActualName { get; set; }
    26 
     24   
    2725    TreeNode TreeNode { get; set; }
    2826
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Interfaces/IMatrixJsonItemVM.cs

    r17446 r17471  
    88  public interface IMatrixJsonItemVM : IJsonItemVM {
    99    bool RowsResizable { get; set; }
    10 
    1110    bool ColumnsResizable { get; set; }
     11    IEnumerable<string> RowNames { get; set; }
     12    IEnumerable<string> ColumnNames { get; set; }
    1213  }
    1314}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Shared/JsonItemBaseControl.Designer.cs

    r17464 r17471  
    2626      this.components = new System.ComponentModel.Container();
    2727      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
     28      this.textBoxName = new System.Windows.Forms.TextBox();
    2829      this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
    29       this.panel4 = new System.Windows.Forms.Panel();
    30       this.textBoxActualName = new System.Windows.Forms.TextBox();
    31       this.labelActualName = new System.Windows.Forms.Label();
    32       this.panel2 = new System.Windows.Forms.Panel();
    3330      this.labelDescription = new System.Windows.Forms.Label();
    3431      this.textBoxDescription = new System.Windows.Forms.TextBox();
    35       this.panel1 = new System.Windows.Forms.Panel();
    36       this.textBoxName = new System.Windows.Forms.TextBox();
    3732      this.label1 = new System.Windows.Forms.Label();
    38       this.panel3 = new System.Windows.Forms.Panel();
    3933      this.labelEnable = new System.Windows.Forms.Label();
    4034      this.checkBoxActive = new System.Windows.Forms.CheckBox();
     35      this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel();
    4136      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    4237      this.tableLayoutPanel1.SuspendLayout();
    43       this.panel4.SuspendLayout();
    44       this.panel2.SuspendLayout();
    45       this.panel1.SuspendLayout();
    46       this.panel3.SuspendLayout();
     38      this.tableLayoutPanel5.SuspendLayout();
    4739      this.SuspendLayout();
    4840      //
     
    5244      this.errorProvider.ContainerControl = this;
    5345      //
     46      // textBoxName
     47      //
     48      this.textBoxName.Dock = System.Windows.Forms.DockStyle.Fill;
     49      this.errorProvider.SetIconAlignment(this.textBoxName, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     50      this.textBoxName.Location = new System.Drawing.Point(100, 24);
     51      this.textBoxName.Margin = new System.Windows.Forms.Padding(0);
     52      this.textBoxName.Name = "textBoxName";
     53      this.textBoxName.Size = new System.Drawing.Size(394, 20);
     54      this.textBoxName.TabIndex = 10;
     55      this.textBoxName.Validating += new System.ComponentModel.CancelEventHandler(this.textBoxName_Validating);
     56      //
    5457      // tableLayoutPanel1
    5558      //
    5659      this.tableLayoutPanel1.ColumnCount = 1;
    5760      this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
    58       this.tableLayoutPanel1.Controls.Add(this.panel4, 0, 3);
    59       this.tableLayoutPanel1.Controls.Add(this.panel2, 0, 2);
    60       this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 1);
    61       this.tableLayoutPanel1.Controls.Add(this.panel3, 0, 0);
     61      this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel5, 0, 0);
    6262      this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
    6363      this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
    6464      this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
    6565      this.tableLayoutPanel1.Name = "tableLayoutPanel1";
    66       this.tableLayoutPanel1.RowCount = 5;
    67       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
    68       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
    69       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
    70       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
    71       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
    72       this.tableLayoutPanel1.Size = new System.Drawing.Size(494, 388);
     66      this.tableLayoutPanel1.RowCount = 2;
     67      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 75F));
     68      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
     69      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
     70      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
     71      this.tableLayoutPanel1.Size = new System.Drawing.Size(494, 594);
    7372      this.tableLayoutPanel1.TabIndex = 16;
    74       //
    75       // panel4
    76       //
    77       this.panel4.Controls.Add(this.textBoxActualName);
    78       this.panel4.Controls.Add(this.labelActualName);
    79       this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
    80       this.panel4.Location = new System.Drawing.Point(0, 75);
    81       this.panel4.Margin = new System.Windows.Forms.Padding(0);
    82       this.panel4.Name = "panel4";
    83       this.panel4.Size = new System.Drawing.Size(494, 25);
    84       this.panel4.TabIndex = 17;
    85       //
    86       // textBoxActualName
    87       //
    88       this.textBoxActualName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    89             | System.Windows.Forms.AnchorStyles.Right)));
    90       this.textBoxActualName.Location = new System.Drawing.Point(92, 3);
    91       this.textBoxActualName.Name = "textBoxActualName";
    92       this.textBoxActualName.Size = new System.Drawing.Size(396, 20);
    93       this.textBoxActualName.TabIndex = 12;
    94       //
    95       // labelActualName
    96       //
    97       this.labelActualName.AutoSize = true;
    98       this.labelActualName.Location = new System.Drawing.Point(6, 6);
    99       this.labelActualName.Name = "labelActualName";
    100       this.labelActualName.Size = new System.Drawing.Size(65, 13);
    101       this.labelActualName.TabIndex = 11;
    102       this.labelActualName.Text = "ActualName";
    103       this.labelActualName.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
    104       //
    105       // panel2
    106       //
    107       this.panel2.Controls.Add(this.labelDescription);
    108       this.panel2.Controls.Add(this.textBoxDescription);
    109       this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
    110       this.panel2.Location = new System.Drawing.Point(0, 50);
    111       this.panel2.Margin = new System.Windows.Forms.Padding(0);
    112       this.panel2.Name = "panel2";
    113       this.panel2.Size = new System.Drawing.Size(494, 25);
    114       this.panel2.TabIndex = 17;
    11573      //
    11674      // labelDescription
    11775      //
    11876      this.labelDescription.AutoSize = true;
    119       this.labelDescription.Location = new System.Drawing.Point(6, 6);
     77      this.labelDescription.Dock = System.Windows.Forms.DockStyle.Fill;
     78      this.labelDescription.Location = new System.Drawing.Point(0, 48);
     79      this.labelDescription.Margin = new System.Windows.Forms.Padding(0);
    12080      this.labelDescription.Name = "labelDescription";
    121       this.labelDescription.Size = new System.Drawing.Size(60, 13);
     81      this.labelDescription.Size = new System.Drawing.Size(100, 27);
    12282      this.labelDescription.TabIndex = 13;
    12383      this.labelDescription.Text = "Description";
     84      this.labelDescription.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
    12485      //
    12586      // textBoxDescription
    12687      //
    127       this.textBoxDescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    128             | System.Windows.Forms.AnchorStyles.Right)));
    129       this.textBoxDescription.Location = new System.Drawing.Point(92, 3);
     88      this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill;
     89      this.textBoxDescription.Location = new System.Drawing.Point(100, 50);
     90      this.textBoxDescription.Margin = new System.Windows.Forms.Padding(0, 2, 0, 0);
    13091      this.textBoxDescription.Name = "textBoxDescription";
    131       this.textBoxDescription.Size = new System.Drawing.Size(396, 20);
     92      this.textBoxDescription.Size = new System.Drawing.Size(394, 20);
    13293      this.textBoxDescription.TabIndex = 14;
    133       //
    134       // panel1
    135       //
    136       this.panel1.Controls.Add(this.textBoxName);
    137       this.panel1.Controls.Add(this.label1);
    138       this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
    139       this.panel1.Location = new System.Drawing.Point(0, 25);
    140       this.panel1.Margin = new System.Windows.Forms.Padding(0);
    141       this.panel1.Name = "panel1";
    142       this.panel1.Size = new System.Drawing.Size(494, 25);
    143       this.panel1.TabIndex = 17;
    144       //
    145       // textBoxName
    146       //
    147       this.textBoxName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    148             | System.Windows.Forms.AnchorStyles.Right)));
    149       this.errorProvider.SetIconAlignment(this.textBoxName, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    150       this.textBoxName.Location = new System.Drawing.Point(92, 3);
    151       this.textBoxName.Name = "textBoxName";
    152       this.textBoxName.Size = new System.Drawing.Size(396, 20);
    153       this.textBoxName.TabIndex = 10;
    154       this.textBoxName.Validating += new System.ComponentModel.CancelEventHandler(this.textBoxName_Validating);
    15594      //
    15695      // label1
    15796      //
    15897      this.label1.AutoSize = true;
    159       this.label1.Location = new System.Drawing.Point(6, 6);
     98      this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
     99      this.label1.Location = new System.Drawing.Point(0, 24);
     100      this.label1.Margin = new System.Windows.Forms.Padding(0);
    160101      this.label1.Name = "label1";
    161       this.label1.Size = new System.Drawing.Size(35, 13);
     102      this.label1.Size = new System.Drawing.Size(100, 24);
    162103      this.label1.TabIndex = 9;
    163104      this.label1.Text = "Name";
    164       this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
    165       //
    166       // panel3
    167       //
    168       this.panel3.Controls.Add(this.labelEnable);
    169       this.panel3.Controls.Add(this.checkBoxActive);
    170       this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
    171       this.panel3.Location = new System.Drawing.Point(0, 0);
    172       this.panel3.Margin = new System.Windows.Forms.Padding(0);
    173       this.panel3.Name = "panel3";
    174       this.panel3.Size = new System.Drawing.Size(494, 25);
    175       this.panel3.TabIndex = 17;
     105      this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
    176106      //
    177107      // labelEnable
    178108      //
    179       this.labelEnable.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    180             | System.Windows.Forms.AnchorStyles.Right)));
    181109      this.labelEnable.AutoSize = true;
    182       this.labelEnable.Location = new System.Drawing.Point(6, 7);
     110      this.labelEnable.Dock = System.Windows.Forms.DockStyle.Fill;
     111      this.labelEnable.Location = new System.Drawing.Point(0, 0);
     112      this.labelEnable.Margin = new System.Windows.Forms.Padding(0);
    183113      this.labelEnable.Name = "labelEnable";
    184       this.labelEnable.Size = new System.Drawing.Size(40, 13);
     114      this.labelEnable.Size = new System.Drawing.Size(100, 24);
    185115      this.labelEnable.TabIndex = 3;
    186116      this.labelEnable.Text = "Enable";
     117      this.labelEnable.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
    187118      //
    188119      // checkBoxActive
    189120      //
    190121      this.checkBoxActive.AutoSize = true;
    191       this.checkBoxActive.Location = new System.Drawing.Point(92, 7);
     122      this.checkBoxActive.Dock = System.Windows.Forms.DockStyle.Fill;
     123      this.checkBoxActive.Location = new System.Drawing.Point(100, 0);
     124      this.checkBoxActive.Margin = new System.Windows.Forms.Padding(0);
    192125      this.checkBoxActive.Name = "checkBoxActive";
    193       this.checkBoxActive.Size = new System.Drawing.Size(15, 14);
     126      this.checkBoxActive.Size = new System.Drawing.Size(394, 24);
    194127      this.checkBoxActive.TabIndex = 2;
    195128      this.checkBoxActive.UseVisualStyleBackColor = true;
     129      //
     130      // tableLayoutPanel5
     131      //
     132      this.tableLayoutPanel5.ColumnCount = 2;
     133      this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F));
     134      this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
     135      this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
     136      this.tableLayoutPanel5.Controls.Add(this.textBoxDescription, 1, 2);
     137      this.tableLayoutPanel5.Controls.Add(this.textBoxName, 1, 1);
     138      this.tableLayoutPanel5.Controls.Add(this.checkBoxActive, 1, 0);
     139      this.tableLayoutPanel5.Controls.Add(this.label1, 0, 1);
     140      this.tableLayoutPanel5.Controls.Add(this.labelDescription, 0, 2);
     141      this.tableLayoutPanel5.Controls.Add(this.labelEnable, 0, 0);
     142      this.tableLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill;
     143      this.tableLayoutPanel5.Location = new System.Drawing.Point(0, 0);
     144      this.tableLayoutPanel5.Margin = new System.Windows.Forms.Padding(0);
     145      this.tableLayoutPanel5.Name = "tableLayoutPanel5";
     146      this.tableLayoutPanel5.RowCount = 3;
     147      this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
     148      this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
     149      this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
     150      this.tableLayoutPanel5.Size = new System.Drawing.Size(494, 75);
     151      this.tableLayoutPanel5.TabIndex = 17;
    196152      //
    197153      // JsonItemBaseControl
     
    203159      this.Name = "JsonItemBaseControl";
    204160      this.Padding = new System.Windows.Forms.Padding(3);
    205       this.Size = new System.Drawing.Size(500, 394);
     161      this.Size = new System.Drawing.Size(500, 600);
    206162      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    207163      this.tableLayoutPanel1.ResumeLayout(false);
    208       this.panel4.ResumeLayout(false);
    209       this.panel4.PerformLayout();
    210       this.panel2.ResumeLayout(false);
    211       this.panel2.PerformLayout();
    212       this.panel1.ResumeLayout(false);
    213       this.panel1.PerformLayout();
    214       this.panel3.ResumeLayout(false);
    215       this.panel3.PerformLayout();
     164      this.tableLayoutPanel5.ResumeLayout(false);
     165      this.tableLayoutPanel5.PerformLayout();
    216166      this.ResumeLayout(false);
    217167
     
    222172    protected System.Windows.Forms.Label labelEnable;
    223173    protected System.Windows.Forms.CheckBox checkBoxActive;
    224     protected System.Windows.Forms.TextBox textBoxActualName;
    225     protected System.Windows.Forms.Label labelActualName;
    226174    protected System.Windows.Forms.TextBox textBoxName;
    227175    protected System.Windows.Forms.Label label1;
    228176    protected System.Windows.Forms.Label labelDescription;
    229177    protected System.Windows.Forms.TextBox textBoxDescription;
    230     private System.Windows.Forms.Panel panel1;
    231     private System.Windows.Forms.Panel panel3;
    232     private System.Windows.Forms.Panel panel2;
    233     private System.Windows.Forms.Panel panel4;
    234178    protected System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
     179    private System.Windows.Forms.TableLayoutPanel tableLayoutPanel5;
    235180  }
    236181}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Shared/JsonItemBaseControl.cs

    r17464 r17471  
    2626      InitializeComponent();
    2727      VM = vm;
    28       tableLayoutPanel1.Controls.Add(control, 0, 4);
     28      control.Margin = new Padding() { All = 0 };
     29      tableLayoutPanel1.Controls.Add(control, 0, 1);
    2930      control.Dock = DockStyle.Fill;
    3031      Init();
     
    3637      textBoxName.DataBindings.Add("Text", VM, nameof(IJsonItemVM.Name));
    3738      textBoxDescription.DataBindings.Add("Text", VM, nameof(IJsonItemVM.Description));
    38       textBoxActualName.DataBindings.Add("Text", VM, nameof(IJsonItemVM.ActualName));
    39 
    40       if (string.IsNullOrWhiteSpace(VM.Item.ActualName)) {
    41         textBoxActualName.Enabled = false;
    42         tableLayoutPanel1.Controls.Remove(panel4);
    43         tableLayoutPanel1.RowStyles[3].Height = 0;
    44         //textBoxActualName.ReadOnly = true;
    45       } else
    46         textBoxActualName.Text = VM.Item.ActualName;
    4739    }
    4840
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Shared/NumericRangeControl.Designer.cs

    r17464 r17471  
    2525    private void InitializeComponent() {
    2626      this.components = new System.ComponentModel.Container();
    27       this.textBoxFrom = new System.Windows.Forms.TextBox();
    2827      this.groupBox2 = new System.Windows.Forms.GroupBox();
    2928      this.checkBoxTo = new System.Windows.Forms.CheckBox();
    3029      this.textBoxTo = new System.Windows.Forms.TextBox();
     30      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
     31      this.textBoxFrom = new System.Windows.Forms.TextBox();
    3132      this.checkBoxFrom = new System.Windows.Forms.CheckBox();
    32       this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
     33      this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
    3334      this.groupBox2.SuspendLayout();
    3435      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     36      this.tableLayoutPanel2.SuspendLayout();
    3537      this.SuspendLayout();
    36       //
    37       // textBoxFrom
    38       //
    39       this.textBoxFrom.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    40             | System.Windows.Forms.AnchorStyles.Right)));
    41       this.errorProvider.SetIconAlignment(this.textBoxFrom, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    42       this.textBoxFrom.Location = new System.Drawing.Point(87, 16);
    43       this.textBoxFrom.Name = "textBoxFrom";
    44       this.textBoxFrom.ReadOnly = true;
    45       this.textBoxFrom.Size = new System.Drawing.Size(407, 20);
    46       this.textBoxFrom.TabIndex = 2;
    47       this.textBoxFrom.Validating += new System.ComponentModel.CancelEventHandler(this.textBoxFrom_Validating);
    4838      //
    4939      // groupBox2
    5040      //
    51       this.groupBox2.Controls.Add(this.checkBoxTo);
    52       this.groupBox2.Controls.Add(this.textBoxTo);
    53       this.groupBox2.Controls.Add(this.checkBoxFrom);
    54       this.groupBox2.Controls.Add(this.textBoxFrom);
     41      this.groupBox2.Controls.Add(this.tableLayoutPanel2);
    5542      this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
    5643      this.groupBox2.Location = new System.Drawing.Point(0, 0);
     44      this.groupBox2.Margin = new System.Windows.Forms.Padding(0);
    5745      this.groupBox2.Name = "groupBox2";
    58       this.groupBox2.Size = new System.Drawing.Size(500, 75);
     46      this.groupBox2.Size = new System.Drawing.Size(526, 63);
    5947      this.groupBox2.TabIndex = 19;
    6048      this.groupBox2.TabStop = false;
     
    6452      //
    6553      this.checkBoxTo.AutoSize = true;
    66       this.checkBoxTo.Location = new System.Drawing.Point(9, 45);
     54      this.checkBoxTo.Dock = System.Windows.Forms.DockStyle.Fill;
     55      this.checkBoxTo.Location = new System.Drawing.Point(0, 22);
     56      this.checkBoxTo.Margin = new System.Windows.Forms.Padding(0);
    6757      this.checkBoxTo.Name = "checkBoxTo";
    68       this.checkBoxTo.Size = new System.Drawing.Size(42, 17);
     58      this.checkBoxTo.Size = new System.Drawing.Size(100, 22);
    6959      this.checkBoxTo.TabIndex = 7;
    7060      this.checkBoxTo.Text = "To:";
     
    7363      // textBoxTo
    7464      //
    75       this.textBoxTo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    76             | System.Windows.Forms.AnchorStyles.Right)));
    77       this.errorProvider.SetIconAlignment(this.textBoxTo, System.Windows.Forms.ErrorIconAlignment.TopLeft);
    78       this.textBoxTo.Location = new System.Drawing.Point(87, 42);
     65      this.textBoxTo.Dock = System.Windows.Forms.DockStyle.Fill;
     66      this.errorProvider.SetIconAlignment(this.textBoxTo, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     67      this.textBoxTo.Location = new System.Drawing.Point(100, 22);
     68      this.textBoxTo.Margin = new System.Windows.Forms.Padding(0);
    7969      this.textBoxTo.Name = "textBoxTo";
    8070      this.textBoxTo.ReadOnly = true;
    81       this.textBoxTo.Size = new System.Drawing.Size(407, 20);
     71      this.textBoxTo.Size = new System.Drawing.Size(420, 20);
    8272      this.textBoxTo.TabIndex = 6;
    8373      this.textBoxTo.Validating += new System.ComponentModel.CancelEventHandler(this.textBoxTo_Validating);
    84       //
    85       // checkBoxFrom
    86       //
    87       this.checkBoxFrom.AutoSize = true;
    88       this.checkBoxFrom.Location = new System.Drawing.Point(9, 19);
    89       this.checkBoxFrom.Name = "checkBoxFrom";
    90       this.checkBoxFrom.Size = new System.Drawing.Size(52, 17);
    91       this.checkBoxFrom.TabIndex = 4;
    92       this.checkBoxFrom.Text = "From:";
    93       this.checkBoxFrom.UseVisualStyleBackColor = true;
    9474      //
    9575      // errorProvider
     
    9777      this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
    9878      this.errorProvider.ContainerControl = this;
     79      //
     80      // textBoxFrom
     81      //
     82      this.textBoxFrom.Dock = System.Windows.Forms.DockStyle.Fill;
     83      this.errorProvider.SetIconAlignment(this.textBoxFrom, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     84      this.textBoxFrom.Location = new System.Drawing.Point(100, 0);
     85      this.textBoxFrom.Margin = new System.Windows.Forms.Padding(0);
     86      this.textBoxFrom.Name = "textBoxFrom";
     87      this.textBoxFrom.ReadOnly = true;
     88      this.textBoxFrom.Size = new System.Drawing.Size(420, 20);
     89      this.textBoxFrom.TabIndex = 2;
     90      this.textBoxFrom.Validating += new System.ComponentModel.CancelEventHandler(this.textBoxFrom_Validating);
     91      //
     92      // checkBoxFrom
     93      //
     94      this.checkBoxFrom.AutoSize = true;
     95      this.checkBoxFrom.Dock = System.Windows.Forms.DockStyle.Fill;
     96      this.checkBoxFrom.Location = new System.Drawing.Point(0, 0);
     97      this.checkBoxFrom.Margin = new System.Windows.Forms.Padding(0);
     98      this.checkBoxFrom.Name = "checkBoxFrom";
     99      this.checkBoxFrom.Size = new System.Drawing.Size(100, 22);
     100      this.checkBoxFrom.TabIndex = 4;
     101      this.checkBoxFrom.Text = "From:";
     102      this.checkBoxFrom.UseVisualStyleBackColor = true;
     103      //
     104      // tableLayoutPanel2
     105      //
     106      this.tableLayoutPanel2.ColumnCount = 2;
     107      this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F));
     108      this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
     109      this.tableLayoutPanel2.Controls.Add(this.textBoxTo, 1, 1);
     110      this.tableLayoutPanel2.Controls.Add(this.textBoxFrom, 1, 0);
     111      this.tableLayoutPanel2.Controls.Add(this.checkBoxFrom, 0, 0);
     112      this.tableLayoutPanel2.Controls.Add(this.checkBoxTo, 0, 1);
     113      this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
     114      this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 16);
     115      this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
     116      this.tableLayoutPanel2.Name = "tableLayoutPanel2";
     117      this.tableLayoutPanel2.RowCount = 2;
     118      this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
     119      this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
     120      this.tableLayoutPanel2.Size = new System.Drawing.Size(520, 44);
     121      this.tableLayoutPanel2.TabIndex = 22;
    99122      //
    100123      // NumericRangeControl
     
    104127      this.Controls.Add(this.groupBox2);
    105128      this.Name = "NumericRangeControl";
    106       this.Size = new System.Drawing.Size(500, 75);
     129      this.Size = new System.Drawing.Size(526, 63);
    107130      this.groupBox2.ResumeLayout(false);
    108       this.groupBox2.PerformLayout();
    109131      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     132      this.tableLayoutPanel2.ResumeLayout(false);
     133      this.tableLayoutPanel2.PerformLayout();
    110134      this.ResumeLayout(false);
    111135
     
    113137
    114138    #endregion
    115     private System.Windows.Forms.TextBox textBoxFrom;
    116139    private System.Windows.Forms.GroupBox groupBox2;
    117140    private System.Windows.Forms.CheckBox checkBoxTo;
    118141    private System.Windows.Forms.TextBox textBoxTo;
     142    private System.Windows.Forms.ErrorProvider errorProvider;
    119143    private System.Windows.Forms.CheckBox checkBoxFrom;
    120     private System.Windows.Forms.ErrorProvider errorProvider;
     144    private System.Windows.Forms.TextBox textBoxFrom;
     145    private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
    121146  }
    122147}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/ArrayValueVM.cs

    r17464 r17471  
    55using System.Text;
    66using System.Threading.Tasks;
     7using System.Windows.Forms;
    78
    89namespace HeuristicLab.JsonInterface.OptimizerIntegration {
     
    1516    protected override double MaxTypeValue => double.MaxValue;
    1617
    17     public override JsonItemBaseControl Control =>
    18       new JsonItemBaseControl(this, new JsonItemDoubleArrayValueControl(this));
     18    public override UserControl Control =>
     19      new JsonItemDoubleArrayValueControl(this);
    1920   
    2021    public override double[] Value {
     
    3435    protected override int MaxTypeValue => int.MaxValue;
    3536
    36     public override JsonItemBaseControl Control =>
     37    public override UserControl Control =>
    3738      new JsonItemBaseControl(this, new JsonItemIntArrayValueControl(this));
    3839   
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/JsonItemVMBase.cs

    r17451 r17471  
    99
    1010namespace HeuristicLab.JsonInterface.OptimizerIntegration {
    11   public class JsonItemVMBase : IJsonItemVM {
    12     public event PropertyChangedEventHandler PropertyChanged;
    13     public event Action ItemChanged;
    14 
     11  public abstract class JsonItemVMBase : IJsonItemVM {
    1512    private IJsonItem item;
    1613    public IJsonItem Item {
     
    2320      }
    2421    }
    25 
    2622    public TreeNode TreeNode { get; set; }
    2723    public TreeView TreeView { get; set; }
    28 
    29     protected void OnPropertyChange(object sender, string propertyName) {
    30       // Make a temporary copy of the event to avoid possibility of
    31       // a race condition if the last subscriber unsubscribes
    32       // immediately after the null check and before the event is raised.
    33       // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/events/how-to-raise-base-class-events-in-derived-classes
    34      
    35       PropertyChangedEventHandler tmp = PropertyChanged;
    36       tmp?.Invoke(this, new PropertyChangedEventArgs(propertyName));
    37     }
    38 
    39     public virtual Type JsonItemType => typeof(JsonItem);
    40 
    41    
    4224    public bool Selected {
    4325      get => Item.Active;
     
    5335      }
    5436    }
    55 
    5637    public string Name {
    5738      get => Item.Name;
     
    6142      }
    6243    }
    63 
    6444    public string Description {
    6545      get => Item.Description;
     
    7050    }
    7151
    72     public string ActualName {
    73       get => Item.ActualName;
    74       set {
    75         Item.ActualName = value;
    76         OnPropertyChange(this, nameof(ActualName));
    77       }
     52    public abstract Type JsonItemType { get; }
     53    public abstract UserControl Control { get; }
     54
     55    public event PropertyChangedEventHandler PropertyChanged;
     56    public event Action ItemChanged;
     57
     58
     59    protected void OnPropertyChange(object sender, string propertyName) {
     60      // Make a temporary copy of the event to avoid possibility of
     61      // a race condition if the last subscriber unsubscribes
     62      // immediately after the null check and before the event is raised.
     63      // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/events/how-to-raise-base-class-events-in-derived-classes
     64     
     65      PropertyChangedEventHandler tmp = PropertyChanged;
     66      tmp?.Invoke(this, new PropertyChangedEventArgs(propertyName));
    7867    }
    79 
    80     public virtual JsonItemBaseControl Control => new JsonItemBaseControl(this);
    8168   
    8269    #region IDisposable Support
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/MatrixValueVM.cs

    r17464 r17471  
    55using System.Text;
    66using System.Threading.Tasks;
     7using System.Windows.Forms;
    78
    89namespace HeuristicLab.JsonInterface.OptimizerIntegration {
     
    1011  public class DoubleMatrixValueVM : MatrixValueVM<double, DoubleMatrixJsonItem> {
    1112    public override Type JsonItemType => typeof(DoubleMatrixJsonItem);
    12     public override JsonItemBaseControl Control => null;
    13       //new JsonItemDoubleMatrixValueControl(this);
     13    public override UserControl Control =>
     14      new JsonItemDoubleMatrixValueControl(this);
    1415
    1516    public override double[][] Value {
     
    4546    }
    4647
     48    public IEnumerable<string> RowNames {
     49      get => ((JsonItemType)Item).RowNames;
     50      set {
     51        ((JsonItemType)Item).RowNames = value;
     52        OnPropertyChange(this, nameof(RowNames));
     53      }
     54    }
     55    public IEnumerable<string> ColumnNames {
     56      get => ((JsonItemType)Item).ColumnNames;
     57      set {
     58        ((JsonItemType)Item).ColumnNames = value;
     59        OnPropertyChange(this, nameof(ColumnNames));
     60      }
     61    }
     62
    4763    public void SetCellValue(T data, int row, int col) {
    4864     
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/RangeVM.cs

    r17464 r17471  
    55using System.Text;
    66using System.Threading.Tasks;
     7using System.Windows.Forms;
    78
    89namespace HeuristicLab.JsonInterface.OptimizerIntegration {
     
    1516    protected override int MaxTypeValue => int.MaxValue;
    1617
    17     public override JsonItemBaseControl Control =>
    18       new JsonItemBaseControl(this, new JsonItemRangeControl(this));
     18    public override UserControl Control =>
     19      new JsonItemRangeControl(this);
    1920  }
    2021
     
    2627    protected override double MaxTypeValue => double.MaxValue;
    2728
    28     public override JsonItemBaseControl Control =>
    29       new JsonItemBaseControl(this, new JsonItemRangeControl(this));
     29    public override UserControl Control =>
     30      new JsonItemRangeControl(this);
    3031  }
    3132
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/ResultItemVM.cs

    r17451 r17471  
    44using System.Text;
    55using System.Threading.Tasks;
     6using System.Windows.Forms;
    67
    78namespace HeuristicLab.JsonInterface.OptimizerIntegration {
    89  public class ResultItemVM : JsonItemVMBase {
    910    public override Type JsonItemType => typeof(ResultJsonItem);
    10     public override JsonItemBaseControl Control =>
     11    public override UserControl Control =>
    1112      new JsonItemBaseControl(this);
    12 
    1313
    1414  }
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/SingleValueVM.cs

    r17464 r17471  
    1414    protected override int MaxTypeValue => int.MaxValue;
    1515
    16     public override JsonItemBaseControl Control =>
    17       new JsonItemBaseControl(this, new JsonItemIntValueControl(this));
     16    public override UserControl Control =>
     17      new JsonItemIntValueControl(this);
    1818  }
    1919
     
    2424    protected override double MaxTypeValue => double.MaxValue;
    2525
    26     public override JsonItemBaseControl Control =>
    27        new JsonItemBaseControl(this, new JsonItemDoubleValueControl(this));
     26    public override UserControl Control =>
     27       new JsonItemDoubleValueControl(this);
    2828  }
    2929
     
    3434    protected override bool MaxTypeValue => true;
    3535
    36     public override JsonItemBaseControl Control =>
    37        new JsonItemBaseControl(this, new JsonItemBoolControl(this));
     36    public override UserControl Control =>
     37       new JsonItemBoolControl(this);
    3838  }
    3939
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/StringValueVM.cs

    r17464 r17471  
    33using System.Linq;
    44using System.Text;
     5using System.Threading;
    56using System.Threading.Tasks;
     7using System.Windows.Forms;
    68
    79namespace HeuristicLab.JsonInterface.OptimizerIntegration {
    810  public class StringValueVM : JsonItemVMBase {
    911    public override Type JsonItemType => typeof(StringJsonItem);
    10     public override JsonItemBaseControl Control =>
    11        new JsonItemBaseControl(this, new JsonItemValidValuesControl(this));
     12    public override UserControl Control =>
     13       new JsonItemValidValuesControl(this);
    1214
    1315    public string Value {
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.cs

    r17453 r17471  
    5151    private void InitCache() {
    5252      JI2VM = new Dictionary<Type, Type>();
    53       foreach (var vmType in ApplicationManager.Manager.GetTypes(typeof(JsonItemVMBase))) {
    54         JsonItemVMBase vm = (JsonItemVMBase)Activator.CreateInstance(vmType);
     53      foreach (var vmType in ApplicationManager.Manager.GetTypes(typeof(IJsonItemVM))) {
     54        IJsonItemVM vm = (IJsonItemVM)Activator.CreateInstance(vmType);
    5555        JI2VM.Add(vm.JsonItemType, vmType);
    5656      }
     
    9696        foreach (var c in item.Children) {
    9797          if (IsDrawableItem(c)) {
    98             if (c is ResultJsonItem) {
     98            if (c is IResultJsonItem) {
    9999              TreeNode childNode = new TreeNode(c.Name);
    100100              treeViewResults.Nodes.Add(childNode);
     
    113113
    114114    private void RegisterItem(TreeNode node, IJsonItem item, TreeView tv) {
    115       if (JI2VM.TryGetValue(item.GetType(), out Type vmType)) {
     115      if (JI2VM.TryGetValue(item.GetType(), out Type vmType)) { // TODO: enhance for interfaces?
    116116        IJsonItemVM vm = (IJsonItemVM)Activator.CreateInstance(vmType);
    117117
     
    123123        VMs.Add(vm);
    124124        Node2VM.Add(node, vm);
    125         UserControl control = vm.Control;
     125        UserControl control = new JsonItemBaseControl(vm, vm.Control);
    126126        Node2Control.Add(node, control);
     127      } else {
     128        //node.
    127129      }
    128130    }
     
    136138      }
    137139     
    138       return b || (item.Value != null || item.Range != null || item.ActualName != null || item is ResultJsonItem);
     140      return b || (item.Value != null || item.Range != null || item is ILookupJsonItem || item is IResultJsonItem);
    139141    }
    140142   
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemBoolControl.Designer.cs

    r17464 r17471  
    2626      this.checkBoxValue = new System.Windows.Forms.CheckBox();
    2727      this.label2 = new System.Windows.Forms.Label();
     28      this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
     29      this.tableLayoutPanel1.SuspendLayout();
    2830      this.SuspendLayout();
    2931      //
    3032      // checkBoxValue
    3133      //
    32       this.checkBoxValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    33             | System.Windows.Forms.AnchorStyles.Right)));
    3434      this.checkBoxValue.AutoSize = true;
    35       this.checkBoxValue.Location = new System.Drawing.Point(89, 1);
     35      this.checkBoxValue.Dock = System.Windows.Forms.DockStyle.Fill;
     36      this.checkBoxValue.Location = new System.Drawing.Point(100, 0);
     37      this.checkBoxValue.Margin = new System.Windows.Forms.Padding(0);
    3638      this.checkBoxValue.Name = "checkBoxValue";
    37       this.checkBoxValue.Size = new System.Drawing.Size(15, 14);
     39      this.checkBoxValue.Size = new System.Drawing.Size(400, 22);
    3840      this.checkBoxValue.TabIndex = 19;
    3941      this.checkBoxValue.UseVisualStyleBackColor = true;
     
    4244      //
    4345      this.label2.AutoSize = true;
    44       this.label2.Location = new System.Drawing.Point(3, 1);
     46      this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
     47      this.label2.Location = new System.Drawing.Point(0, 0);
     48      this.label2.Margin = new System.Windows.Forms.Padding(0);
    4549      this.label2.Name = "label2";
    46       this.label2.Size = new System.Drawing.Size(34, 13);
     50      this.label2.Size = new System.Drawing.Size(100, 22);
    4751      this.label2.TabIndex = 20;
    4852      this.label2.Text = "Value";
     53      this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     54      //
     55      // tableLayoutPanel1
     56      //
     57      this.tableLayoutPanel1.ColumnCount = 2;
     58      this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F));
     59      this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
     60      this.tableLayoutPanel1.Controls.Add(this.checkBoxValue, 1, 0);
     61      this.tableLayoutPanel1.Controls.Add(this.label2, 0, 0);
     62      this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
     63      this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
     64      this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
     65      this.tableLayoutPanel1.Name = "tableLayoutPanel1";
     66      this.tableLayoutPanel1.RowCount = 1;
     67      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
     68      this.tableLayoutPanel1.Size = new System.Drawing.Size(500, 22);
     69      this.tableLayoutPanel1.TabIndex = 22;
    4970      //
    5071      // JsonItemBoolControl
     
    5273      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    5374      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    54       this.Controls.Add(this.checkBoxValue);
    55       this.Controls.Add(this.label2);
     75      this.Controls.Add(this.tableLayoutPanel1);
     76      this.Margin = new System.Windows.Forms.Padding(0);
    5677      this.Name = "JsonItemBoolControl";
    57       this.Size = new System.Drawing.Size(500, 15);
     78      this.Size = new System.Drawing.Size(500, 22);
     79      this.tableLayoutPanel1.ResumeLayout(false);
     80      this.tableLayoutPanel1.PerformLayout();
    5881      this.ResumeLayout(false);
    59       this.PerformLayout();
    6082
    6183    }
     
    6486    private System.Windows.Forms.CheckBox checkBoxValue;
    6587    private System.Windows.Forms.Label label2;
     88    private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
    6689  }
    6790}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemMultiValueControl.Designer.cs

    r17464 r17471  
    3333      this.checkBoxRows = new System.Windows.Forms.CheckBox();
    3434      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
     35      this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
     36      this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
     37      this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
    3538      ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
    3639      this.groupBox1.SuspendLayout();
    3740      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     41      this.tableLayoutPanel1.SuspendLayout();
     42      this.tableLayoutPanel2.SuspendLayout();
     43      this.tableLayoutPanel3.SuspendLayout();
    3844      this.SuspendLayout();
    3945      //
     
    4450      this.dataGridView.AllowUserToResizeColumns = false;
    4551      this.dataGridView.AllowUserToResizeRows = false;
    46       this.dataGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    47             | System.Windows.Forms.AnchorStyles.Left)
    48             | System.Windows.Forms.AnchorStyles.Right)));
    4952      this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
    50       this.dataGridView.Location = new System.Drawing.Point(9, 70);
     53      this.dataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
     54      this.dataGridView.Location = new System.Drawing.Point(0, 44);
     55      this.dataGridView.Margin = new System.Windows.Forms.Padding(0);
    5156      this.dataGridView.Name = "dataGridView";
    52       this.dataGridView.Size = new System.Drawing.Size(487, 143);
     57      this.dataGridView.Size = new System.Drawing.Size(475, 172);
    5358      this.dataGridView.TabIndex = 13;
    5459      //
     
    5762      this.numericRangeControl1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
    5863            | System.Windows.Forms.AnchorStyles.Right)));
    59       this.numericRangeControl1.Location = new System.Drawing.Point(0, 225);
     64      this.numericRangeControl1.Location = new System.Drawing.Point(0, 235);
     65      this.numericRangeControl1.Margin = new System.Windows.Forms.Padding(0);
    6066      this.numericRangeControl1.Name = "numericRangeControl1";
    61       this.numericRangeControl1.Size = new System.Drawing.Size(502, 71);
     67      this.numericRangeControl1.Size = new System.Drawing.Size(481, 63);
    6268      this.numericRangeControl1.TabIndex = 14;
    6369      //
    6470      // groupBox1
    6571      //
    66       this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    67             | System.Windows.Forms.AnchorStyles.Left)
    68             | System.Windows.Forms.AnchorStyles.Right)));
    69       this.groupBox1.Controls.Add(this.textBoxColumns);
    70       this.groupBox1.Controls.Add(this.textBoxRows);
    71       this.groupBox1.Controls.Add(this.checkBoxColumns);
    72       this.groupBox1.Controls.Add(this.checkBoxRows);
    73       this.groupBox1.Controls.Add(this.dataGridView);
     72      this.groupBox1.Controls.Add(this.tableLayoutPanel2);
     73      this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
    7474      this.groupBox1.Location = new System.Drawing.Point(0, 0);
    7575      this.groupBox1.Margin = new System.Windows.Forms.Padding(0);
    7676      this.groupBox1.Name = "groupBox1";
    77       this.groupBox1.Size = new System.Drawing.Size(502, 222);
     77      this.groupBox1.Size = new System.Drawing.Size(481, 235);
    7878      this.groupBox1.TabIndex = 15;
    7979      this.groupBox1.TabStop = false;
     
    8282      // textBoxColumns
    8383      //
    84       this.textBoxColumns.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    85             | System.Windows.Forms.AnchorStyles.Right)));
    86       this.errorProvider.SetIconAlignment(this.textBoxRows, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    87       this.textBoxColumns.Location = new System.Drawing.Point(86, 46);
     84      this.textBoxColumns.Dock = System.Windows.Forms.DockStyle.Fill;
     85      this.errorProvider.SetIconAlignment(this.textBoxColumns, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     86      this.textBoxColumns.Location = new System.Drawing.Point(100, 22);
     87      this.textBoxColumns.Margin = new System.Windows.Forms.Padding(0);
    8888      this.textBoxColumns.Name = "textBoxColumns";
    8989      this.textBoxColumns.ReadOnly = true;
    90       this.textBoxColumns.Size = new System.Drawing.Size(410, 20);
     90      this.textBoxColumns.Size = new System.Drawing.Size(375, 20);
    9191      this.textBoxColumns.TabIndex = 17;
    92       this.textBoxColumns.TextChanged += new System.EventHandler(this.textBoxColumns_TextChanged);
     92      this.textBoxColumns.Leave += new System.EventHandler(this.textBoxColumns_TextChanged);
    9393      this.textBoxColumns.Validating += new System.ComponentModel.CancelEventHandler(this.textBoxColumns_Validating);
    9494      //
    9595      // textBoxRows
    9696      //
    97       this.textBoxRows.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    98             | System.Windows.Forms.AnchorStyles.Right)));
    99       this.errorProvider.SetIconAlignment(this.textBoxColumns, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    100       this.textBoxRows.Location = new System.Drawing.Point(86, 20);
     97      this.textBoxRows.Dock = System.Windows.Forms.DockStyle.Fill;
     98      this.errorProvider.SetIconAlignment(this.textBoxRows, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     99      this.textBoxRows.Location = new System.Drawing.Point(100, 0);
     100      this.textBoxRows.Margin = new System.Windows.Forms.Padding(0);
    101101      this.textBoxRows.Name = "textBoxRows";
    102102      this.textBoxRows.ReadOnly = true;
    103       this.textBoxRows.Size = new System.Drawing.Size(410, 20);
     103      this.textBoxRows.Size = new System.Drawing.Size(375, 20);
    104104      this.textBoxRows.TabIndex = 16;
    105       this.textBoxRows.TextChanged += new System.EventHandler(this.textBoxRows_TextChanged);
     105      this.textBoxRows.Leave += new System.EventHandler(this.textBoxRows_TextChanged);
    106106      this.textBoxRows.Validating += new System.ComponentModel.CancelEventHandler(this.textBoxRows_Validating);
    107107      //
     
    109109      //
    110110      this.checkBoxColumns.AutoSize = true;
    111       this.checkBoxColumns.Location = new System.Drawing.Point(10, 46);
     111      this.checkBoxColumns.Dock = System.Windows.Forms.DockStyle.Fill;
     112      this.checkBoxColumns.Location = new System.Drawing.Point(0, 22);
     113      this.checkBoxColumns.Margin = new System.Windows.Forms.Padding(0);
    112114      this.checkBoxColumns.Name = "checkBoxColumns";
    113       this.checkBoxColumns.Size = new System.Drawing.Size(69, 17);
     115      this.checkBoxColumns.Size = new System.Drawing.Size(100, 22);
    114116      this.checkBoxColumns.TabIndex = 15;
    115117      this.checkBoxColumns.Text = "Columns:";
     
    119121      //
    120122      this.checkBoxRows.AutoSize = true;
    121       this.checkBoxRows.Location = new System.Drawing.Point(10, 23);
     123      this.checkBoxRows.Dock = System.Windows.Forms.DockStyle.Fill;
     124      this.checkBoxRows.Location = new System.Drawing.Point(0, 0);
     125      this.checkBoxRows.Margin = new System.Windows.Forms.Padding(0);
    122126      this.checkBoxRows.Name = "checkBoxRows";
    123       this.checkBoxRows.Size = new System.Drawing.Size(56, 17);
     127      this.checkBoxRows.Size = new System.Drawing.Size(100, 22);
    124128      this.checkBoxRows.TabIndex = 14;
    125129      this.checkBoxRows.Text = "Rows:";
     
    130134      this.errorProvider.ContainerControl = this;
    131135      //
     136      // tableLayoutPanel1
     137      //
     138      this.tableLayoutPanel1.ColumnCount = 2;
     139      this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F));
     140      this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
     141      this.tableLayoutPanel1.Controls.Add(this.textBoxColumns, 1, 1);
     142      this.tableLayoutPanel1.Controls.Add(this.checkBoxRows, 0, 0);
     143      this.tableLayoutPanel1.Controls.Add(this.textBoxRows, 1, 0);
     144      this.tableLayoutPanel1.Controls.Add(this.checkBoxColumns, 0, 1);
     145      this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
     146      this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
     147      this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
     148      this.tableLayoutPanel1.Name = "tableLayoutPanel1";
     149      this.tableLayoutPanel1.RowCount = 2;
     150      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
     151      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
     152      this.tableLayoutPanel1.Size = new System.Drawing.Size(475, 44);
     153      this.tableLayoutPanel1.TabIndex = 16;
     154      //
     155      // tableLayoutPanel2
     156      //
     157      this.tableLayoutPanel2.ColumnCount = 1;
     158      this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
     159      this.tableLayoutPanel2.Controls.Add(this.dataGridView, 0, 1);
     160      this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel1, 0, 0);
     161      this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
     162      this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 16);
     163      this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
     164      this.tableLayoutPanel2.Name = "tableLayoutPanel2";
     165      this.tableLayoutPanel2.RowCount = 2;
     166      this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 44F));
     167      this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
     168      this.tableLayoutPanel2.Size = new System.Drawing.Size(475, 216);
     169      this.tableLayoutPanel2.TabIndex = 17;
     170      //
     171      // tableLayoutPanel3
     172      //
     173      this.tableLayoutPanel3.ColumnCount = 1;
     174      this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
     175      this.tableLayoutPanel3.Controls.Add(this.numericRangeControl1, 0, 1);
     176      this.tableLayoutPanel3.Controls.Add(this.groupBox1, 0, 0);
     177      this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
     178      this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 0);
     179      this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(0);
     180      this.tableLayoutPanel3.Name = "tableLayoutPanel3";
     181      this.tableLayoutPanel3.RowCount = 2;
     182      this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
     183      this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 63F));
     184      this.tableLayoutPanel3.Size = new System.Drawing.Size(481, 298);
     185      this.tableLayoutPanel3.TabIndex = 16;
     186      //
    132187      // JsonItemMultiValueControl
    133188      //
    134189      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    135190      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    136       this.Controls.Add(this.groupBox1);
    137       this.Controls.Add(this.numericRangeControl1);
     191      this.Controls.Add(this.tableLayoutPanel3);
    138192      this.errorProvider.SetIconAlignment(this, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     193      this.Margin = new System.Windows.Forms.Padding(0);
    139194      this.Name = "JsonItemMultiValueControl";
    140       this.Size = new System.Drawing.Size(502, 296);
     195      this.Size = new System.Drawing.Size(481, 298);
    141196      ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
    142197      this.groupBox1.ResumeLayout(false);
    143       this.groupBox1.PerformLayout();
    144198      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     199      this.tableLayoutPanel1.ResumeLayout(false);
     200      this.tableLayoutPanel1.PerformLayout();
     201      this.tableLayoutPanel2.ResumeLayout(false);
     202      this.tableLayoutPanel3.ResumeLayout(false);
    145203      this.ResumeLayout(false);
    146204
     
    157215    private System.Windows.Forms.TextBox textBoxColumns;
    158216    private System.Windows.Forms.ErrorProvider errorProvider;
     217    private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
     218    private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
     219    private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
    159220  }
    160221}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemMultiValueControl.cs

    r17464 r17471  
    1111namespace HeuristicLab.JsonInterface.OptimizerIntegration {
    1212 
    13   public class JsonItemDoubleNamedMatrixValueControl : JsonItemMultiValueControl<double> {
    14     protected override IEnumerable<string> RowNames {
    15       get => ((DoubleNamedMatrixValueVM)VM).RowNames;
    16       set => ((DoubleNamedMatrixValueVM)VM).RowNames = value;
    17     }
    18     protected override IEnumerable<string> ColumnNames {
    19       get => ((DoubleNamedMatrixValueVM)VM).ColumnNames;
    20       set => ((DoubleNamedMatrixValueVM)VM).ColumnNames = value;
    21     }
    22 
    23     public JsonItemDoubleNamedMatrixValueControl(DoubleNamedMatrixValueVM vm) : base(vm, vm.Value) { }
    24 
    25     protected override void SaveCellData(double data, int row, int col) {
    26       DoubleNamedMatrixValueVM vm = VM as DoubleNamedMatrixValueVM;
    27       vm.SetCellValue(data, row, col);
    28     }
    29   }
    30 
    3113  public class JsonItemDoubleMatrixValueControl : JsonItemMultiValueControl<double> {
    32     protected override IEnumerable<string> RowNames { get => null; set { } }
    33     protected override IEnumerable<string> ColumnNames { get => null; set { } }
    34 
    3514    public JsonItemDoubleMatrixValueControl(DoubleMatrixValueVM vm) : base(vm, vm.Value) { }
    36 
     15   
    3716    protected override void SaveCellData(double data, int row, int col) {
    3817      DoubleMatrixValueVM vm = VM as DoubleMatrixValueVM;
    3918      vm.SetCellValue(data, row, col);
    4019    }
     20   
    4121  }
    4222
    4323  public class JsonItemIntArrayValueControl : JsonItemMultiValueControl<int> {
    44     protected override IEnumerable<string> RowNames { get => null; set { } }
    45     protected override IEnumerable<string> ColumnNames { get => null; set { } }
    46 
    4724    public JsonItemIntArrayValueControl(IntArrayValueVM vm) : base(vm, vm.Value) { }
    48 
     25   
    4926    protected override void SaveCellData(int data, int row, int col) {
    5027      IntArrayValueVM vm = VM as IntArrayValueVM;
    5128      vm.SetIndexValue(data, row);
    5229    }
     30   
    5331  }
    5432
    5533  public class JsonItemDoubleArrayValueControl : JsonItemMultiValueControl<double> {
    56     protected override IEnumerable<string> RowNames { get => null; set { } }
    57     protected override IEnumerable<string> ColumnNames { get => null; set { } }
    58 
    5934    public JsonItemDoubleArrayValueControl(DoubleArrayValueVM vm) : base(vm, vm.Value) { }
    60 
     35   
    6136    protected override void SaveCellData(double data, int row, int col) {
    6237      DoubleArrayValueVM vm = VM as DoubleArrayValueVM;
    6338      vm.SetIndexValue(data, row);
    6439    }
     40   
    6541  }
    6642 
     
    6844    protected IJsonItemVM VM { get; set; }
    6945    protected NumericRangeControl NumericRangeControl { get; set; }
    70     private int _rows;
    71     private int Rows {
    72       get => _rows;
     46    private int Rows { get; set; }
     47    private int Columns { get; set; }
     48
     49    private T[][] Matrix { get; set; }
     50   
     51    protected IEnumerable<string> RowNames {
     52      get {
     53        if(VM is IMatrixJsonItemVM mVM)
     54          return mVM.RowNames;
     55        return null;
     56      }
    7357      set {
    74         _rows = value;
    75         RefreshMatrix();
    76       }
    77     }
    78 
    79     private int _cols;
    80     private int Columns {
    81       get => _cols;
     58        if (VM is IMatrixJsonItemVM mVM)
     59          mVM.RowNames = value;
     60      }
     61    }
     62    protected IEnumerable<string> ColumnNames {
     63      get {
     64        if (VM is IMatrixJsonItemVM mVM)
     65          return mVM.ColumnNames;
     66        return null;
     67      }
    8268      set {
    83         _cols = value;
    84         RefreshMatrix();
    85       }
    86     }
    87 
    88     private T[][] Matrix { get; set; }
    89 
    90     protected abstract IEnumerable<string> RowNames { get; set; }
    91     protected abstract IEnumerable<string> ColumnNames { get; set; }
    92 
    93     public JsonItemMultiValueControl(IMatrixJsonItemVM vm, T[][] matrix) /*: base(vm)*/ {
     69        if (VM is IMatrixJsonItemVM mVM)
     70          mVM.ColumnNames = value;
     71      }
     72    }
     73   
     74    public JsonItemMultiValueControl(IMatrixJsonItemVM vm, T[][] matrix) {
    9475      InitializeComponent();
    9576      VM = vm;
     
    10182
    10283      Matrix = matrix;
    103       _cols = cols;
    104       _rows = rows;
     84      Columns = cols;
     85      Rows = rows;
    10586      RefreshMatrix();
    10687      InitSizeConfiguration(rows, cols);
     
    10990    }
    11091   
    111     public JsonItemMultiValueControl(IArrayJsonItemVM vm, T[] array) /*: base(vm)*/ {
     92    public JsonItemMultiValueControl(IArrayJsonItemVM vm, T[] array) {
    11293      InitializeComponent();
    11394      VM = vm;
     
    11899      Matrix = new T[1][];
    119100      Matrix[0] = array;
    120       _cols = 1;
    121       _rows = length;
     101      Columns = 1;
     102      Rows = length;
    122103      RefreshMatrix();
    123104
     
    154135      Matrix = new T[Columns][];
    155136     
    156       // columns must added first
    157       if(RowNames != null && RowNames.Count() == Columns) {
    158         foreach(var name in RowNames) {
    159           dataGridView.Columns.Add(name, name);
    160         }
    161       } else {
    162         for(int c = 0; c < Columns; ++c) {
    163           dataGridView.Columns.Add($"Column {c}", $"Column {c}");
    164         }
     137      for (int c = 0; c < Columns; ++c) {
     138        string name = $"Column {c}";
     139        if (RowNames != null && c < RowNames.Count())
     140          name = RowNames.ElementAt(c);
     141        dataGridView.Columns.Add(name, name);
    165142      }
    166143
     
    178155            //col and row is switched for dataGridView
    179156            dataGridView[c, r].Value = Matrix[c][r];
     157            string name = $"Row {r}";
    180158            if (ColumnNames != null && r < ColumnNames.Count())
    181               dataGridView.Rows[r].HeaderCell.Value = ColumnNames.ElementAt(r);
    182             else
    183               dataGridView.Rows[r].HeaderCell.Value = $"Row {r}";
     159              name = ColumnNames.ElementAt(r);
     160            dataGridView.Rows[r].HeaderCell.Value = name;
    184161          }
    185162        }
    186163      }
    187164      dataGridView.RowHeadersWidth = 100;
    188      
    189165    }
    190166
     
    230206   
    231207    private void textBoxRows_TextChanged(object sender, EventArgs e) {
    232       if(int.TryParse(textBoxRows.Text, out int r)) {
     208      if(!textBoxRows.ReadOnly && int.TryParse(textBoxRows.Text, out int r) && Rows != r) {
    233209        Rows = r;
     210        RefreshMatrix();
    234211      }
    235212    }
    236213
    237214    private void textBoxColumns_TextChanged(object sender, EventArgs e) {
    238       if (int.TryParse(textBoxColumns.Text, out int c)) {
     215      if (!textBoxColumns.ReadOnly && int.TryParse(textBoxColumns.Text, out int c) && Columns != c) {
    239216        Columns = c;
     217        RefreshMatrix();
    240218      }
    241219    }
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemRangeControl.Designer.cs

    r17464 r17471  
    2727      this.groupBox1 = new System.Windows.Forms.GroupBox();
    2828      this.textBoxValueTo = new System.Windows.Forms.TextBox();
    29       this.textBoxValueFrom = new System.Windows.Forms.TextBox();
    3029      this.label4 = new System.Windows.Forms.Label();
    3130      this.label2 = new System.Windows.Forms.Label();
     31      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
     32      this.textBoxValueFrom = new System.Windows.Forms.TextBox();
     33      this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
    3234      this.numericRangeControl = new HeuristicLab.JsonInterface.OptimizerIntegration.NumericRangeControl();
    33       this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
    3435      this.groupBox1.SuspendLayout();
    3536      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     37      this.tableLayoutPanel1.SuspendLayout();
    3638      this.SuspendLayout();
    3739      //
     
    4042      this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    4143            | System.Windows.Forms.AnchorStyles.Right)));
    42       this.groupBox1.Controls.Add(this.textBoxValueTo);
    43       this.groupBox1.Controls.Add(this.textBoxValueFrom);
    44       this.groupBox1.Controls.Add(this.label4);
    45       this.groupBox1.Controls.Add(this.label2);
     44      this.groupBox1.Controls.Add(this.tableLayoutPanel1);
    4645      this.groupBox1.Location = new System.Drawing.Point(0, 0);
    4746      this.groupBox1.Margin = new System.Windows.Forms.Padding(0);
     
    5453      // textBoxValueTo
    5554      //
    56       this.textBoxValueTo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    57             | System.Windows.Forms.AnchorStyles.Right)));
    58       this.textBoxValueTo.Location = new System.Drawing.Point(85, 39);
     55      this.textBoxValueTo.Dock = System.Windows.Forms.DockStyle.Fill;
     56      this.textBoxValueTo.Location = new System.Drawing.Point(100, 24);
     57      this.textBoxValueTo.Margin = new System.Windows.Forms.Padding(0);
    5958      this.textBoxValueTo.Name = "textBoxValueTo";
    60       this.textBoxValueTo.Size = new System.Drawing.Size(409, 20);
     59      this.textBoxValueTo.Size = new System.Drawing.Size(394, 20);
    6160      this.textBoxValueTo.TabIndex = 3;
     61      //
     62      // label4
     63      //
     64      this.label4.AutoSize = true;
     65      this.label4.Dock = System.Windows.Forms.DockStyle.Fill;
     66      this.label4.Location = new System.Drawing.Point(0, 24);
     67      this.label4.Margin = new System.Windows.Forms.Padding(0);
     68      this.label4.Name = "label4";
     69      this.label4.Size = new System.Drawing.Size(100, 25);
     70      this.label4.TabIndex = 1;
     71      this.label4.Text = "To:";
     72      this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     73      //
     74      // label2
     75      //
     76      this.label2.AutoSize = true;
     77      this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
     78      this.label2.Location = new System.Drawing.Point(0, 0);
     79      this.label2.Margin = new System.Windows.Forms.Padding(0);
     80      this.label2.Name = "label2";
     81      this.label2.Size = new System.Drawing.Size(100, 24);
     82      this.label2.TabIndex = 0;
     83      this.label2.Text = "From:";
     84      this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     85      //
     86      // errorProvider
     87      //
     88      this.errorProvider.ContainerControl = this;
    6289      //
    6390      // textBoxValueFrom
    6491      //
    65       this.textBoxValueFrom.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    66             | System.Windows.Forms.AnchorStyles.Right)));
    67       this.textBoxValueFrom.Location = new System.Drawing.Point(85, 13);
     92      this.textBoxValueFrom.Dock = System.Windows.Forms.DockStyle.Fill;
     93      this.textBoxValueFrom.Location = new System.Drawing.Point(100, 0);
     94      this.textBoxValueFrom.Margin = new System.Windows.Forms.Padding(0);
    6895      this.textBoxValueFrom.Name = "textBoxValueFrom";
    69       this.textBoxValueFrom.Size = new System.Drawing.Size(409, 20);
     96      this.textBoxValueFrom.Size = new System.Drawing.Size(394, 20);
    7097      this.textBoxValueFrom.TabIndex = 2;
    7198      //
    72       // label4
     99      // tableLayoutPanel1
    73100      //
    74       this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    75             | System.Windows.Forms.AnchorStyles.Right)));
    76       this.label4.AutoSize = true;
    77       this.label4.Location = new System.Drawing.Point(6, 42);
    78       this.label4.Name = "label4";
    79       this.label4.Size = new System.Drawing.Size(23, 13);
    80       this.label4.TabIndex = 1;
    81       this.label4.Text = "To:";
    82       //
    83       // label2
    84       //
    85       this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    86             | System.Windows.Forms.AnchorStyles.Right)));
    87       this.label2.AutoSize = true;
    88       this.label2.Location = new System.Drawing.Point(6, 16);
    89       this.label2.Name = "label2";
    90       this.label2.Size = new System.Drawing.Size(33, 13);
    91       this.label2.TabIndex = 0;
    92       this.label2.Text = "From:";
     101      this.tableLayoutPanel1.ColumnCount = 2;
     102      this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F));
     103      this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
     104      this.tableLayoutPanel1.Controls.Add(this.label2, 0, 0);
     105      this.tableLayoutPanel1.Controls.Add(this.textBoxValueTo, 1, 1);
     106      this.tableLayoutPanel1.Controls.Add(this.textBoxValueFrom, 1, 0);
     107      this.tableLayoutPanel1.Controls.Add(this.label4, 0, 1);
     108      this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
     109      this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 16);
     110      this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
     111      this.tableLayoutPanel1.Name = "tableLayoutPanel1";
     112      this.tableLayoutPanel1.RowCount = 2;
     113      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
     114      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
     115      this.tableLayoutPanel1.Size = new System.Drawing.Size(494, 49);
     116      this.tableLayoutPanel1.TabIndex = 19;
    93117      //
    94118      // numericRangeControl
     
    97121            | System.Windows.Forms.AnchorStyles.Right)));
    98122      this.numericRangeControl.Location = new System.Drawing.Point(0, 71);
     123      this.numericRangeControl.Margin = new System.Windows.Forms.Padding(0);
    99124      this.numericRangeControl.Name = "numericRangeControl";
    100125      this.numericRangeControl.Size = new System.Drawing.Size(500, 74);
    101126      this.numericRangeControl.TabIndex = 18;
    102       //
    103       // errorProvider
    104       //
    105       this.errorProvider.ContainerControl = this;
    106127      //
    107128      // JsonItemRangeControl
     
    112133      this.Controls.Add(this.groupBox1);
    113134      this.errorProvider.SetIconAlignment(this, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     135      this.Margin = new System.Windows.Forms.Padding(0);
    114136      this.Name = "JsonItemRangeControl";
    115       this.Size = new System.Drawing.Size(500, 146);
     137      this.Size = new System.Drawing.Size(500, 147);
    116138      this.groupBox1.ResumeLayout(false);
    117       this.groupBox1.PerformLayout();
    118139      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     140      this.tableLayoutPanel1.ResumeLayout(false);
     141      this.tableLayoutPanel1.PerformLayout();
    119142      this.ResumeLayout(false);
    120143
     
    125148    private System.Windows.Forms.GroupBox groupBox1;
    126149    private System.Windows.Forms.TextBox textBoxValueTo;
    127     private System.Windows.Forms.TextBox textBoxValueFrom;
    128150    private System.Windows.Forms.Label label4;
    129151    private System.Windows.Forms.Label label2;
    130152    private NumericRangeControl numericRangeControl;
    131153    private System.Windows.Forms.ErrorProvider errorProvider;
     154    private System.Windows.Forms.TextBox textBoxValueFrom;
     155    private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
    132156  }
    133157}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemValidValuesControl.Designer.cs

    r17464 r17471  
    3030      this.groupBoxRange = new System.Windows.Forms.GroupBox();
    3131      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
     32      this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
     33      this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
    3234      this.groupBoxRange.SuspendLayout();
    3335      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     36      this.tableLayoutPanel1.SuspendLayout();
     37      this.tableLayoutPanel2.SuspendLayout();
    3438      this.SuspendLayout();
    3539      //
     
    4751      this.tableOptions.RowCount = 1;
    4852      this.tableOptions.RowStyles.Add(new System.Windows.Forms.RowStyle());
    49       this.tableOptions.Size = new System.Drawing.Size(491, 190);
     53      this.tableOptions.Size = new System.Drawing.Size(494, 217);
    5054      this.tableOptions.TabIndex = 12;
    5155      //
    5256      // comboBoxValues
    5357      //
    54       this.comboBoxValues.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    55             | System.Windows.Forms.AnchorStyles.Right)));
     58      this.comboBoxValues.Dock = System.Windows.Forms.DockStyle.Fill;
    5659      this.comboBoxValues.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    5760      this.comboBoxValues.FormattingEnabled = true;
    58       this.comboBoxValues.Location = new System.Drawing.Point(89, 1);
     61      this.comboBoxValues.Location = new System.Drawing.Point(100, 0);
    5962      this.comboBoxValues.Margin = new System.Windows.Forms.Padding(0);
    6063      this.comboBoxValues.Name = "comboBoxValues";
    61       this.comboBoxValues.Size = new System.Drawing.Size(408, 21);
     64      this.comboBoxValues.Size = new System.Drawing.Size(400, 21);
    6265      this.comboBoxValues.TabIndex = 15;
    6366      //
     
    6568      //
    6669      this.label2.AutoSize = true;
    67       this.label2.Location = new System.Drawing.Point(3, 1);
     70      this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
     71      this.label2.Location = new System.Drawing.Point(0, 0);
     72      this.label2.Margin = new System.Windows.Forms.Padding(0);
    6873      this.label2.Name = "label2";
    69       this.label2.Size = new System.Drawing.Size(34, 13);
     74      this.label2.Size = new System.Drawing.Size(100, 22);
    7075      this.label2.TabIndex = 16;
    7176      this.label2.Text = "Value";
     77      this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
    7278      //
    7379      // groupBoxRange
    7480      //
    75       this.groupBoxRange.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    76             | System.Windows.Forms.AnchorStyles.Left)
    77             | System.Windows.Forms.AnchorStyles.Right)));
    7881      this.groupBoxRange.Controls.Add(this.tableOptions);
     82      this.groupBoxRange.Dock = System.Windows.Forms.DockStyle.Fill;
    7983      this.groupBoxRange.Location = new System.Drawing.Point(0, 22);
    80       this.groupBoxRange.Margin = new System.Windows.Forms.Padding(0, 3, 0, 0);
     84      this.groupBoxRange.Margin = new System.Windows.Forms.Padding(0);
    8185      this.groupBoxRange.Name = "groupBoxRange";
    82       this.groupBoxRange.Size = new System.Drawing.Size(497, 209);
     86      this.groupBoxRange.Size = new System.Drawing.Size(500, 236);
    8387      this.groupBoxRange.TabIndex = 17;
    8488      this.groupBoxRange.TabStop = false;
     
    8993      this.errorProvider.ContainerControl = this;
    9094      //
     95      // tableLayoutPanel1
     96      //
     97      this.tableLayoutPanel1.ColumnCount = 1;
     98      this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
     99      this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 0);
     100      this.tableLayoutPanel1.Controls.Add(this.groupBoxRange, 0, 1);
     101      this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
     102      this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
     103      this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
     104      this.tableLayoutPanel1.Name = "tableLayoutPanel1";
     105      this.tableLayoutPanel1.RowCount = 2;
     106      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
     107      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
     108      this.tableLayoutPanel1.Size = new System.Drawing.Size(500, 258);
     109      this.tableLayoutPanel1.TabIndex = 18;
     110      //
     111      // tableLayoutPanel2
     112      //
     113      this.tableLayoutPanel2.ColumnCount = 2;
     114      this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F));
     115      this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
     116      this.tableLayoutPanel2.Controls.Add(this.label2, 0, 0);
     117      this.tableLayoutPanel2.Controls.Add(this.comboBoxValues, 1, 0);
     118      this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
     119      this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0);
     120      this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
     121      this.tableLayoutPanel2.Name = "tableLayoutPanel2";
     122      this.tableLayoutPanel2.RowCount = 1;
     123      this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
     124      this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
     125      this.tableLayoutPanel2.Size = new System.Drawing.Size(500, 22);
     126      this.tableLayoutPanel2.TabIndex = 19;
     127      //
    91128      // JsonItemValidValuesControl
    92129      //
    93130      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    94131      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    95       this.Controls.Add(this.groupBoxRange);
    96       this.Controls.Add(this.label2);
    97       this.Controls.Add(this.comboBoxValues);
     132      this.Controls.Add(this.tableLayoutPanel1);
    98133      this.ForeColor = System.Drawing.Color.Black;
    99134      this.errorProvider.SetIconAlignment(this, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     135      this.Margin = new System.Windows.Forms.Padding(0);
    100136      this.Name = "JsonItemValidValuesControl";
    101       this.Size = new System.Drawing.Size(500, 231);
     137      this.Size = new System.Drawing.Size(500, 258);
    102138      this.groupBoxRange.ResumeLayout(false);
    103139      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     140      this.tableLayoutPanel1.ResumeLayout(false);
     141      this.tableLayoutPanel2.ResumeLayout(false);
     142      this.tableLayoutPanel2.PerformLayout();
    104143      this.ResumeLayout(false);
    105       this.PerformLayout();
    106144
    107145    }
     
    113151    private System.Windows.Forms.GroupBox groupBoxRange;
    114152    private System.Windows.Forms.ErrorProvider errorProvider;
     153    private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
     154    private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
    115155  }
    116156}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemValueControl.Designer.cs

    r17464 r17471  
    2929      this.numericRangeControl1 = new HeuristicLab.JsonInterface.OptimizerIntegration.NumericRangeControl();
    3030      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
     31      this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
     32      this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
    3133      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     34      this.tableLayoutPanel1.SuspendLayout();
     35      this.tableLayoutPanel2.SuspendLayout();
    3236      this.SuspendLayout();
    3337      //
    3438      // textBoxValue
    3539      //
    36       this.textBoxValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    37             | System.Windows.Forms.AnchorStyles.Right)));
    38       this.textBoxValue.Location = new System.Drawing.Point(89, 1);
     40      this.textBoxValue.Dock = System.Windows.Forms.DockStyle.Fill;
     41      this.textBoxValue.Location = new System.Drawing.Point(100, 0);
    3942      this.textBoxValue.Margin = new System.Windows.Forms.Padding(0);
    4043      this.textBoxValue.Name = "textBoxValue";
    41       this.textBoxValue.Size = new System.Drawing.Size(408, 20);
     44      this.textBoxValue.Size = new System.Drawing.Size(577, 20);
    4245      this.textBoxValue.TabIndex = 14;
    4346      this.textBoxValue.Validating += new System.ComponentModel.CancelEventHandler(this.textBoxValue_Validating);
     
    4649      //
    4750      this.label2.AutoSize = true;
    48       this.label2.Location = new System.Drawing.Point(3, 1);
     51      this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
     52      this.label2.Location = new System.Drawing.Point(0, 0);
     53      this.label2.Margin = new System.Windows.Forms.Padding(0);
    4954      this.label2.Name = "label2";
    50       this.label2.Size = new System.Drawing.Size(34, 13);
     55      this.label2.Size = new System.Drawing.Size(100, 22);
    5156      this.label2.TabIndex = 15;
    5257      this.label2.Text = "Value";
     58      this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
    5359      //
    5460      // numericRangeControl1
    5561      //
    56       this.numericRangeControl1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    57             | System.Windows.Forms.AnchorStyles.Right)));
    58       this.numericRangeControl1.Location = new System.Drawing.Point(0, 24);
    59       this.numericRangeControl1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 0);
     62      this.numericRangeControl1.Dock = System.Windows.Forms.DockStyle.Fill;
     63      this.numericRangeControl1.Location = new System.Drawing.Point(0, 22);
     64      this.numericRangeControl1.Margin = new System.Windows.Forms.Padding(0);
    6065      this.numericRangeControl1.Name = "numericRangeControl1";
    61       this.numericRangeControl1.Size = new System.Drawing.Size(497, 72);
     66      this.numericRangeControl1.Size = new System.Drawing.Size(677, 66);
    6267      this.numericRangeControl1.TabIndex = 16;
    6368      //
     
    6671      this.errorProvider.ContainerControl = this;
    6772      //
     73      // tableLayoutPanel1
     74      //
     75      this.tableLayoutPanel1.ColumnCount = 2;
     76      this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F));
     77      this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
     78      this.tableLayoutPanel1.Controls.Add(this.label2, 0, 0);
     79      this.tableLayoutPanel1.Controls.Add(this.textBoxValue, 1, 0);
     80      this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
     81      this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
     82      this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
     83      this.tableLayoutPanel1.Name = "tableLayoutPanel1";
     84      this.tableLayoutPanel1.RowCount = 1;
     85      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
     86      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
     87      this.tableLayoutPanel1.Size = new System.Drawing.Size(677, 22);
     88      this.tableLayoutPanel1.TabIndex = 17;
     89      //
     90      // tableLayoutPanel2
     91      //
     92      this.tableLayoutPanel2.ColumnCount = 1;
     93      this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
     94      this.tableLayoutPanel2.Controls.Add(this.numericRangeControl1, 0, 1);
     95      this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel1, 0, 0);
     96      this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Top;
     97      this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0);
     98      this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
     99      this.tableLayoutPanel2.Name = "tableLayoutPanel2";
     100      this.tableLayoutPanel2.RowCount = 2;
     101      this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
     102      this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
     103      this.tableLayoutPanel2.Size = new System.Drawing.Size(677, 88);
     104      this.tableLayoutPanel2.TabIndex = 18;
     105      //
    68106      // JsonItemValueControl
    69107      //
    70108      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    71109      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    72       this.Controls.Add(this.numericRangeControl1);
    73       this.Controls.Add(this.label2);
    74       this.Controls.Add(this.textBoxValue);
     110      this.Controls.Add(this.tableLayoutPanel2);
    75111      this.errorProvider.SetIconAlignment(this, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     112      this.Margin = new System.Windows.Forms.Padding(0);
    76113      this.Name = "JsonItemValueControl";
    77       this.Size = new System.Drawing.Size(500, 97);
     114      this.Size = new System.Drawing.Size(677, 88);
    78115      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     116      this.tableLayoutPanel1.ResumeLayout(false);
     117      this.tableLayoutPanel1.PerformLayout();
     118      this.tableLayoutPanel2.ResumeLayout(false);
    79119      this.ResumeLayout(false);
    80       this.PerformLayout();
    81120
    82121    }
     
    88127    private NumericRangeControl numericRangeControl1;
    89128    private System.Windows.Forms.ErrorProvider errorProvider;
     129    private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
     130    private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
    90131  }
    91132}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemValueControl.cs

    r17464 r17471  
    2828    protected override string ValuePropertyId => nameof(DoubleValueVM.Value);
    2929    #endregion
    30 
     30   
    3131    public JsonItemDoubleValueControl(DoubleValueVM vm) : base(vm) {
    3232      Init();
     
    4545    #endregion
    4646
    47     public JsonItemValueControl(JsonItemVMBase vm) {
     47    public JsonItemValueControl() {
     48      InitializeComponent();
     49    }
     50
     51    public JsonItemValueControl(IJsonItemVM vm) {
    4852      InitializeComponent();
    4953      VM = vm;
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/LookupParameterConverter.cs

    r17433 r17471  
    1212   
    1313    public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) =>
    14       ((ILookupParameter)item).ActualName = data.ActualName as string;
     14      ((ILookupParameter)item).ActualName = ((ILookupJsonItem)data).ActualName as string;
    1515
    1616    public override IJsonItem Extract(IItem value, IJsonItemConverter root) {
    1717      IParameter parameter = value as IParameter;
    1818
    19       IJsonItem item = new JsonItem() {
     19      IJsonItem item = new LookupJsonItem() {
    2020        Name = parameter.Name,
    2121        Description = parameter.Description,
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/RegressionProblemDataConverter.cs

    r17464 r17471  
    1818    public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) {
    1919      var dictTmp = new Dictionary<string, IList>();
    20       DoubleNamedMatrixJsonItem matrix = data.Children[0] as DoubleNamedMatrixJsonItem;
     20      DoubleMatrixJsonItem matrix = data.Children[0] as DoubleMatrixJsonItem;
    2121      if(matrix != null) {
    2222        int c = 0;
     
    6868          ++c;
    6969        }
    70         item.AddChildren(new DoubleNamedMatrixJsonItem() {
     70        item.AddChildren(new DoubleMatrixJsonItem() {
    7171          Name = "Dataset",
    7272          Value = mat,
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ResultParameterConverter.cs

    r17451 r17471  
    1717      return new ResultJsonItem() {
    1818        Name = res.ActualName,
    19         ActualName = res.ActualName,
    2019        Value = res.ActualName,
    2120        Description = res.Description
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueLookupParameterConverter.cs

    r17451 r17471  
    1313    public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) {
    1414      IValueLookupParameter param = item as IValueLookupParameter;
    15       param.ActualName = CastValue<string>(data.ActualName);
     15      param.ActualName = CastValue<string>(((IValueLookupJsonItem)data).ActualName);
    1616      if (param.Value != null)
    1717        root.Inject(param.Value, data, root);
     
    2121      IValueLookupParameter param = value as IValueLookupParameter;
    2222
    23       IJsonItem item = new JsonItem() {};
     23      IValueLookupJsonItem item = new ValueLookupJsonItem() {};
    2424
    2525      if (param.Value != null) {
    2626        IJsonItem tmp = root.Extract(param.Value, root);
    27         item = tmp;
     27        item.Value = tmp.Value;
     28        item.Range = tmp.Range;
     29        item.Name = tmp.Name;
     30        item.Description = tmp.Description;
     31        item.AddChildren(tmp.Children);
     32        item.Active = tmp.Active;
     33        item.JsonItemReference = tmp;
    2834      } else {
    2935        var min = GetMinValue(param.DataType);
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueTypeMatrixConverter.cs

    r17451 r17471  
    3333    public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) {
    3434      DoubleMatrix mat = item as DoubleMatrix;
    35       DoubleNamedMatrixJsonItem d = data as DoubleNamedMatrixJsonItem;
     35      DoubleMatrixJsonItem d = data as DoubleMatrixJsonItem;
    3636      CopyMatrixData(mat, d.Value);
    3737    }
    3838
    3939    public override IJsonItem Extract(IItem value, IJsonItemConverter root) =>
    40       new DoubleNamedMatrixJsonItem() {
     40      new DoubleMatrixJsonItem() {
    4141        Name = "[OverridableParamName]",
    4242        Description = value.ItemDescription,
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/HeuristicLab.JsonInterface.csproj

    r17451 r17471  
    7070    <Compile Include="Interfaces\IJsonItem.cs" />
    7171    <Compile Include="Interfaces\IJsonItemValidator.cs" />
     72    <Compile Include="Interfaces\ILookupJsonItem.cs" />
    7273    <Compile Include="Interfaces\IMatrixJsonItem.cs" />
    73     <Compile Include="Interfaces\INamedMatrixJsonItem.cs" />
     74    <Compile Include="Interfaces\IResultJsonItem.cs" />
     75    <Compile Include="Interfaces\IValueLookupJsonItem.cs" />
    7476    <Compile Include="Models\ArrayJsonItemBase.cs" />
    7577    <Compile Include="Models\BoolJsonItems.cs" />
     
    7981    <Compile Include="Models\IntJsonItems.cs" />
    8082    <Compile Include="Models\JsonItem.cs" />
     83    <Compile Include="Models\LookupJsonItem.cs" />
    8184    <Compile Include="Models\MatrixJsonItemBase.cs" />
    82     <Compile Include="Models\NamedMatrixJsonItemBase.cs" />
    8385    <Compile Include="Models\ResultJsonItem.cs" />
    8486    <Compile Include="Models\StringJsonItem.cs" />
    8587    <Compile Include="Models\UnsupportedJsonItem.cs" />
     88    <Compile Include="Models\ValueLookupJsonItem.cs" />
    8689    <Compile Include="SingleLineArrayJsonWriter.cs" />
    8790    <Compile Include="Extensions\TypeExtensions.cs" />
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IJsonItem.cs

    r17451 r17471  
    2727
    2828    IEnumerable<object> Range { get; set; }
    29 
    30     string ActualName { get; set; }
    31 
     29   
    3230    IJsonItemValidator GetValidator();
    3331
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IMatrixJsonItem.cs

    r17446 r17471  
    99    bool RowsResizable { get; set; }
    1010    bool ColumnsResizable { get; set; }
     11    IEnumerable<string> RowNames { get; set; }
     12    IEnumerable<string> ColumnNames { get; set; }
    1113  }
    1214}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JCGenerator.cs

    r17451 r17471  
    4141      // filter result items
    4242      foreach (var item in jsonItems) {
    43         if (item is ResultJsonItem)
     43        if (item is IResultJsonItem)
    4444          resultItems.Add(Serialize(item));
    4545        else
     
    6262      IEnumerable<IJsonItem> children = item.Children;
    6363     
    64       if (item.Active && (item.Value != null || item.Range != null || item is ResultJsonItem || item.ActualName != null)) {
     64      if (item.Active && (item.Value != null || item.Range != null || item is IResultJsonItem || item is ILookupJsonItem)) {
    6565        jsonItems.Add(item);
    6666      }
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/DoubleJsonItems.cs

    r17451 r17471  
    2323    }
    2424  }
    25 
    26   public class DoubleNamedMatrixJsonItem : NamedMatrixJsonItemBase<double> {
    27     protected override bool IsInRange() {
    28       for (int c = 0; c < Value.Length; ++c) {
    29         for (int r = 0; r < Value[c].Length; ++r) {
    30           if (Value[c][r] < Range.First() && Range.Last() < Value[c][r])
    31             return false;
    32         }
    33       }
    34       return true;
    35     }
    36   }
    3725}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntJsonItems.cs

    r17454 r17471  
    77namespace HeuristicLab.JsonInterface {
    88  public class IntJsonItem : JsonItem<int> {
     9    //public new IEnumerable<int> Range { get; }
    910    /*
    1011    public int MinValue { get; set; }
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/JsonItem.cs

    r17451 r17471  
    6666    public virtual IEnumerable<object> Range { get; set; }
    6767   
    68     // TODO eigene items für LookUp?
    69     public virtual string ActualName { get; set; }
    70 
    7168    // TODO jsonIgnore dataType?
    7269
     
    110107      Value = jObject[nameof(IJsonItem.Value)]?.ToObject<object>();
    111108      Range = jObject[nameof(IJsonItem.Range)]?.ToObject<object[]>();
    112       ActualName = jObject[nameof(IJsonItem.ActualName)]?.ToString();
    113109    }
    114110    #endregion
     
    118114     * TODO protected abstract bool Validate();
    119115     */
    120 
     116     
    121117    protected virtual bool IsInRange() {
    122118      bool b1 = true, b2 = true;
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/MatrixJsonItemBase.cs

    r17446 r17471  
    1111    public virtual bool ColumnsResizable { get; set; }
    1212
     13    IList<string> rows = new List<string>();
     14    public IEnumerable<string> RowNames {
     15      get => rows;
     16      set => rows = new List<string>(value);
     17    }
     18
     19    IList<string> cols = new List<string>();
     20    public IEnumerable<string> ColumnNames {
     21      get => cols;
     22      set => cols = new List<string>(value);
     23    }
     24
    1325    public override void SetFromJObject(JObject jObject) {
    1426      base.SetFromJObject(jObject);
    1527      RowsResizable = (jObject[nameof(IMatrixJsonItem.RowsResizable)]?.ToObject<bool>()).GetValueOrDefault();
    1628      ColumnsResizable = (jObject[nameof(IMatrixJsonItem.ColumnsResizable)]?.ToObject<bool>()).GetValueOrDefault();
     29      RowNames = jObject[nameof(IMatrixJsonItem.RowNames)]?.ToObject<IEnumerable<string>>();
     30      ColumnNames = jObject[nameof(IMatrixJsonItem.ColumnNames)]?.ToObject<IEnumerable<string>>();
    1731    }
    1832  }
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ResultJsonItem.cs

    r17451 r17471  
    66
    77namespace HeuristicLab.JsonInterface {
    8   public class ResultJsonItem : JsonItem {
     8  public class ResultJsonItem : JsonItem, IResultJsonItem {
    99
    1010  }
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/UnsupportedJsonItem.cs

    r17433 r17471  
    4343      set => throw new NotSupportedException();
    4444    }
    45 
    46     public override string ActualName {
    47       get => throw new NotSupportedException();
    48       set => throw new NotSupportedException();
    49     }
    5045  }
    5146}
Note: See TracChangeset for help on using the changeset viewer.