Changeset 17443
- Timestamp:
- 02/18/20 14:39:50 (5 years ago)
- Location:
- branches/3026_IntegrationIntoSymSpace
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Shared/JsonItemBaseControl.Designer.cs
r17435 r17443 60 60 this.textBoxActualName.Location = new System.Drawing.Point(92, 75); 61 61 this.textBoxActualName.Name = "textBoxActualName"; 62 this.textBoxActualName.Size = new System.Drawing.Size(40 4, 20);62 this.textBoxActualName.Size = new System.Drawing.Size(402, 20); 63 63 this.textBoxActualName.TabIndex = 12; 64 64 // … … 79 79 this.textBoxName.Location = new System.Drawing.Point(92, 23); 80 80 this.textBoxName.Name = "textBoxName"; 81 this.textBoxName.Size = new System.Drawing.Size(40 4, 20);81 this.textBoxName.Size = new System.Drawing.Size(402, 20); 82 82 this.textBoxName.TabIndex = 10; 83 83 // … … 107 107 this.textBoxDescription.Location = new System.Drawing.Point(92, 49); 108 108 this.textBoxDescription.Name = "textBoxDescription"; 109 this.textBoxDescription.Size = new System.Drawing.Size(40 4, 20);109 this.textBoxDescription.Size = new System.Drawing.Size(402, 20); 110 110 this.textBoxDescription.TabIndex = 14; 111 111 // … … 124 124 this.Name = "JsonItemBaseControl"; 125 125 this.Padding = new System.Windows.Forms.Padding(3); 126 this.Size = new System.Drawing.Size(50 2, 154);126 this.Size = new System.Drawing.Size(500, 154); 127 127 this.ResumeLayout(false); 128 128 this.PerformLayout(); -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Shared/JsonItemBaseControl.cs
r17433 r17443 16 16 InitializeComponent(); 17 17 } 18 18 19 19 public JsonItemBaseControl(JsonItemVMBase vm) { 20 20 InitializeComponent(); … … 31 31 else 32 32 textBoxActualName.Text = VM.Item.ActualName; 33 33 34 } 34 35 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/SingleValueVM.cs
r17433 r17443 14 14 protected override int MaxTypeValue => int.MaxValue; 15 15 16 public override JsonItemBaseControl GetControl() => 16 public override JsonItemBaseControl GetControl() => 17 17 new JsonItemIntValueControl(this); 18 18 } … … 24 24 protected override double MaxTypeValue => double.MaxValue; 25 25 26 public override JsonItemBaseControl GetControl() => 26 public override JsonItemBaseControl GetControl() => 27 27 new JsonItemDoubleValueControl(this); 28 28 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/StringValueVM.cs
r17417 r17443 20 20 21 21 public IEnumerable<string> Range { 22 get => Item.Range .Cast<string>();22 get => Item.Range?.Cast<string>(); 23 23 set { 24 24 Item.Range = value; -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.Designer.cs
r17439 r17443 38 38 this.tabPage2 = new System.Windows.Forms.TabPage(); 39 39 this.jsonItemBindingSource = new System.Windows.Forms.BindingSource(this.components); 40 this.treeViewResults = new System.Windows.Forms.TreeView(); 40 41 this.groupBoxDetails.SuspendLayout(); 41 42 this.groupBox2.SuspendLayout(); … … 111 112 | System.Windows.Forms.AnchorStyles.Right))); 112 113 this.resultItems.FormattingEnabled = true; 113 this.resultItems.Location = new System.Drawing.Point(6, 19);114 this.resultItems.Location = new System.Drawing.Point(6, 364); 114 115 this.resultItems.Name = "resultItems"; 115 this.resultItems.Size = new System.Drawing.Size(777, 499);116 this.resultItems.Size = new System.Drawing.Size(777, 154); 116 117 this.resultItems.TabIndex = 5; 117 118 // … … 134 135 | System.Windows.Forms.AnchorStyles.Left) 135 136 | System.Windows.Forms.AnchorStyles.Right))); 137 this.groupBox3.Controls.Add(this.treeViewResults); 136 138 this.groupBox3.Controls.Add(this.resultItems); 137 139 this.groupBox3.Location = new System.Drawing.Point(6, 6); … … 199 201 // 200 202 this.jsonItemBindingSource.DataSource = typeof(HeuristicLab.JsonInterface.IJsonItem); 203 // 204 // treeViewResults 205 // 206 this.treeViewResults.CheckBoxes = true; 207 this.treeViewResults.Location = new System.Drawing.Point(6, 19); 208 this.treeViewResults.Name = "treeViewResults"; 209 this.treeViewResults.Size = new System.Drawing.Size(777, 339); 210 this.treeViewResults.TabIndex = 6; 201 211 // 202 212 // ExportJsonDialog … … 242 252 private System.Windows.Forms.TabPage tabPage1; 243 253 private System.Windows.Forms.TabPage tabPage2; 254 private System.Windows.Forms.TreeView treeViewResults; 244 255 } 245 256 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.cs
r17439 r17443 125 125 if (c is ResultItem) { 126 126 resultItems.Items.Add(c.Name, true); 127 127 128 ResultItems.Add(c.Name, c); 128 129 } else { … … 154 155 panel.Controls.Add(control); 155 156 control.Width = panel.Width; 157 control.Height = panel.Height; 156 158 control.Dock = DockStyle.Fill; 157 159 control.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemBoolControl.Designer.cs
r17433 r17443 52 52 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 53 53 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 54 this.BackColor = System.Drawing.SystemColors.Control;55 54 this.Controls.Add(this.label2); 56 55 this.Controls.Add(this.checkBoxValue); -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemRangeControl.Designer.cs
r17433 r17443 102 102 this.Controls.Add(this.groupBox1); 103 103 this.Name = "JsonItemRangeControl"; 104 this.Size = new System.Drawing.Size(500, 301);104 this.Size = new System.Drawing.Size(500, 290); 105 105 this.Controls.SetChildIndex(this.groupBox1, 0); 106 106 this.Controls.SetChildIndex(this.numericRangeControl1, 0); -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemValidValuesControl.Designer.cs
r17433 r17443 25 25 private void InitializeComponent() { 26 26 this.tableOptions = new System.Windows.Forms.TableLayoutPanel(); 27 this.groupBoxRange = new System.Windows.Forms.GroupBox();28 27 this.comboBoxValues = new System.Windows.Forms.ComboBox(); 29 28 this.label2 = new System.Windows.Forms.Label(); 29 this.groupBoxRange = new System.Windows.Forms.GroupBox(); 30 30 this.groupBoxRange.SuspendLayout(); 31 31 this.SuspendLayout(); … … 33 33 // tableOptions 34 34 // 35 this.tableOptions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 36 | System.Windows.Forms.AnchorStyles.Left) 37 | System.Windows.Forms.AnchorStyles.Right))); 38 this.tableOptions.AutoSize = true; 35 this.tableOptions.AutoScroll = true; 36 this.tableOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 37 this.tableOptions.BackColor = System.Drawing.SystemColors.Control; 39 38 this.tableOptions.ColumnCount = 2; 40 39 this.tableOptions.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); 41 40 this.tableOptions.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 42 this.tableOptions.Location = new System.Drawing.Point(6, 19); 41 this.tableOptions.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); 42 this.tableOptions.Dock = System.Windows.Forms.DockStyle.Fill; 43 this.tableOptions.Location = new System.Drawing.Point(3, 16); 43 44 this.tableOptions.Name = "tableOptions"; 44 45 this.tableOptions.RowCount = 1; 45 46 this.tableOptions.RowStyles.Add(new System.Windows.Forms.RowStyle()); 46 this.tableOptions.Size = new System.Drawing.Size(4 78, 417);47 this.tableOptions.Size = new System.Drawing.Size(482, 170); 47 48 this.tableOptions.TabIndex = 12; 48 //49 // groupBoxRange50 //51 this.groupBoxRange.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)52 | System.Windows.Forms.AnchorStyles.Left)53 | System.Windows.Forms.AnchorStyles.Right)));54 this.groupBoxRange.AutoSize = true;55 this.groupBoxRange.Controls.Add(this.tableOptions);56 this.groupBoxRange.Location = new System.Drawing.Point(6, 128);57 this.groupBoxRange.Name = "groupBoxRange";58 this.groupBoxRange.Size = new System.Drawing.Size(490, 442);59 this.groupBoxRange.TabIndex = 14;60 this.groupBoxRange.TabStop = false;61 this.groupBoxRange.Text = "Range";62 49 // 63 50 // comboBoxValues … … 69 56 this.comboBoxValues.Location = new System.Drawing.Point(92, 101); 70 57 this.comboBoxValues.Name = "comboBoxValues"; 71 this.comboBoxValues.Size = new System.Drawing.Size(40 4, 21);58 this.comboBoxValues.Size = new System.Drawing.Size(402, 21); 72 59 this.comboBoxValues.TabIndex = 15; 73 60 // … … 81 68 this.label2.Text = "Value"; 82 69 // 70 // groupBoxRange 71 // 72 this.groupBoxRange.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 73 | System.Windows.Forms.AnchorStyles.Left) 74 | System.Windows.Forms.AnchorStyles.Right))); 75 this.groupBoxRange.Controls.Add(this.tableOptions); 76 this.groupBoxRange.Location = new System.Drawing.Point(6, 128); 77 this.groupBoxRange.Name = "groupBoxRange"; 78 this.groupBoxRange.Size = new System.Drawing.Size(488, 189); 79 this.groupBoxRange.TabIndex = 17; 80 this.groupBoxRange.TabStop = false; 81 this.groupBoxRange.Text = "Range"; 82 // 83 83 // JsonItemValidValuesControl 84 84 // 85 85 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 86 86 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 87 this. AutoSize = true;87 this.Controls.Add(this.groupBoxRange); 88 88 this.Controls.Add(this.label2); 89 89 this.Controls.Add(this.comboBoxValues); 90 this.Controls.Add(this.groupBoxRange);91 90 this.ForeColor = System.Drawing.Color.Black; 92 91 this.Name = "JsonItemValidValuesControl"; 93 this.Size = new System.Drawing.Size(500, 576); 94 this.Controls.SetChildIndex(this.groupBoxRange, 0); 92 this.Size = new System.Drawing.Size(500, 323); 95 93 this.Controls.SetChildIndex(this.comboBoxValues, 0); 96 94 this.Controls.SetChildIndex(this.label2, 0); 95 this.Controls.SetChildIndex(this.groupBoxRange, 0); 97 96 this.groupBoxRange.ResumeLayout(false); 98 this.groupBoxRange.PerformLayout();99 97 this.ResumeLayout(false); 100 98 this.PerformLayout(); … … 104 102 #endregion 105 103 private System.Windows.Forms.TableLayoutPanel tableOptions; 106 private System.Windows.Forms.GroupBox groupBoxRange;107 104 private System.Windows.Forms.ComboBox comboBoxValues; 108 105 private System.Windows.Forms.Label label2; 106 private System.Windows.Forms.GroupBox groupBoxRange; 109 107 } 110 108 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemValidValuesControl.cs
r17417 r17443 14 14 public JsonItemValidValuesControl(StringValueVM vm) : base(vm) { 15 15 InitializeComponent(); 16 foreach (var i in VM.Item.Range) 17 SetupOption((string)i); 18 19 comboBoxValues.DataBindings.Add("SelectedItem", VM, nameof(StringValueVM.Value)); 16 if (VM.Item.Range != null) { 17 foreach (var i in VM.Item.Range) 18 SetupOption((string)i); 19 comboBoxValues.DataBindings.Add("SelectedItem", VM, nameof(StringValueVM.Value)); 20 } else { 21 comboBoxValues.Hide(); 22 groupBoxRange.Hide(); 23 TextBox tb = new TextBox(); 24 this.Controls.Add(tb); 25 tb.Location = comboBoxValues.Location; 26 tb.Size = comboBoxValues.Size; 27 tb.Anchor = comboBoxValues.Anchor; 28 tb.Dock = comboBoxValues.Dock; 29 tb.DataBindings.Add("Text", VM, nameof(StringValueVM.Value)); 30 tb.Show(); 31 } 20 32 } 21 33 … … 24 36 TextBox tb = new TextBox(); 25 37 tb.Text = opt; 38 //tb.Size = new Size() 26 39 tb.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; 27 tb.Size = new Size(420, 20);40 //tb.Dock = DockStyle.Right | DockStyle.Left; 28 41 tb.ReadOnly = true; 29 42 -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemValueControl.Designer.cs
r17433 r17443 35 35 this.textBoxValue.Location = new System.Drawing.Point(92, 101); 36 36 this.textBoxValue.Name = "textBoxValue"; 37 this.textBoxValue.Size = new System.Drawing.Size(40 4, 20);37 this.textBoxValue.Size = new System.Drawing.Size(402, 20); 38 38 this.textBoxValue.TabIndex = 14; 39 39 // … … 53 53 this.numericRangeControl1.Location = new System.Drawing.Point(9, 127); 54 54 this.numericRangeControl1.Name = "numericRangeControl1"; 55 this.numericRangeControl1.Size = new System.Drawing.Size(48 7, 112);55 this.numericRangeControl1.Size = new System.Drawing.Size(485, 112); 56 56 this.numericRangeControl1.TabIndex = 16; 57 57 // -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemValueControl.cs
r17433 r17443 13 13 14 14 public class JsonItemIntValueControl : JsonItemValueControl { 15 15 16 16 #region Overriden Properties 17 17 protected override string ValuePropertyId => nameof(IntValueVM.Value); 18 18 #endregion 19 19 20 20 public JsonItemIntValueControl(IntValueVM vm) : base(vm) { 21 21 Init(); … … 24 24 25 25 public class JsonItemDoubleValueControl : JsonItemValueControl { 26 26 27 27 #region Overriden Properties 28 28 protected override string ValuePropertyId => nameof(DoubleValueVM.Value); … … 49 49 NumericRangeControl = numericRangeControl1; 50 50 } 51 51 52 52 protected void Init() { 53 53 TBValue.DataBindings.Add("Text", base.VM, ValuePropertyId); -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/AlgorithmConverter.cs
r17435 r17443 16 16 base.Inject(item, data, root); 17 17 IAlgorithm algorithm = item as IAlgorithm; 18 IJsonItem problemData = data.Children.Where(x => x.Name == algorithm.Problem. Name).First();18 IJsonItem problemData = data.Children.Where(x => x.Name == algorithm.Problem.ItemName).First(); 19 19 root.Inject(algorithm.Problem, problemData, root); 20 20 -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/StringValueConverter.cs
r17433 r17443 17 17 public override IJsonItem Extract(IItem value, IJsonItemConverter root) => 18 18 new StringJsonItem() { 19 Name = value.ItemName,19 Name = "[OverridableParamName]", 20 20 Description = value.ItemDescription, 21 21 Value = ((StringValue)value).Value
Note: See TracChangeset
for help on using the changeset viewer.