Changeset 17435 for branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration
- Timestamp:
- 02/11/20 17:35:28 (5 years ago)
- Location:
- branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Shared/JsonItemBaseControl.Designer.cs
r17433 r17435 79 79 this.textBoxName.Location = new System.Drawing.Point(92, 23); 80 80 this.textBoxName.Name = "textBoxName"; 81 this.textBoxName.ReadOnly = true;82 81 this.textBoxName.Size = new System.Drawing.Size(404, 20); 83 82 this.textBoxName.TabIndex = 10; -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.Designer.cs
r17406 r17435 31 31 this.panel = new System.Windows.Forms.Panel(); 32 32 this.jsonItemBindingSource = new System.Windows.Forms.BindingSource(this.components); 33 this.resultItems = new System.Windows.Forms.CheckedListBox(); 34 this.groupBox2 = new System.Windows.Forms.GroupBox(); 35 this.groupBox3 = new System.Windows.Forms.GroupBox(); 36 this.splitContainer1 = new System.Windows.Forms.SplitContainer(); 37 this.splitContainer2 = new System.Windows.Forms.SplitContainer(); 33 38 this.groupBoxDetails.SuspendLayout(); 34 39 ((System.ComponentModel.ISupportInitialize)(this.jsonItemBindingSource)).BeginInit(); 40 this.groupBox2.SuspendLayout(); 41 this.groupBox3.SuspendLayout(); 42 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); 43 this.splitContainer1.Panel1.SuspendLayout(); 44 this.splitContainer1.Panel2.SuspendLayout(); 45 this.splitContainer1.SuspendLayout(); 46 ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); 47 this.splitContainer2.Panel1.SuspendLayout(); 48 this.splitContainer2.Panel2.SuspendLayout(); 49 this.splitContainer2.SuspendLayout(); 35 50 this.SuspendLayout(); 36 51 // … … 43 58 // exportButton 44 59 // 45 this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 46 this.exportButton.Location = new System.Drawing.Point(801, 687); 60 this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 61 | System.Windows.Forms.AnchorStyles.Right))); 62 this.exportButton.Location = new System.Drawing.Point(3, 570); 47 63 this.exportButton.Name = "exportButton"; 48 this.exportButton.Size = new System.Drawing.Size( 121, 34);64 this.exportButton.Size = new System.Drawing.Size(422, 29); 49 65 this.exportButton.TabIndex = 1; 50 66 this.exportButton.Text = "Export"; … … 54 70 // treeView 55 71 // 56 this.treeView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 57 | System.Windows.Forms.AnchorStyles.Left))); 58 this.treeView.Location = new System.Drawing.Point(12, 12); 72 this.treeView.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.treeView.Location = new System.Drawing.Point(6, 19); 59 76 this.treeView.Name = "treeView"; 60 this.treeView.Size = new System.Drawing.Size(3 42, 669);77 this.treeView.Size = new System.Drawing.Size(353, 327); 61 78 this.treeView.TabIndex = 3; 62 79 this.treeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_AfterSelect); … … 68 85 | System.Windows.Forms.AnchorStyles.Right))); 69 86 this.groupBoxDetails.Controls.Add(this.panel); 70 this.groupBoxDetails.Location = new System.Drawing.Point(3 60, 12);87 this.groupBoxDetails.Location = new System.Drawing.Point(3, 3); 71 88 this.groupBoxDetails.Name = "groupBoxDetails"; 72 this.groupBoxDetails.Size = new System.Drawing.Size( 562, 669);89 this.groupBoxDetails.Size = new System.Drawing.Size(422, 561); 73 90 this.groupBoxDetails.TabIndex = 4; 74 91 this.groupBoxDetails.TabStop = false; … … 83 100 this.panel.Location = new System.Drawing.Point(7, 20); 84 101 this.panel.Name = "panel"; 85 this.panel.Size = new System.Drawing.Size( 549, 643);102 this.panel.Size = new System.Drawing.Size(409, 535); 86 103 this.panel.TabIndex = 0; 87 104 // … … 89 106 // 90 107 this.jsonItemBindingSource.DataSource = typeof(HeuristicLab.JsonInterface.IJsonItem); 108 // 109 // resultItems 110 // 111 this.resultItems.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 112 | System.Windows.Forms.AnchorStyles.Left) 113 | System.Windows.Forms.AnchorStyles.Right))); 114 this.resultItems.FormattingEnabled = true; 115 this.resultItems.Location = new System.Drawing.Point(6, 19); 116 this.resultItems.Name = "resultItems"; 117 this.resultItems.Size = new System.Drawing.Size(353, 199); 118 this.resultItems.TabIndex = 5; 119 // 120 // groupBox2 121 // 122 this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 123 | System.Windows.Forms.AnchorStyles.Left) 124 | System.Windows.Forms.AnchorStyles.Right))); 125 this.groupBox2.Controls.Add(this.treeView); 126 this.groupBox2.Location = new System.Drawing.Point(3, 3); 127 this.groupBox2.Name = "groupBox2"; 128 this.groupBox2.Size = new System.Drawing.Size(365, 352); 129 this.groupBox2.TabIndex = 6; 130 this.groupBox2.TabStop = false; 131 this.groupBox2.Text = "Elements"; 132 // 133 // groupBox3 134 // 135 this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 136 | System.Windows.Forms.AnchorStyles.Left) 137 | System.Windows.Forms.AnchorStyles.Right))); 138 this.groupBox3.Controls.Add(this.resultItems); 139 this.groupBox3.Location = new System.Drawing.Point(3, 3); 140 this.groupBox3.Name = "groupBox3"; 141 this.groupBox3.Size = new System.Drawing.Size(365, 231); 142 this.groupBox3.TabIndex = 7; 143 this.groupBox3.TabStop = false; 144 this.groupBox3.Text = "Result Elements"; 145 // 146 // splitContainer1 147 // 148 this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 149 | System.Windows.Forms.AnchorStyles.Left) 150 | System.Windows.Forms.AnchorStyles.Right))); 151 this.splitContainer1.Location = new System.Drawing.Point(3, 3); 152 this.splitContainer1.Name = "splitContainer1"; 153 this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; 154 // 155 // splitContainer1.Panel1 156 // 157 this.splitContainer1.Panel1.Controls.Add(this.groupBox2); 158 // 159 // splitContainer1.Panel2 160 // 161 this.splitContainer1.Panel2.Controls.Add(this.groupBox3); 162 this.splitContainer1.Size = new System.Drawing.Size(371, 599); 163 this.splitContainer1.SplitterDistance = 358; 164 this.splitContainer1.TabIndex = 8; 165 // 166 // splitContainer2 167 // 168 this.splitContainer2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 169 | System.Windows.Forms.AnchorStyles.Left) 170 | System.Windows.Forms.AnchorStyles.Right))); 171 this.splitContainer2.Location = new System.Drawing.Point(12, 12); 172 this.splitContainer2.Name = "splitContainer2"; 173 // 174 // splitContainer2.Panel1 175 // 176 this.splitContainer2.Panel1.Controls.Add(this.splitContainer1); 177 // 178 // splitContainer2.Panel2 179 // 180 this.splitContainer2.Panel2.Controls.Add(this.groupBoxDetails); 181 this.splitContainer2.Panel2.Controls.Add(this.exportButton); 182 this.splitContainer2.Size = new System.Drawing.Size(809, 605); 183 this.splitContainer2.SplitterDistance = 377; 184 this.splitContainer2.TabIndex = 9; 91 185 // 92 186 // ExportJsonDialog … … 94 188 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 95 189 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 96 this.ClientSize = new System.Drawing.Size(934, 733); 97 this.Controls.Add(this.groupBoxDetails); 98 this.Controls.Add(this.treeView); 99 this.Controls.Add(this.exportButton); 190 this.ClientSize = new System.Drawing.Size(833, 629); 191 this.Controls.Add(this.splitContainer2); 100 192 this.Name = "ExportJsonDialog"; 101 193 this.RightToLeft = System.Windows.Forms.RightToLeft.No; … … 104 196 this.groupBoxDetails.ResumeLayout(false); 105 197 ((System.ComponentModel.ISupportInitialize)(this.jsonItemBindingSource)).EndInit(); 198 this.groupBox2.ResumeLayout(false); 199 this.groupBox3.ResumeLayout(false); 200 this.splitContainer1.Panel1.ResumeLayout(false); 201 this.splitContainer1.Panel2.ResumeLayout(false); 202 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); 203 this.splitContainer1.ResumeLayout(false); 204 this.splitContainer2.Panel1.ResumeLayout(false); 205 this.splitContainer2.Panel2.ResumeLayout(false); 206 ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); 207 this.splitContainer2.ResumeLayout(false); 106 208 this.ResumeLayout(false); 107 209 … … 117 219 private System.Windows.Forms.GroupBox groupBoxDetails; 118 220 private System.Windows.Forms.Panel panel; 221 private System.Windows.Forms.CheckedListBox resultItems; 222 private System.Windows.Forms.GroupBox groupBox2; 223 private System.Windows.Forms.GroupBox groupBox3; 224 private System.Windows.Forms.SplitContainer splitContainer1; 225 private System.Windows.Forms.SplitContainer splitContainer2; 119 226 } 120 227 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.cs
r17432 r17435 22 22 private IList<JsonItemVMBase> VMs { get; set; } 23 23 private JCGenerator Generator { get; set; } = new JCGenerator(); 24 private IDictionary<string, IJsonItem> ResultItems = new Dictionary<string, IJsonItem>(); 24 25 25 26 private IContent content; … … 31 32 VMs = new List<JsonItemVMBase>(); 32 33 treeView.Nodes.Clear(); 34 ResultItems.Clear(); 33 35 34 36 Optimizer = content as IOptimizer; 35 37 Root = JsonItemConverter.Extract(Optimizer); 36 38 TreeNode parent = new TreeNode(Root.Name); 37 39 38 40 BuildTreeNode(parent, Root); 39 41 treeView.Nodes.Add(parent); … … 63 65 x.Item.Parent.Children.Remove(x.Item); 64 66 } 67 } 68 69 foreach(var x in ResultItems.Values) { 70 x.Parent.Children.Remove(x); 71 } 72 73 foreach(var x in resultItems.CheckedItems) { 74 if(ResultItems.TryGetValue((string)x, out IJsonItem item)) { 75 Root.AddChildren(item); 76 } 77 } 78 79 IList<IJsonItem> faultyItems = new List<IJsonItem>(); 80 if(!Root.GetValidator().Validate(ref faultyItems)) { 81 //print faultyItems 65 82 } 66 83 … … 95 112 if (IsDrawableItem(c)) { 96 113 if (c is ResultItem) { 97 114 resultItems.Items.Add(c.Name, true); 115 ResultItems.Add(c.Name, c); 98 116 } else { 99 117 TreeNode childNode = new TreeNode(c.Name);
Note: See TracChangeset
for help on using the changeset viewer.