Changeset 2796
- Timestamp:
- 02/15/10 05:26:02 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 15 added
- 55 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab 3.3.sln
r2790 r2796 75 75 {958B43BC-CC5C-4FA2-8628-2B3B01D890B6} = {958B43BC-CC5C-4FA2-8628-2B3B01D890B6} 76 76 {AB687BBE-1BFE-476B-906D-44237135431D} = {AB687BBE-1BFE-476B-906D-44237135431D} 77 {DF2E61C4-A76D-4315-9D0B-53A077B1AC2C} = {DF2E61C4-A76D-4315-9D0B-53A077B1AC2C} 77 78 {102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B} = {102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B} 78 79 {EE2034D9-6E27-48A1-B855-42D45F69A4FC} = {EE2034D9-6E27-48A1-B855-42D45F69A4FC} … … 133 134 EndProject 134 135 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Netron-3.0.2672.12446", "HeuristicLab.ExtLibs\HeuristicLab.Netron\3.0.2672.12446\HeuristicLab.Netron-3.0.2672.12446\HeuristicLab.Netron-3.0.2672.12446.csproj", "{BB994448-2B21-4564-BB2E-38D8FFF8CF18}" 136 EndProject 137 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Routing.TSP.Views-3.3", "HeuristicLab.Routing.TSP.Views\3.3\HeuristicLab.Routing.TSP.Views-3.3.csproj", "{DF2E61C4-A76D-4315-9D0B-53A077B1AC2C}" 135 138 EndProject 136 139 Global … … 578 581 {BB994448-2B21-4564-BB2E-38D8FFF8CF18}.Release|x64.ActiveCfg = Release|Any CPU 579 582 {BB994448-2B21-4564-BB2E-38D8FFF8CF18}.Release|x86.ActiveCfg = Release|Any CPU 583 {DF2E61C4-A76D-4315-9D0B-53A077B1AC2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 584 {DF2E61C4-A76D-4315-9D0B-53A077B1AC2C}.Debug|Any CPU.Build.0 = Debug|Any CPU 585 {DF2E61C4-A76D-4315-9D0B-53A077B1AC2C}.Debug|x64.ActiveCfg = Debug|Any CPU 586 {DF2E61C4-A76D-4315-9D0B-53A077B1AC2C}.Debug|x86.ActiveCfg = Debug|Any CPU 587 {DF2E61C4-A76D-4315-9D0B-53A077B1AC2C}.Release|Any CPU.ActiveCfg = Release|Any CPU 588 {DF2E61C4-A76D-4315-9D0B-53A077B1AC2C}.Release|Any CPU.Build.0 = Release|Any CPU 589 {DF2E61C4-A76D-4315-9D0B-53A077B1AC2C}.Release|x64.ActiveCfg = Release|Any CPU 590 {DF2E61C4-A76D-4315-9D0B-53A077B1AC2C}.Release|x86.ActiveCfg = Release|Any CPU 580 591 EndGlobalSection 581 592 GlobalSection(SolutionProperties) = preSolution -
trunk/sources/HeuristicLab 3.3/Files.txt
r2772 r2796 29 29 HeuristicLab.Random\3.3:HeuristicLab.Random-3.3.dll 30 30 HeuristicLab.Routing.TSP\3.3:HeuristicLab.Routing.TSP-3.3.dll 31 HeuristicLab.Routing.TSP.Views\3.3:HeuristicLab.Routing.TSP.Views-3.3.dll 31 32 HeuristicLab.Selection\3.3:HeuristicLab.Selection-3.3.dll 32 33 HeuristicLab.Selection.OffspringSelection\3.3:HeuristicLab.Selection.OffspringSelection-3.3.dll -
trunk/sources/HeuristicLab.Core.Views/3.3/CreateParameterDialog.Designer.cs
r2790 r2796 120 120 this.descriptionTextBox.Name = "descriptionTextBox"; 121 121 this.descriptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 122 this.descriptionTextBox.Size = new System.Drawing.Size(452, 10 3);122 this.descriptionTextBox.Size = new System.Drawing.Size(452, 102); 123 123 this.descriptionTextBox.TabIndex = 4; 124 124 // … … 127 127 this.dataTypeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 128 128 this.dataTypeLabel.AutoSize = true; 129 this.dataTypeLabel.Location = new System.Drawing.Point( 9, 426);129 this.dataTypeLabel.Location = new System.Drawing.Point(12, 425); 130 130 this.dataTypeLabel.Name = "dataTypeLabel"; 131 131 this.dataTypeLabel.Size = new System.Drawing.Size(60, 13); … … 138 138 | System.Windows.Forms.AnchorStyles.Right))); 139 139 this.dataTypeTextBox.Enabled = false; 140 this.dataTypeTextBox.Location = new System.Drawing.Point(78, 42 3);140 this.dataTypeTextBox.Location = new System.Drawing.Point(78, 422); 141 141 this.dataTypeTextBox.Name = "dataTypeTextBox"; 142 142 this.dataTypeTextBox.ReadOnly = true; 143 this.dataTypeTextBox.Size = new System.Drawing.Size(42 3, 20);143 this.dataTypeTextBox.Size = new System.Drawing.Size(422, 20); 144 144 this.dataTypeTextBox.TabIndex = 6; 145 145 // … … 149 149 this.setDataTypeButton.Enabled = false; 150 150 this.setDataTypeButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Add; 151 this.setDataTypeButton.Location = new System.Drawing.Point(50 7, 421);151 this.setDataTypeButton.Location = new System.Drawing.Point(506, 420); 152 152 this.setDataTypeButton.Name = "setDataTypeButton"; 153 this.setDataTypeButton.Size = new System.Drawing.Size(2 3, 23);153 this.setDataTypeButton.Size = new System.Drawing.Size(24, 24); 154 154 this.setDataTypeButton.TabIndex = 7; 155 155 this.toolTip.SetToolTip(this.setDataTypeButton, "Set Data Type"); … … 193 193 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 194 194 this.Text = "Create Parameter"; 195 this.Load += new System.EventHandler(this.CreateParameterDialog_Load);196 195 this.ResumeLayout(false); 197 196 this.PerformLayout(); -
trunk/sources/HeuristicLab.Core.Views/3.3/CreateParameterDialog.cs
r2790 r2796 35 35 protected TypeSelectorDialog typeSelectorDialog; 36 36 37 public TypeSelector ParameterTypeSelector { 38 get { return parameterTypeSelector; } 39 } 37 40 public IParameter Parameter { 38 41 get { … … 56 59 public CreateParameterDialog() { 57 60 InitializeComponent(); 61 parameterTypeSelector.Configure(typeof(IParameter), false, true); 58 62 } 59 63 … … 70 74 } 71 75 okButton.Enabled = dataTypeTextBox.Tag != null; 72 }73 74 protected virtual void CreateParameterDialog_Load(object sender, EventArgs e) {75 parameterTypeSelector.Configure(typeof(IParameter), false, true);76 76 } 77 77 -
trunk/sources/HeuristicLab.Core.Views/3.3/EngineView.Designer.cs
r2790 r2796 33 33 protected override void Dispose(bool disposing) { 34 34 if (disposing) { 35 if (typeSelectorDialog != null) typeSelectorDialog.Dispose(); 35 36 if (components != null) components.Dispose(); 36 37 } … … 54 55 this.startButton = new System.Windows.Forms.Button(); 55 56 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 57 this.newProblemButton = new System.Windows.Forms.Button(); 58 this.openProblemButton = new System.Windows.Forms.Button(); 59 this.saveProblemButton = new System.Windows.Forms.Button(); 60 this.newOperatorGraphButton = new System.Windows.Forms.Button(); 61 this.openOperatorGraphButton = new System.Windows.Forms.Button(); 62 this.saveOperatorGraphButton = new System.Windows.Forms.Button(); 56 63 this.tabControl = new System.Windows.Forms.TabControl(); 57 64 this.operatorGraphTabPage = new System.Windows.Forms.TabPage(); 58 65 this.globalScopeTabPage = new System.Windows.Forms.TabPage(); 66 this.problemTabPage = new System.Windows.Forms.TabPage(); 67 this.problemViewHost = new HeuristicLab.Core.Views.ViewHost(); 68 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 69 this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); 59 70 this.tabControl.SuspendLayout(); 60 71 this.operatorGraphTabPage.SuspendLayout(); 61 72 this.globalScopeTabPage.SuspendLayout(); 73 this.problemTabPage.SuspendLayout(); 62 74 this.SuspendLayout(); 63 75 // … … 87 99 | System.Windows.Forms.AnchorStyles.Right))); 88 100 this.operatorGraphView.Caption = "Operator Graph"; 89 this.operatorGraphView.Location = new System.Drawing.Point(6, 6); 101 this.operatorGraphView.Content = null; 102 this.operatorGraphView.Location = new System.Drawing.Point(6, 36); 90 103 this.operatorGraphView.Name = "operatorGraphView"; 91 this.operatorGraphView.Size = new System.Drawing.Size(782, 5 73);92 this.operatorGraphView.TabIndex = 0;104 this.operatorGraphView.Size = new System.Drawing.Size(782, 542); 105 this.operatorGraphView.TabIndex = 3; 93 106 // 94 107 // scopeView … … 98 111 | System.Windows.Forms.AnchorStyles.Right))); 99 112 this.scopeView.Caption = "Scope"; 113 this.scopeView.Content = null; 100 114 this.scopeView.Location = new System.Drawing.Point(6, 6); 101 115 this.scopeView.Name = "scopeView"; 102 this.scopeView.Size = new System.Drawing.Size(782, 57 3);116 this.scopeView.Size = new System.Drawing.Size(782, 572); 103 117 this.scopeView.TabIndex = 0; 104 118 // … … 107 121 this.resetButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 108 122 this.resetButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Restart; 109 this.resetButton.Location = new System.Drawing.Point( 58, 617);123 this.resetButton.Location = new System.Drawing.Point(60, 616); 110 124 this.resetButton.Name = "resetButton"; 111 this.resetButton.Size = new System.Drawing.Size(2 3, 23);125 this.resetButton.Size = new System.Drawing.Size(24, 24); 112 126 this.resetButton.TabIndex = 3; 113 127 this.toolTip.SetToolTip(this.resetButton, "Reset Engine"); … … 120 134 this.stopButton.Enabled = false; 121 135 this.stopButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Stop; 122 this.stopButton.Location = new System.Drawing.Point( 29, 617);136 this.stopButton.Location = new System.Drawing.Point(30, 616); 123 137 this.stopButton.Name = "stopButton"; 124 this.stopButton.Size = new System.Drawing.Size(2 3, 23);138 this.stopButton.Size = new System.Drawing.Size(24, 24); 125 139 this.stopButton.TabIndex = 2; 126 140 this.toolTip.SetToolTip(this.stopButton, "Stop Engine"); … … 132 146 this.startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 133 147 this.startButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Play; 134 this.startButton.Location = new System.Drawing.Point(0, 61 7);148 this.startButton.Location = new System.Drawing.Point(0, 616); 135 149 this.startButton.Name = "startButton"; 136 this.startButton.Size = new System.Drawing.Size(2 3, 23);150 this.startButton.Size = new System.Drawing.Size(24, 24); 137 151 this.startButton.TabIndex = 1; 138 152 this.toolTip.SetToolTip(this.startButton, "Start Engine"); 139 153 this.startButton.UseVisualStyleBackColor = true; 140 154 this.startButton.Click += new System.EventHandler(this.startButton_Click); 155 // 156 // newProblemButton 157 // 158 this.newProblemButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.NewDocument; 159 this.newProblemButton.Location = new System.Drawing.Point(6, 6); 160 this.newProblemButton.Name = "newProblemButton"; 161 this.newProblemButton.Size = new System.Drawing.Size(24, 24); 162 this.newProblemButton.TabIndex = 0; 163 this.toolTip.SetToolTip(this.newProblemButton, "Create New Problem"); 164 this.newProblemButton.UseVisualStyleBackColor = true; 165 this.newProblemButton.Click += new System.EventHandler(this.newProblemButton_Click); 166 // 167 // openProblemButton 168 // 169 this.openProblemButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Open; 170 this.openProblemButton.Location = new System.Drawing.Point(36, 6); 171 this.openProblemButton.Name = "openProblemButton"; 172 this.openProblemButton.Size = new System.Drawing.Size(24, 24); 173 this.openProblemButton.TabIndex = 1; 174 this.toolTip.SetToolTip(this.openProblemButton, "Open Problem"); 175 this.openProblemButton.UseVisualStyleBackColor = true; 176 this.openProblemButton.Click += new System.EventHandler(this.openProblemButton_Click); 177 // 178 // saveProblemButton 179 // 180 this.saveProblemButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Save; 181 this.saveProblemButton.Location = new System.Drawing.Point(66, 6); 182 this.saveProblemButton.Name = "saveProblemButton"; 183 this.saveProblemButton.Size = new System.Drawing.Size(24, 24); 184 this.saveProblemButton.TabIndex = 2; 185 this.toolTip.SetToolTip(this.saveProblemButton, "Save Problem"); 186 this.saveProblemButton.UseVisualStyleBackColor = true; 187 this.saveProblemButton.Click += new System.EventHandler(this.saveProblemButton_Click); 188 // 189 // newOperatorGraphButton 190 // 191 this.newOperatorGraphButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.NewDocument; 192 this.newOperatorGraphButton.Location = new System.Drawing.Point(6, 6); 193 this.newOperatorGraphButton.Name = "newOperatorGraphButton"; 194 this.newOperatorGraphButton.Size = new System.Drawing.Size(24, 24); 195 this.newOperatorGraphButton.TabIndex = 0; 196 this.toolTip.SetToolTip(this.newOperatorGraphButton, "Create New Operator Graph"); 197 this.newOperatorGraphButton.UseVisualStyleBackColor = true; 198 this.newOperatorGraphButton.Click += new System.EventHandler(this.newOperatorGraphButton_Click); 199 // 200 // openOperatorGraphButton 201 // 202 this.openOperatorGraphButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Open; 203 this.openOperatorGraphButton.Location = new System.Drawing.Point(36, 6); 204 this.openOperatorGraphButton.Name = "openOperatorGraphButton"; 205 this.openOperatorGraphButton.Size = new System.Drawing.Size(24, 24); 206 this.openOperatorGraphButton.TabIndex = 1; 207 this.toolTip.SetToolTip(this.openOperatorGraphButton, "Open Operator Graph"); 208 this.openOperatorGraphButton.UseVisualStyleBackColor = true; 209 this.openOperatorGraphButton.Click += new System.EventHandler(this.openOperatorGraphButton_Click); 210 // 211 // saveOperatorGraphButton 212 // 213 this.saveOperatorGraphButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Save; 214 this.saveOperatorGraphButton.Location = new System.Drawing.Point(66, 6); 215 this.saveOperatorGraphButton.Name = "saveOperatorGraphButton"; 216 this.saveOperatorGraphButton.Size = new System.Drawing.Size(24, 24); 217 this.saveOperatorGraphButton.TabIndex = 2; 218 this.toolTip.SetToolTip(this.saveOperatorGraphButton, "Save Operator Graph"); 219 this.saveOperatorGraphButton.UseVisualStyleBackColor = true; 220 this.saveOperatorGraphButton.Click += new System.EventHandler(this.saveOperatorGraphButton_Click); 141 221 // 142 222 // tabControl … … 147 227 this.tabControl.Controls.Add(this.operatorGraphTabPage); 148 228 this.tabControl.Controls.Add(this.globalScopeTabPage); 229 this.tabControl.Controls.Add(this.problemTabPage); 149 230 this.tabControl.Location = new System.Drawing.Point(0, 0); 150 231 this.tabControl.Name = "tabControl"; 151 232 this.tabControl.SelectedIndex = 0; 152 this.tabControl.Size = new System.Drawing.Size(802, 61 1);153 this.tabControl.TabIndex = 0;233 this.tabControl.Size = new System.Drawing.Size(802, 610); 234 this.tabControl.TabIndex = 3; 154 235 // 155 236 // operatorGraphTabPage 156 237 // 238 this.operatorGraphTabPage.Controls.Add(this.saveOperatorGraphButton); 239 this.operatorGraphTabPage.Controls.Add(this.openOperatorGraphButton); 240 this.operatorGraphTabPage.Controls.Add(this.newOperatorGraphButton); 157 241 this.operatorGraphTabPage.Controls.Add(this.operatorGraphView); 158 242 this.operatorGraphTabPage.Location = new System.Drawing.Point(4, 22); 159 243 this.operatorGraphTabPage.Name = "operatorGraphTabPage"; 160 244 this.operatorGraphTabPage.Padding = new System.Windows.Forms.Padding(3); 161 this.operatorGraphTabPage.Size = new System.Drawing.Size(794, 58 5);245 this.operatorGraphTabPage.Size = new System.Drawing.Size(794, 584); 162 246 this.operatorGraphTabPage.TabIndex = 0; 163 247 this.operatorGraphTabPage.Text = "Operator Graph"; … … 170 254 this.globalScopeTabPage.Name = "globalScopeTabPage"; 171 255 this.globalScopeTabPage.Padding = new System.Windows.Forms.Padding(3); 172 this.globalScopeTabPage.Size = new System.Drawing.Size(794, 58 5);256 this.globalScopeTabPage.Size = new System.Drawing.Size(794, 584); 173 257 this.globalScopeTabPage.TabIndex = 1; 174 258 this.globalScopeTabPage.Text = "Global Scope"; 175 259 this.globalScopeTabPage.UseVisualStyleBackColor = true; 260 // 261 // problemTabPage 262 // 263 this.problemTabPage.Controls.Add(this.saveProblemButton); 264 this.problemTabPage.Controls.Add(this.openProblemButton); 265 this.problemTabPage.Controls.Add(this.newProblemButton); 266 this.problemTabPage.Controls.Add(this.problemViewHost); 267 this.problemTabPage.Location = new System.Drawing.Point(4, 22); 268 this.problemTabPage.Name = "problemTabPage"; 269 this.problemTabPage.Padding = new System.Windows.Forms.Padding(3); 270 this.problemTabPage.Size = new System.Drawing.Size(794, 584); 271 this.problemTabPage.TabIndex = 2; 272 this.problemTabPage.Text = "Problem"; 273 this.problemTabPage.UseVisualStyleBackColor = true; 274 // 275 // problemViewHost 276 // 277 this.problemViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 278 | System.Windows.Forms.AnchorStyles.Left) 279 | System.Windows.Forms.AnchorStyles.Right))); 280 this.problemViewHost.Content = null; 281 this.problemViewHost.Location = new System.Drawing.Point(6, 36); 282 this.problemViewHost.Name = "problemViewHost"; 283 this.problemViewHost.Size = new System.Drawing.Size(782, 542); 284 this.problemViewHost.TabIndex = 3; 285 // 286 // openFileDialog 287 // 288 this.openFileDialog.DefaultExt = "hl"; 289 this.openFileDialog.FileName = "Item"; 290 this.openFileDialog.Filter = "HeuristicLab Files|*.hl|All Files|*.*"; 291 this.openFileDialog.Title = "Open File"; 292 // 293 // saveFileDialog 294 // 295 this.saveFileDialog.DefaultExt = "hl"; 296 this.saveFileDialog.FileName = "Item"; 297 this.saveFileDialog.Filter = "Uncompressed HeuristicLab Files|*.hl|HeuristicLab Files|*.hl|All Files|*.*"; 298 this.saveFileDialog.FilterIndex = 2; 299 this.saveFileDialog.Title = "Save File"; 176 300 // 177 301 // EngineView … … 190 314 this.operatorGraphTabPage.ResumeLayout(false); 191 315 this.globalScopeTabPage.ResumeLayout(false); 316 this.problemTabPage.ResumeLayout(false); 192 317 this.ResumeLayout(false); 193 318 this.PerformLayout(); … … 208 333 protected System.Windows.Forms.TabPage operatorGraphTabPage; 209 334 protected System.Windows.Forms.TabPage globalScopeTabPage; 335 protected System.Windows.Forms.TabPage problemTabPage; 336 protected ViewHost problemViewHost; 337 protected System.Windows.Forms.Button newProblemButton; 338 protected System.Windows.Forms.Button saveOperatorGraphButton; 339 protected System.Windows.Forms.Button openOperatorGraphButton; 340 protected System.Windows.Forms.Button newOperatorGraphButton; 341 protected System.Windows.Forms.Button saveProblemButton; 342 protected System.Windows.Forms.Button openProblemButton; 343 protected System.Windows.Forms.OpenFileDialog openFileDialog; 344 protected System.Windows.Forms.SaveFileDialog saveFileDialog; 210 345 211 346 } -
trunk/sources/HeuristicLab.Core.Views/3.3/EngineView.cs
r2790 r2796 30 30 using HeuristicLab.Common; 31 31 using HeuristicLab.MainForm; 32 using HeuristicLab.Persistence.Default.Xml; 32 33 33 34 namespace HeuristicLab.Core.Views { … … 38 39 [Content(typeof(IEngine), false)] 39 40 public partial class EngineView : ItemView { 41 protected TypeSelectorDialog typeSelectorDialog; 40 42 private int executionTimeCounter; 41 43 … … 66 68 protected override void DeregisterContentEvents() { 67 69 Content.OperatorGraphChanged -= new EventHandler(Content_OperatorGraphChanged); 70 Content.ProblemChanged -= new EventHandler(Content_ProblemChanged); 68 71 Content.Prepared -= new EventHandler(Content_Prepared); 69 72 Content.Started -= new EventHandler(Content_Started); … … 81 84 base.RegisterContentEvents(); 82 85 Content.OperatorGraphChanged += new EventHandler(Content_OperatorGraphChanged); 86 Content.ProblemChanged += new EventHandler(Content_ProblemChanged); 83 87 Content.Prepared += new EventHandler(Content_Prepared); 84 88 Content.Started += new EventHandler(Content_Started); … … 96 100 stopButton.Enabled = false; 97 101 if (Content == null) { 102 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = false; 98 103 operatorGraphView.Enabled = false; 99 104 scopeView.Enabled = false; 100 startButton.Enabled = false; 101 resetButton.Enabled = false; 105 newProblemButton.Enabled = openProblemButton.Enabled = saveProblemButton.Enabled = false; 106 problemViewHost.Enabled = false; 107 startButton.Enabled = resetButton.Enabled = false; 102 108 executionTimeTextBox.Enabled = false; 103 109 } else { 110 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = true; 104 111 operatorGraphView.Content = Content.OperatorGraph; 112 operatorGraphView.Enabled = true; 105 113 scopeView.Content = Content.GlobalScope; 114 scopeView.Enabled = true; 115 newProblemButton.Enabled = openProblemButton.Enabled = true; 116 saveProblemButton.Enabled = Content.Problem != null; 117 problemViewHost.Content = Content.Problem; 118 problemViewHost.Enabled = true; 106 119 startButton.Enabled = !Content.Finished; 107 120 resetButton.Enabled = true; … … 118 131 operatorGraphView.Content = Content.OperatorGraph; 119 132 } 133 protected void Content_ProblemChanged(object sender, EventArgs e) { 134 if (InvokeRequired) 135 Invoke(new EventHandler(Content_ProblemChanged), sender, e); 136 else { 137 saveProblemButton.Enabled = Content.Problem != null; 138 problemViewHost.Content = Content.Problem; 139 } 140 } 120 141 protected virtual void Content_Prepared(object sender, EventArgs e) { 121 142 if (InvokeRequired) 122 143 Invoke(new EventHandler(Content_Prepared), sender, e); 123 144 else { 145 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = true; 124 146 operatorGraphView.Enabled = true; 125 147 scopeView.Enabled = true; 148 newProblemButton.Enabled = openProblemButton.Enabled = true; 149 saveProblemButton.Enabled = Content.Problem != null; 150 problemViewHost.Enabled = true; 126 151 startButton.Enabled = !Content.Finished; 127 152 stopButton.Enabled = false; … … 135 160 Invoke(new EventHandler(Content_Started), sender, e); 136 161 else { 162 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = false; 137 163 operatorGraphView.Enabled = false; 138 164 scopeView.Enabled = false; 165 newProblemButton.Enabled = openProblemButton.Enabled = saveProblemButton.Enabled = false; 166 problemViewHost.Enabled = false; 139 167 startButton.Enabled = false; 140 168 stopButton.Enabled = true; … … 147 175 Invoke(new EventHandler(Content_Stopped), sender, e); 148 176 else { 177 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = true; 149 178 operatorGraphView.Enabled = true; 150 179 scopeView.Enabled = true; 180 newProblemButton.Enabled = openProblemButton.Enabled = true; 181 saveProblemButton.Enabled = Content.Problem != null; 182 problemViewHost.Enabled = true; 151 183 startButton.Enabled = !Content.Finished; 152 184 stopButton.Enabled = false; … … 171 203 172 204 #region Button events 205 protected void newOperatorGraphButton_Click(object sender, EventArgs e) { 206 Content.OperatorGraph = new OperatorGraph(); 207 } 208 protected void openOperatorGraphButton_Click(object sender, EventArgs e) { 209 openFileDialog.Title = "Open Operator Graph"; 210 if (openFileDialog.ShowDialog(this) == DialogResult.OK) { 211 OperatorGraph operatorGraph = null; 212 try { 213 operatorGraph = XmlParser.Deserialize(openFileDialog.FileName) as OperatorGraph; 214 } 215 catch (Exception ex) { 216 Auxiliary.ShowErrorMessageBox(ex); 217 } 218 if (operatorGraph == null) 219 MessageBox.Show(this, "Selected file does not contain an operator graph.", "Invalid File", MessageBoxButtons.OK, MessageBoxIcon.Error); 220 else 221 Content.OperatorGraph = operatorGraph; 222 } 223 } 224 protected void saveOperatorGraphButton_Click(object sender, EventArgs e) { 225 saveFileDialog.Title = "Save Operator Graph"; 226 if (saveFileDialog.ShowDialog(this) == DialogResult.OK) { 227 try { 228 if (saveFileDialog.FilterIndex == 1) 229 XmlGenerator.Serialize(Content.OperatorGraph, saveFileDialog.FileName, 0); 230 else 231 XmlGenerator.Serialize(Content.OperatorGraph, saveFileDialog.FileName, 9); 232 } 233 catch (Exception ex) { 234 Auxiliary.ShowErrorMessageBox(ex); 235 } 236 } 237 } 238 protected void newProblemButton_Click(object sender, EventArgs e) { 239 if (typeSelectorDialog == null) { 240 typeSelectorDialog = new TypeSelectorDialog(); 241 } 242 typeSelectorDialog.Caption = "Select Problem"; 243 typeSelectorDialog.TypeSelector.Configure(typeof(IProblem), false, false); 244 245 if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) { 246 Content.Problem = (IProblem)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 247 } 248 } 249 protected void openProblemButton_Click(object sender, EventArgs e) { 250 openFileDialog.Title = "Open Problem"; 251 if (openFileDialog.ShowDialog(this) == DialogResult.OK) { 252 IProblem problem = null; 253 try { 254 problem = XmlParser.Deserialize(openFileDialog.FileName) as IProblem; 255 } 256 catch (Exception ex) { 257 Auxiliary.ShowErrorMessageBox(ex); 258 } 259 if (problem == null) 260 MessageBox.Show(this, "Selected file does not contain a problem.", "Invalid File", MessageBoxButtons.OK, MessageBoxIcon.Error); 261 else 262 Content.Problem = problem; 263 } 264 } 265 protected void saveProblemButton_Click(object sender, EventArgs e) { 266 saveFileDialog.Title = "Save Problem"; 267 if (saveFileDialog.ShowDialog(this) == DialogResult.OK) { 268 try { 269 if (saveFileDialog.FilterIndex == 1) 270 XmlGenerator.Serialize(Content.Problem, saveFileDialog.FileName, 0); 271 else 272 XmlGenerator.Serialize(Content.Problem, saveFileDialog.FileName, 9); 273 } 274 catch (Exception ex) { 275 Auxiliary.ShowErrorMessageBox(ex); 276 } 277 } 278 } 173 279 protected virtual void startButton_Click(object sender, EventArgs e) { 174 280 Content.Start(); -
trunk/sources/HeuristicLab.Core.Views/3.3/HeuristicLab.Core.Views-3.3.csproj
r2754 r2796 53 53 <ItemGroup> 54 54 <None Include="HeuristicLabCoreViewsPlugin.cs.frame" /> 55 <Compile Include="ValueParameterCollectionView.cs"> 56 <SubType>UserControl</SubType> 57 </Compile> 58 <Compile Include="ValueParameterCollectionView.Designer.cs"> 59 <DependentUpon>ValueParameterCollectionView.cs</DependentUpon> 60 </Compile> 55 61 <Compile Include="ItemArrayView.cs"> 56 62 <SubType>UserControl</SubType> … … 107 113 <Compile Include="OperatorTreeView.Designer.cs"> 108 114 <DependentUpon>OperatorTreeView.cs</DependentUpon> 115 </Compile> 116 <Compile Include="OperatorView.cs"> 117 <SubType>UserControl</SubType> 118 </Compile> 119 <Compile Include="OperatorView.Designer.cs"> 120 <DependentUpon>OperatorView.cs</DependentUpon> 121 </Compile> 122 <Compile Include="ProblemView.cs"> 123 <SubType>UserControl</SubType> 124 </Compile> 125 <Compile Include="ProblemView.Designer.cs"> 126 <DependentUpon>ProblemView.cs</DependentUpon> 109 127 </Compile> 110 128 <Compile Include="TypeSelectorDialog.cs"> … … 223 241 <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project> 224 242 <Name>HeuristicLab.MainForm-3.2</Name> 243 </ProjectReference> 244 <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj"> 245 <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project> 246 <Name>HeuristicLab.Persistence-3.3</Name> 225 247 </ProjectReference> 226 248 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj"> -
trunk/sources/HeuristicLab.Core.Views/3.3/HeuristicLabCoreViewsPlugin.cs.frame
r2790 r2796 37 37 [PluginDependency("HeuristicLab.MainForm", "3.2")] 38 38 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.2")] 39 [PluginDependency("HeuristicLab.Persistence", "3.3")] 39 40 public class HeuristicLabCoreViewsPlugin : PluginBase { 40 41 } -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.Designer.cs
r2790 r2796 96 96 this.moveUpButton.Location = new System.Drawing.Point(3, 3); 97 97 this.moveUpButton.Name = "moveUpButton"; 98 this.moveUpButton.Size = new System.Drawing.Size(2 3, 23);98 this.moveUpButton.Size = new System.Drawing.Size(24, 24); 99 99 this.moveUpButton.TabIndex = 0; 100 100 this.toolTip.SetToolTip(this.moveUpButton, "Move Up"); … … 106 106 this.moveDownButton.Enabled = false; 107 107 this.moveDownButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.ArrowDown; 108 this.moveDownButton.Location = new System.Drawing.Point(3 2, 3);108 this.moveDownButton.Location = new System.Drawing.Point(33, 3); 109 109 this.moveDownButton.Name = "moveDownButton"; 110 this.moveDownButton.Size = new System.Drawing.Size(2 3, 23);110 this.moveDownButton.Size = new System.Drawing.Size(24, 24); 111 111 this.moveDownButton.TabIndex = 1; 112 112 this.toolTip.SetToolTip(this.moveDownButton, "Move Down"); … … 124 124 this.itemsListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; 125 125 this.itemsListView.HideSelection = false; 126 this.itemsListView.Location = new System.Drawing.Point(3, 3 2);126 this.itemsListView.Location = new System.Drawing.Point(3, 33); 127 127 this.itemsListView.Name = "itemsListView"; 128 128 this.itemsListView.ShowItemToolTips = true; 129 this.itemsListView.Size = new System.Drawing.Size(194, 28 7);129 this.itemsListView.Size = new System.Drawing.Size(194, 286); 130 130 this.itemsListView.SmallImageList = this.imageList; 131 131 this.itemsListView.TabIndex = 2; … … 153 153 | System.Windows.Forms.AnchorStyles.Right))); 154 154 this.detailsGroupBox.Controls.Add(this.viewHost); 155 this.detailsGroupBox.Location = new System.Drawing.Point(3, 2 6);155 this.detailsGroupBox.Location = new System.Drawing.Point(3, 27); 156 156 this.detailsGroupBox.Name = "detailsGroupBox"; 157 157 this.detailsGroupBox.Size = new System.Drawing.Size(283, 294); -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.Designer.cs
r2790 r2796 104 104 this.itemsListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; 105 105 this.itemsListView.HideSelection = false; 106 this.itemsListView.Location = new System.Drawing.Point(3, 3 2);106 this.itemsListView.Location = new System.Drawing.Point(3, 33); 107 107 this.itemsListView.Name = "itemsListView"; 108 108 this.itemsListView.ShowItemToolTips = true; 109 this.itemsListView.Size = new System.Drawing.Size(244, 32 8);109 this.itemsListView.Size = new System.Drawing.Size(244, 327); 110 110 this.itemsListView.SmallImageList = this.imageList; 111 111 this.itemsListView.TabIndex = 4; … … 131 131 this.sortDescendingButton.Enabled = false; 132 132 this.sortDescendingButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.SortUp; 133 this.sortDescendingButton.Location = new System.Drawing.Point(3 2, 3);133 this.sortDescendingButton.Location = new System.Drawing.Point(33, 3); 134 134 this.sortDescendingButton.Name = "sortDescendingButton"; 135 this.sortDescendingButton.Size = new System.Drawing.Size(2 3, 23);135 this.sortDescendingButton.Size = new System.Drawing.Size(24, 24); 136 136 this.sortDescendingButton.TabIndex = 1; 137 137 this.toolTip.SetToolTip(this.sortDescendingButton, "Sort Descending"); … … 143 143 this.sortAscendingButton.Enabled = false; 144 144 this.sortAscendingButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Sort; 145 this.sortAscendingButton.Location = new System.Drawing.Point(6 1, 3);145 this.sortAscendingButton.Location = new System.Drawing.Point(63, 3); 146 146 this.sortAscendingButton.Name = "sortAscendingButton"; 147 this.sortAscendingButton.Size = new System.Drawing.Size(2 3, 23);147 this.sortAscendingButton.Size = new System.Drawing.Size(24, 24); 148 148 this.sortAscendingButton.TabIndex = 2; 149 149 this.toolTip.SetToolTip(this.sortAscendingButton, "Sort Ascending"); … … 155 155 this.removeButton.Enabled = false; 156 156 this.removeButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Remove; 157 this.removeButton.Location = new System.Drawing.Point(9 0, 3);157 this.removeButton.Location = new System.Drawing.Point(93, 3); 158 158 this.removeButton.Name = "removeButton"; 159 this.removeButton.Size = new System.Drawing.Size(2 3, 23);159 this.removeButton.Size = new System.Drawing.Size(24, 24); 160 160 this.removeButton.TabIndex = 3; 161 161 this.toolTip.SetToolTip(this.removeButton, "Remove"); … … 168 168 this.addButton.Location = new System.Drawing.Point(3, 3); 169 169 this.addButton.Name = "addButton"; 170 this.addButton.Size = new System.Drawing.Size(2 3, 23);170 this.addButton.Size = new System.Drawing.Size(24, 24); 171 171 this.addButton.TabIndex = 0; 172 172 this.toolTip.SetToolTip(this.addButton, "Add"); … … 180 180 | System.Windows.Forms.AnchorStyles.Right))); 181 181 this.detailsGroupBox.Controls.Add(this.viewHost); 182 this.detailsGroupBox.Location = new System.Drawing.Point(3, 2 6);182 this.detailsGroupBox.Location = new System.Drawing.Point(3, 27); 183 183 this.detailsGroupBox.Name = "detailsGroupBox"; 184 184 this.detailsGroupBox.Size = new System.Drawing.Size(266, 335); … … 192 192 | System.Windows.Forms.AnchorStyles.Left) 193 193 | System.Windows.Forms.AnchorStyles.Right))); 194 this.viewHost.Content = null; 194 195 this.viewHost.Location = new System.Drawing.Point(6, 19); 195 196 this.viewHost.Name = "viewHost"; 196 this.viewHost.Content = null;197 197 this.viewHost.Size = new System.Drawing.Size(254, 310); 198 198 this.viewHost.TabIndex = 0; -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.Designer.cs
r2790 r2796 96 96 this.removeButton.Enabled = false; 97 97 this.removeButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Remove; 98 this.removeButton.Location = new System.Drawing.Point(9 0, 3);98 this.removeButton.Location = new System.Drawing.Point(93, 3); 99 99 this.removeButton.Name = "removeButton"; 100 this.removeButton.Size = new System.Drawing.Size(2 3, 23);100 this.removeButton.Size = new System.Drawing.Size(24, 24); 101 101 this.removeButton.TabIndex = 3; 102 102 this.toolTip.SetToolTip(this.removeButton, "Remove"); … … 108 108 this.moveUpButton.Enabled = false; 109 109 this.moveUpButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.ArrowUp; 110 this.moveUpButton.Location = new System.Drawing.Point(3 2, 3);110 this.moveUpButton.Location = new System.Drawing.Point(33, 3); 111 111 this.moveUpButton.Name = "moveUpButton"; 112 this.moveUpButton.Size = new System.Drawing.Size(2 3, 23);112 this.moveUpButton.Size = new System.Drawing.Size(24, 24); 113 113 this.moveUpButton.TabIndex = 1; 114 114 this.toolTip.SetToolTip(this.moveUpButton, "Move Up"); … … 120 120 this.moveDownButton.Enabled = false; 121 121 this.moveDownButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.ArrowDown; 122 this.moveDownButton.Location = new System.Drawing.Point(6 1, 3);122 this.moveDownButton.Location = new System.Drawing.Point(63, 3); 123 123 this.moveDownButton.Name = "moveDownButton"; 124 this.moveDownButton.Size = new System.Drawing.Size(2 3, 23);124 this.moveDownButton.Size = new System.Drawing.Size(24, 24); 125 125 this.moveDownButton.TabIndex = 2; 126 126 this.toolTip.SetToolTip(this.moveDownButton, "Move Down"); … … 138 138 this.itemsListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; 139 139 this.itemsListView.HideSelection = false; 140 this.itemsListView.Location = new System.Drawing.Point(3, 3 2);140 this.itemsListView.Location = new System.Drawing.Point(3, 33); 141 141 this.itemsListView.Name = "itemsListView"; 142 142 this.itemsListView.ShowItemToolTips = true; 143 this.itemsListView.Size = new System.Drawing.Size(194, 28 7);143 this.itemsListView.Size = new System.Drawing.Size(194, 286); 144 144 this.itemsListView.SmallImageList = this.imageList; 145 145 this.itemsListView.TabIndex = 4; … … 166 166 this.addButton.Location = new System.Drawing.Point(3, 3); 167 167 this.addButton.Name = "addButton"; 168 this.addButton.Size = new System.Drawing.Size(2 3, 23);168 this.addButton.Size = new System.Drawing.Size(24, 24); 169 169 this.addButton.TabIndex = 0; 170 170 this.toolTip.SetToolTip(this.addButton, "Add"); … … 178 178 | System.Windows.Forms.AnchorStyles.Right))); 179 179 this.detailsGroupBox.Controls.Add(this.viewHost); 180 this.detailsGroupBox.Location = new System.Drawing.Point(3, 2 6);180 this.detailsGroupBox.Location = new System.Drawing.Point(3, 27); 181 181 this.detailsGroupBox.Name = "detailsGroupBox"; 182 182 this.detailsGroupBox.Size = new System.Drawing.Size(283, 294); … … 190 190 | System.Windows.Forms.AnchorStyles.Left) 191 191 | System.Windows.Forms.AnchorStyles.Right))); 192 this.viewHost.Content = null; 192 193 this.viewHost.Location = new System.Drawing.Point(6, 19); 193 194 this.viewHost.Name = "viewHost"; 194 this.viewHost.Content = null;195 195 this.viewHost.Size = new System.Drawing.Size(271, 269); 196 196 this.viewHost.TabIndex = 0; -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorView.Designer.cs
r2795 r2796 20 20 #endregion 21 21 22 namespace HeuristicLab. Operators.Views {22 namespace HeuristicLab.Core.Views { 23 23 partial class OperatorView { 24 24 /// <summary> … … 94 94 protected HeuristicLab.Core.Views.ParameterCollectionView parameterCollectionView; 95 95 96 97 96 } 98 97 } -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorView.cs
r2795 r2796 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.ComponentModel;25 using System.Drawing;26 using System.Data;27 using System.Text;28 using System.Windows.Forms;29 using HeuristicLab.Core;30 using HeuristicLab.Core.Views;31 22 using HeuristicLab.MainForm; 32 23 33 namespace HeuristicLab. Operators.Views {24 namespace HeuristicLab.Core.Views { 34 25 /// <summary> 35 26 /// The base class for visual representations of items. -
trunk/sources/HeuristicLab.Core.Views/3.3/ParameterCollectionView.cs
r2727 r2796 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 2 23 using System.Collections.Generic; 3 24 using System.ComponentModel; -
trunk/sources/HeuristicLab.Core.Views/3.3/VariableView.Designer.cs
r2790 r2796 112 112 | System.Windows.Forms.AnchorStyles.Right))); 113 113 this.valuePanel.Controls.Add(this.viewHost); 114 this.valuePanel.Location = new System.Drawing.Point(6, 4 8);114 this.valuePanel.Location = new System.Drawing.Point(6, 49); 115 115 this.valuePanel.Name = "valuePanel"; 116 this.valuePanel.Size = new System.Drawing.Size(347, 100);116 this.valuePanel.Size = new System.Drawing.Size(347, 99); 117 117 this.valuePanel.TabIndex = 2; 118 118 this.valuePanel.DragOver += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver); … … 122 122 // viewHost 123 123 // 124 this.viewHost.Content = null; 124 125 this.viewHost.Dock = System.Windows.Forms.DockStyle.Fill; 125 126 this.viewHost.Location = new System.Drawing.Point(0, 0); 126 127 this.viewHost.Name = "viewHost"; 127 this.viewHost.Content = null; 128 this.viewHost.Size = new System.Drawing.Size(347, 100); 128 this.viewHost.Size = new System.Drawing.Size(347, 99); 129 129 this.viewHost.TabIndex = 0; 130 130 // … … 132 132 // 133 133 this.clearValueButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Remove; 134 this.clearValueButton.Location = new System.Drawing.Point(3 5, 19);134 this.clearValueButton.Location = new System.Drawing.Point(36, 19); 135 135 this.clearValueButton.Name = "clearValueButton"; 136 this.clearValueButton.Size = new System.Drawing.Size(2 3, 23);136 this.clearValueButton.Size = new System.Drawing.Size(24, 24); 137 137 this.clearValueButton.TabIndex = 1; 138 138 this.toolTip.SetToolTip(this.clearValueButton, "Clear Value"); … … 145 145 this.setValueButton.Location = new System.Drawing.Point(6, 19); 146 146 this.setValueButton.Name = "setValueButton"; 147 this.setValueButton.Size = new System.Drawing.Size(2 3, 23);147 this.setValueButton.Size = new System.Drawing.Size(24, 24); 148 148 this.setValueButton.TabIndex = 1; 149 149 this.toolTip.SetToolTip(this.setValueButton, "Set Value"); -
trunk/sources/HeuristicLab.Core/3.3/Engine.cs
r2793 r2796 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Text; 25 using System.Xml; 24 using System.Drawing; 26 25 using System.Threading; 27 using System.Drawing;26 using HeuristicLab.Common; 28 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Common;30 28 31 29 namespace HeuristicLab.Core { … … 41 39 } 42 40 43 /// <summary>44 /// Field of the current instance that represent the operator graph.45 /// </summary>46 41 private OperatorGraph operatorGraph; 47 42 /// <summary> 48 /// Gets the current operator graph.43 /// Gets or sets the current operator graph. 49 44 /// </summary> 50 45 [Storable] … … 76 71 77 72 [Storable] 73 private IProblem problem; 74 /// <summary> 75 /// Gets or sets the current problem. 76 /// </summary> 77 public IProblem Problem { 78 get { return problem; } 79 set { 80 if (value == null) throw new ArgumentNullException(); 81 if (value != problem) { 82 problem = value; 83 OnProblemChanged(); 84 Prepare(); 85 } 86 } 87 } 88 89 [Storable] 78 90 private TimeSpan executionTime; 79 91 /// <summary> … … 134 146 protected Engine() { 135 147 globalScope = new Scope("Global"); 148 problem = null; 136 149 executionStack = new Stack<IExecutionSequence>(); 137 150 OperatorGraph = new OperatorGraph(); … … 149 162 clone.OperatorGraph = (OperatorGraph)cloner.Clone(operatorGraph); 150 163 clone.globalScope = (Scope)cloner.Clone(globalScope); 164 clone.problem = (IProblem)cloner.Clone(problem); 151 165 clone.executionTime = executionTime; 152 166 IExecutionSequence[] contexts = executionStack.ToArray(); … … 169 183 ExecutionTime = new TimeSpan(); 170 184 executionStack.Clear(); 171 if ( OperatorGraph.InitialOperator != null)172 executionStack.Push(new ExecutionContext(null, OperatorGraph.InitialOperator, GlobalScope ));185 if ((OperatorGraph.InitialOperator != null) && (Problem != null)) 186 executionStack.Push(new ExecutionContext(null, OperatorGraph.InitialOperator, GlobalScope, Problem)); 173 187 OnPrepared(); 174 188 } … … 228 242 } 229 243 244 /// <summary> 245 /// Occurs when the operator graph was changed. 246 /// </summary> 230 247 public event EventHandler OperatorGraphChanged; 248 /// <summary> 249 /// Fires a new <c>OperatorGraphChanged</c> event. 250 /// </summary> 231 251 protected virtual void OnOperatorGraphChanged() { 232 252 if (OperatorGraphChanged != null) 233 253 OperatorGraphChanged(this, EventArgs.Empty); 254 } 255 /// <summary> 256 /// Occurs when the problem was changed. 257 /// </summary> 258 public event EventHandler ProblemChanged; 259 /// <summary> 260 /// Fires a new <c>ProblemChanged</c> event. 261 /// </summary> 262 protected virtual void OnProblemChanged() { 263 if (ProblemChanged != null) 264 ProblemChanged(this, EventArgs.Empty); 234 265 } 235 266 /// <summary> -
trunk/sources/HeuristicLab.Core/3.3/ExecutionContext.cs
r2790 r2796 45 45 } 46 46 47 [Storable] 48 private IProblem problem; 49 public IProblem Problem { 50 get { return problem; } 51 } 52 47 53 private ExecutionContext() { 48 54 parent = null; 49 55 op = null; 50 56 scope = null; 57 problem = null; 51 58 } 52 public ExecutionContext(ExecutionContext parent, IOperator op, IScope scope ) {53 if ((op == null) || (scope == null) ) throw new ArgumentNullException();59 public ExecutionContext(ExecutionContext parent, IOperator op, IScope scope, IProblem problem) { 60 if ((op == null) || (scope == null) || (problem == null)) throw new ArgumentNullException(); 54 61 this.parent = parent; 55 62 this.op = op; 56 63 this.scope = scope; 64 this.problem = problem; 57 65 } 58 66 … … 63 71 clone.op = (IOperator)cloner.Clone(op); 64 72 clone.scope = (IScope)cloner.Clone(scope); 73 clone.problem = (IProblem)cloner.Clone(problem); 65 74 return clone; 75 } 76 77 public ExecutionContext CreateContext(IOperator op) { 78 return new ExecutionContext(parent, op, scope, problem); 79 } 80 public ExecutionContext CreateContext(IOperator op, IScope scope) { 81 return new ExecutionContext(parent, op, scope, problem); 82 } 83 public ExecutionContext CreateChildContext(IOperator op) { 84 return new ExecutionContext(this, op, scope, problem); 85 } 86 public ExecutionContext CreateChildContext(IOperator op, IScope scope) { 87 return new ExecutionContext(this, op, scope, problem); 66 88 } 67 89 } -
trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj
r2773 r2796 104 104 <Compile Include="ChangedEventArgs.cs" /> 105 105 <None Include="HeuristicLabCorePlugin.cs.frame" /> 106 <Compile Include="ValueParameterCollection.cs" /> 107 <Compile Include="Interfaces\IProblem.cs" /> 106 108 <Compile Include="Interfaces\IExecutionSequence.cs" /> 107 109 <Compile Include="Interfaces\IValueLookupParameter.cs" /> … … 115 117 <Compile Include="Item.cs" /> 116 118 <Compile Include="NamedItem.cs" /> 119 <Compile Include="Operator.cs" /> 120 <Compile Include="Problem.cs" /> 117 121 <Compile Include="OperatorGraph.cs" /> 118 122 <Compile Include="Interfaces\IParameter.cs" /> -
trunk/sources/HeuristicLab.Core/3.3/Interfaces/IEngine.cs
r2790 r2796 21 21 22 22 using System; 23 using System.Collections.Generic;24 using System.Text;25 23 using HeuristicLab.Common; 26 24 … … 40 38 /// </summary> 41 39 IScope GlobalScope { get; } 40 /// <summary> 41 /// Gets the problem of the current instance. 42 /// </summary> 43 IProblem Problem { get; set; } 42 44 43 45 /// <summary> … … 72 74 void Stop(); 73 75 76 /// <summary> 77 /// Occurs when the operator graph was changed. 78 /// </summary> 74 79 event EventHandler OperatorGraphChanged; 80 /// <summary> 81 /// Occurs when the problem was changed. 82 /// </summary> 83 event EventHandler ProblemChanged; 75 84 /// <summary> 76 85 /// Occurs when the execution time was changed. -
trunk/sources/HeuristicLab.Core/3.3/Interfaces/ILookupParameter.cs
r2790 r2796 26 26 27 27 namespace HeuristicLab.Core { 28 public interface ILookupParameter <T> : IParameter where T : class, IItem{28 public interface ILookupParameter : IParameter { 29 29 string ActualName { get; set; } 30 31 30 event EventHandler ActualNameChanged; 32 31 } 32 33 public interface ILookupParameter<T> : ILookupParameter where T : class, IItem { 34 new T ActualValue { get; set; } 35 } 33 36 } -
trunk/sources/HeuristicLab.Core/3.3/Interfaces/IValueLookupParameter.cs
r2790 r2796 26 26 27 27 namespace HeuristicLab.Core { 28 public interface IValueLookupParameter<T> : IValueParameter<T>, ILookupParameter<T> where T : class, IItem { } 28 public interface IValueLookupParameter : IValueParameter, ILookupParameter { } 29 30 public interface IValueLookupParameter<T> : IValueLookupParameter, IValueParameter<T>, ILookupParameter<T> where T : class, IItem { } 29 31 } -
trunk/sources/HeuristicLab.Core/3.3/Interfaces/IValueParameter.cs
r2790 r2796 26 26 27 27 namespace HeuristicLab.Core { 28 public interface IValueParameter<T> : IParameter where T : class, IItem { 29 T Value { get; set; } 30 28 public interface IValueParameter : IParameter { 29 IItem Value { get; set; } 31 30 event EventHandler ValueChanged; 32 31 } 32 33 public interface IValueParameter<T> : IValueParameter where T : class, IItem { 34 new T Value { get; set; } 35 } 33 36 } -
trunk/sources/HeuristicLab.Core/3.3/Operator.cs
r2795 r2796 23 23 using System.Drawing; 24 24 using HeuristicLab.Collections; 25 using HeuristicLab.Core;26 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 26 28 namespace HeuristicLab. Operators{27 namespace HeuristicLab.Core { 29 28 /// <summary> 30 29 /// The base class for all operators. -
trunk/sources/HeuristicLab.Core/3.3/OperatorGraph.cs
r2793 r2796 34 34 /// </summary> 35 35 [Item("OperatorGraph", "Represents a graph of operators.")] 36 [Creatable(" Test")]36 [Creatable("Algorithms")] 37 37 public class OperatorGraph : Item { 38 38 private OperatorSet operators; -
trunk/sources/HeuristicLab.Operators.Views/3.3/CombinedOperatorView.cs
r2790 r2796 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.ComponentModel;25 using System.Drawing;26 using System.Data;27 using System.Text;28 using System.Windows.Forms;29 22 using HeuristicLab.Core; 30 23 using HeuristicLab.Core.Views; -
trunk/sources/HeuristicLab.Operators.Views/3.3/HeuristicLab.Operators.Views-3.3.csproj
r2773 r2796 71 71 </Compile> 72 72 <Compile Include="HeuristicLabOperatorsViewsPlugin.cs" /> 73 <Compile Include="OperatorView.cs">74 <SubType>UserControl</SubType>75 </Compile>76 <Compile Include="OperatorView.Designer.cs">77 <DependentUpon>OperatorView.cs</DependentUpon>78 </Compile>79 73 <Compile Include="Properties\AssemblyInfo.cs" /> 80 74 </ItemGroup> -
trunk/sources/HeuristicLab.Operators.Views/3.3/HeuristicLabOperatorsViewsPlugin.cs.frame
r2790 r2796 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Text;25 22 using HeuristicLab.PluginInfrastructure; 26 23 -
trunk/sources/HeuristicLab.Operators.Views/3.3/MultipleCallsOperatorView.cs
r2790 r2796 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.ComponentModel;25 using System.Drawing;26 using System.Data;27 using System.Text;28 using System.Windows.Forms;29 22 using HeuristicLab.Core; 30 23 using HeuristicLab.Core.Views; -
trunk/sources/HeuristicLab.Operators.Views/3.3/ValuesCollectorView.cs
r2790 r2796 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.ComponentModel;25 using System.Drawing;26 using System.Data;27 using System.Text;28 using System.Windows.Forms;29 22 using HeuristicLab.Core; 30 23 using HeuristicLab.Core.Views; -
trunk/sources/HeuristicLab.Operators/3.3/CombinedOperator.cs
r2794 r2796 66 66 ExecutionContextCollection next = new ExecutionContextCollection(base.Apply()); 67 67 if (operatorGraph.InitialOperator != null) 68 next.Insert(0, new ExecutionContext(ExecutionContext, operatorGraph.InitialOperator, ExecutionContext.Scope));68 next.Insert(0, ExecutionContext.CreateChildContext(operatorGraph.InitialOperator)); 69 69 return next; 70 70 } -
trunk/sources/HeuristicLab.Operators/3.3/ConditionalBranch.cs
r2794 r2796 61 61 ExecutionContextCollection next = new ExecutionContextCollection(base.Apply()); 62 62 if (ConditionParameter.ActualValue.Value) { 63 if (TrueBranch != null) next.Insert(0, new ExecutionContext(ExecutionContext.Parent, TrueBranch, ExecutionContext.Scope));63 if (TrueBranch != null) next.Insert(0, ExecutionContext.CreateContext(TrueBranch)); 64 64 } else { 65 if (FalseBranch != null) next.Insert(0, new ExecutionContext(ExecutionContext.Parent, FalseBranch, ExecutionContext.Scope));65 if (FalseBranch != null) next.Insert(0, ExecutionContext.CreateContext(FalseBranch)); 66 66 } 67 67 return next; -
trunk/sources/HeuristicLab.Operators/3.3/HeuristicLab.Operators-3.3.csproj
r2794 r2796 108 108 </Compile> 109 109 <Compile Include="HeuristicLabOperatorsPlugin.cs" /> 110 <Compile Include="Operator.cs" />111 110 <Compile Include="Properties\AssemblyInfo.cs" /> 112 111 <Compile Include="SingleSuccessorOperator.cs" /> -
trunk/sources/HeuristicLab.Operators/3.3/MultipleCallsOperator.cs
r2794 r2796 110 110 ExecutionContextCollection next = new ExecutionContextCollection(base.Apply()); 111 111 for (int i = Operators.Count - 1; i >= 0; i--) 112 next.Insert(0, new ExecutionContext(ExecutionContext.Parent, Operators[i], ExecutionContext.Scope));112 next.Insert(0, ExecutionContext.CreateContext(Operators[i])); 113 113 return next; 114 114 } -
trunk/sources/HeuristicLab.Operators/3.3/ParallelSubScopesProcessor.cs
r2794 r2796 39 39 inner.Parallel = true; 40 40 for (int i = 0; (i < ExecutionContext.Scope.SubScopes.Count) && (i < Operators.Count); i++) 41 inner.Add( new ExecutionContext(ExecutionContext.Parent,Operators[i], ExecutionContext.Scope.SubScopes[i]));41 inner.Add(ExecutionContext.CreateContext(Operators[i], ExecutionContext.Scope.SubScopes[i])); 42 42 next.Insert(0, inner); 43 43 } -
trunk/sources/HeuristicLab.Operators/3.3/Placeholder.cs
r2794 r2796 45 45 IOperator op = OperatorParameter.ActualValue; 46 46 if (op != null) 47 next.Insert(0, new ExecutionContext(ExecutionContext.Parent, op, ExecutionContext.Scope));47 next.Insert(0, ExecutionContext.CreateContext(op)); 48 48 return next; 49 49 } -
trunk/sources/HeuristicLab.Operators/3.3/SequentialSubScopesProcessor.cs
r2794 r2796 38 38 ExecutionContextCollection inner = new ExecutionContextCollection(); 39 39 for (int i = 0; (i < ExecutionContext.Scope.SubScopes.Count) && (i < Operators.Count); i++) 40 inner.Add( new ExecutionContext(ExecutionContext.Parent,Operators[i], ExecutionContext.Scope.SubScopes[i]));40 inner.Add(ExecutionContext.CreateContext(Operators[i], ExecutionContext.Scope.SubScopes[i])); 41 41 next.Insert(0, inner); 42 42 } -
trunk/sources/HeuristicLab.Operators/3.3/SingleCallOperator.cs
r2794 r2796 48 48 ExecutionContextCollection next = new ExecutionContextCollection(base.Apply()); 49 49 if (Operator != null) 50 next.Insert(0, new ExecutionContext(ExecutionContext.Parent, Operator, ExecutionContext.Scope));50 next.Insert(0, ExecutionContext.CreateContext(Operator)); 51 51 return next; 52 52 } -
trunk/sources/HeuristicLab.Operators/3.3/SingleSuccessorOperator.cs
r2794 r2796 47 47 public override IExecutionSequence Apply() { 48 48 if (Successor != null) 49 return new ExecutionContext(ExecutionContext.Parent, Successor, ExecutionContext.Scope);49 return ExecutionContext.CreateContext(Successor); 50 50 else 51 51 return null; -
trunk/sources/HeuristicLab.Operators/3.3/StochasticBranch.cs
r2794 r2796 65 65 ExecutionContextCollection next = new ExecutionContextCollection(base.Apply()); 66 66 if (RandomParameter.ActualValue.NextDouble() < ProbabilityParameter.ActualValue.Value) { 67 if (FirstBranch != null) next.Insert(0, new ExecutionContext(ExecutionContext.Parent, FirstBranch, ExecutionContext.Scope));67 if (FirstBranch != null) next.Insert(0, ExecutionContext.CreateContext(FirstBranch)); 68 68 } else { 69 if (SecondBranch != null) next.Insert(0, new ExecutionContext(ExecutionContext.Parent, SecondBranch, ExecutionContext.Scope));69 if (SecondBranch != null) next.Insert(0, ExecutionContext.CreateContext(SecondBranch)); 70 70 } 71 71 return next; -
trunk/sources/HeuristicLab.Operators/3.3/UniformParallelSubScopesProcessor.cs
r2794 r2796 44 44 inner.Parallel = true; 45 45 for (int i = 0; i < ExecutionContext.Scope.SubScopes.Count; i++) 46 inner.Add( new ExecutionContext(ExecutionContext.Parent,Operator, ExecutionContext.Scope.SubScopes[i]));46 inner.Add(ExecutionContext.CreateContext(Operator, ExecutionContext.Scope.SubScopes[i])); 47 47 next.Insert(0, inner); 48 48 } -
trunk/sources/HeuristicLab.Operators/3.3/UniformSequentialSubScopesProcessor.cs
r2794 r2796 43 43 ExecutionContextCollection inner = new ExecutionContextCollection(); 44 44 for (int i = 0; i < ExecutionContext.Scope.SubScopes.Count; i++) 45 inner.Add( new ExecutionContext(ExecutionContext.Parent,Operator, ExecutionContext.Scope.SubScopes[i]));45 inner.Add(ExecutionContext.CreateContext(Operator, ExecutionContext.Scope.SubScopes[i])); 46 46 next.Insert(0, inner); 47 47 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/NewMenuItem.cs
r2790 r2796 23 23 using System.Drawing; 24 24 using System.Windows.Forms; 25 using HeuristicLab.Common.Resources;26 25 27 26 namespace HeuristicLab.Optimizer.MenuItems { … … 37 36 } 38 37 public override Image Image { 39 get { return Resources.NewIcon; }38 get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.NewDocument; } 40 39 } 41 40 public override Keys ShortCutKeys { -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/OpenMenuItem.cs
r2790 r2796 23 23 using System.Drawing; 24 24 using System.Windows.Forms; 25 using HeuristicLab.Common.Resources;26 25 27 26 namespace HeuristicLab.Optimizer.MenuItems { … … 37 36 } 38 37 public override Image Image { 39 get { return Resources.OpenIcon; }38 get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Open; } 40 39 } 41 40 public override Keys ShortCutKeys { -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAllMenuItem.cs
r2790 r2796 25 25 using System.Linq; 26 26 using System.Windows.Forms; 27 using HeuristicLab.Common.Resources;28 27 using HeuristicLab.Core; 29 28 using HeuristicLab.MainForm; … … 41 40 } 42 41 public override Image Image { 43 get { return Resources.SaveAllIcon; }42 get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.SaveAll; } 44 43 } 45 44 -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveMenuItem.cs
r2790 r2796 24 24 using System.Drawing; 25 25 using System.Windows.Forms; 26 using HeuristicLab.Common.Resources;27 26 using HeuristicLab.Core; 28 27 using HeuristicLab.MainForm; … … 40 39 } 41 40 public override Image Image { 42 get { return Resources.SaveIcon; }41 get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Save; } 43 42 } 44 43 public override Keys ShortCutKeys { -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/NewToolBarItem.cs
r2790 r2796 21 21 22 22 using System.Drawing; 23 using HeuristicLab.Common.Resources;24 23 25 24 namespace HeuristicLab.Optimizer { … … 35 34 } 36 35 public override Image Image { 37 get { return Resources.NewIcon; }36 get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.NewDocument; } 38 37 } 39 38 -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/OpenToolBarItem.cs
r2790 r2796 21 21 22 22 using System.Drawing; 23 using HeuristicLab.Common.Resources;24 23 25 24 namespace HeuristicLab.Optimizer { … … 35 34 } 36 35 public override Image Image { 37 get { return Resources.OpenIcon; }36 get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Open; } 38 37 } 39 38 -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveAllToolBarItem.cs
r2790 r2796 24 24 using System.Linq; 25 25 using System.Windows.Forms; 26 using HeuristicLab.Common.Resources;27 26 using HeuristicLab.Core; 28 27 using HeuristicLab.MainForm; … … 40 39 } 41 40 public override Image Image { 42 get { return Resources.SaveAllIcon; }41 get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.SaveAll; } 43 42 } 44 43 -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveToolBarItem.cs
r2790 r2796 23 23 using System.Drawing; 24 24 using System.Windows.Forms; 25 using HeuristicLab.Common.Resources;26 25 using HeuristicLab.Core; 27 26 using HeuristicLab.MainForm; … … 39 38 } 40 39 public override Image Image { 41 get { return Resources.SaveIcon; }40 get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Save; } 42 41 } 43 42 -
trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueLookupParameterView.Designer.cs
r2790 r2796 111 111 | System.Windows.Forms.AnchorStyles.Right))); 112 112 this.valuePanel.Controls.Add(this.viewHost); 113 this.valuePanel.Location = new System.Drawing.Point(6, 4 8);113 this.valuePanel.Location = new System.Drawing.Point(6, 49); 114 114 this.valuePanel.Name = "valuePanel"; 115 this.valuePanel.Size = new System.Drawing.Size(374, 11 5);115 this.valuePanel.Size = new System.Drawing.Size(374, 114); 116 116 this.valuePanel.TabIndex = 0; 117 117 this.valuePanel.DragOver += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver); … … 125 125 this.viewHost.Location = new System.Drawing.Point(0, 0); 126 126 this.viewHost.Name = "viewHost"; 127 this.viewHost.Size = new System.Drawing.Size(374, 11 5);127 this.viewHost.Size = new System.Drawing.Size(374, 114); 128 128 this.viewHost.TabIndex = 0; 129 129 // … … 132 132 this.clearValueButton.Enabled = false; 133 133 this.clearValueButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Remove; 134 this.clearValueButton.Location = new System.Drawing.Point(3 5, 19);134 this.clearValueButton.Location = new System.Drawing.Point(36, 19); 135 135 this.clearValueButton.Name = "clearValueButton"; 136 this.clearValueButton.Size = new System.Drawing.Size(2 3, 23);136 this.clearValueButton.Size = new System.Drawing.Size(24, 24); 137 137 this.clearValueButton.TabIndex = 1; 138 138 this.toolTip.SetToolTip(this.clearValueButton, "Clear Value"); … … 145 145 this.setValueButton.Location = new System.Drawing.Point(6, 19); 146 146 this.setValueButton.Name = "setValueButton"; 147 this.setValueButton.Size = new System.Drawing.Size(2 3, 23);147 this.setValueButton.Size = new System.Drawing.Size(24, 24); 148 148 this.setValueButton.TabIndex = 0; 149 149 this.toolTip.SetToolTip(this.setValueButton, "Set Value"); -
trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueParameterView.Designer.cs
r2790 r2796 97 97 | System.Windows.Forms.AnchorStyles.Right))); 98 98 this.valuePanel.Controls.Add(this.viewHost); 99 this.valuePanel.Location = new System.Drawing.Point(6, 4 8);99 this.valuePanel.Location = new System.Drawing.Point(6, 49); 100 100 this.valuePanel.Name = "valuePanel"; 101 this.valuePanel.Size = new System.Drawing.Size(374, 14 1);101 this.valuePanel.Size = new System.Drawing.Size(374, 140); 102 102 this.valuePanel.TabIndex = 0; 103 103 this.valuePanel.DragOver += new System.Windows.Forms.DragEventHandler(this.valuePanel_DragEnterOver); … … 111 111 this.viewHost.Location = new System.Drawing.Point(0, 0); 112 112 this.viewHost.Name = "viewHost"; 113 this.viewHost.Size = new System.Drawing.Size(374, 14 1);113 this.viewHost.Size = new System.Drawing.Size(374, 140); 114 114 this.viewHost.TabIndex = 0; 115 115 // … … 118 118 this.clearValueButton.Enabled = false; 119 119 this.clearValueButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Remove; 120 this.clearValueButton.Location = new System.Drawing.Point(3 5, 19);120 this.clearValueButton.Location = new System.Drawing.Point(36, 19); 121 121 this.clearValueButton.Name = "clearValueButton"; 122 this.clearValueButton.Size = new System.Drawing.Size(2 3, 23);122 this.clearValueButton.Size = new System.Drawing.Size(24, 24); 123 123 this.clearValueButton.TabIndex = 1; 124 124 this.toolTip.SetToolTip(this.clearValueButton, "Clear Value"); … … 131 131 this.setValueButton.Location = new System.Drawing.Point(6, 19); 132 132 this.setValueButton.Name = "setValueButton"; 133 this.setValueButton.Size = new System.Drawing.Size(2 3, 23);133 this.setValueButton.Size = new System.Drawing.Size(24, 24); 134 134 this.setValueButton.TabIndex = 0; 135 135 this.toolTip.SetToolTip(this.setValueButton, "Set Value"); -
trunk/sources/HeuristicLab.Parameters/3.3/SubScopesLookupParameter.cs
r2793 r2796 33 33 /// </summary> 34 34 [Item("SubScopesLookupParameter<T>", "A generic parameter representing instances of type T which are collected from or written to the sub-scopes of the current scope.")] 35 public class SubScopesLookupParameter<T> : Parameter, ILookupParameter<T> where T : class, IItem { 36 [Storable] 37 private string actualName; 38 public string ActualName { 39 get { return actualName; } 40 set { 41 if (value == null) throw new ArgumentNullException(); 42 if (!actualName.Equals(value)) { 43 actualName = value; 44 OnActualNameChanged(); 45 } 46 } 47 } 48 49 public new ItemArray<T> ActualValue { 50 get { return (ItemArray<T>)GetActualValue(); } 51 set { SetActualValue(value); } 52 } 53 54 public SubScopesLookupParameter() 55 : base("Anonymous", typeof(ItemArray<T>)) { 56 actualName = Name; 57 } 58 public SubScopesLookupParameter(string name) 59 : base(name, typeof(ItemArray<T>)) { 60 actualName = Name; 61 } 62 public SubScopesLookupParameter(string name, string description) 63 : base(name, description, typeof(ItemArray<T>)) { 64 actualName = Name; 65 } 66 67 public override IDeepCloneable Clone(Cloner cloner) { 68 SubScopesLookupParameter<T> clone = (SubScopesLookupParameter<T>)base.Clone(cloner); 69 clone.actualName = actualName; 70 return clone; 71 } 72 73 public override string ToString() { 74 return string.Format("{0}: {1} ({2})", Name, ActualName, DataType.Name); 75 } 35 public class SubScopesLookupParameter<T> : LookupParameter<ItemArray<T>> where T : class, IItem { 36 public SubScopesLookupParameter() : base() { } 37 public SubScopesLookupParameter(string name) : base(name) { } 38 public SubScopesLookupParameter(string name, string description) : base(name, description) { } 76 39 77 40 protected override IItem GetActualValue() { … … 115 78 } 116 79 } 117 118 public event EventHandler ActualNameChanged;119 private void OnActualNameChanged() {120 if (ActualNameChanged != null)121 ActualNameChanged(this, EventArgs.Empty);122 OnChanged();123 }124 80 } 125 81 } -
trunk/sources/HeuristicLab.Parameters/3.3/ValueLookupParameter.cs
r2793 r2796 47 47 } 48 48 } 49 IItem IValueParameter.Value { 50 get { return Value; } 51 set { 52 T val = value as T; 53 if (val == null) 54 throw new InvalidOperationException( 55 string.Format("Type mismatch. Value is not a \"{0}\".", 56 typeof(T).GetPrettyName()) 57 ); 58 Value = val; 59 } 60 } 49 61 50 62 public ValueLookupParameter() -
trunk/sources/HeuristicLab.Parameters/3.3/ValueParameter.cs
r2793 r2796 47 47 } 48 48 } 49 public new T ActualValue {49 IItem IValueParameter.Value { 50 50 get { return Value; } 51 set { Value = value; } 51 set { 52 T val = value as T; 53 if (val == null) 54 throw new InvalidOperationException( 55 string.Format("Type mismatch. Value is not a \"{0}\".", 56 typeof(T).GetPrettyName()) 57 ); 58 Value = val; 59 } 52 60 } 53 61 … … 84 92 } 85 93 protected override void SetActualValue(IItem value) { 86 T val = value as T; 87 if (val == null) 88 throw new InvalidOperationException( 89 string.Format("Type mismatch. Value is not a \"{0}\".", 90 typeof(T).GetPrettyName()) 91 ); 92 Value = val; 94 ((IValueParameter)this).Value = value; 93 95 } 94 96 -
trunk/sources/HeuristicLab.Routing.TSP/3.3/HeuristicLab.Routing.TSP-3.3.csproj
r2790 r2796 86 86 <ItemGroup> 87 87 <None Include="HeuristicLabRoutingTSPPlugin.cs.frame" /> 88 <Compile Include="TSP.cs" /> 88 89 <Compile Include="HeuristicLabRoutingTSPPlugin.cs" /> 89 90 <Compile Include="Properties\AssemblyInfo.cs" /> 91 <Compile Include="TSPParser.cs" /> 90 92 </ItemGroup> 91 93 <ItemGroup> 92 <ProjectReference Include="..\..\HeuristicLab.Co re.Views\3.3\HeuristicLab.Core.Views-3.3.csproj">93 <Project>{ E226881D-315F-423D-B419-A766FE0D8685}</Project>94 <Name>HeuristicLab.Co re.Views-3.3</Name>94 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj"> 95 <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project> 96 <Name>HeuristicLab.Collections-3.3</Name> 95 97 </ProjectReference> 96 98 <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj"> … … 101 103 <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project> 102 104 <Name>HeuristicLab.Data-3.3</Name> 103 </ProjectReference>104 <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.2\HeuristicLab.MainForm.WindowsForms-3.2.csproj">105 <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>106 <Name>HeuristicLab.MainForm.WindowsForms-3.2</Name>107 </ProjectReference>108 <ProjectReference Include="..\..\HeuristicLab.MainForm\3.2\HeuristicLab.MainForm-3.2.csproj">109 <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>110 <Name>HeuristicLab.MainForm-3.2</Name>111 105 </ProjectReference> 112 106 <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj"> -
trunk/sources/HeuristicLab.Routing.TSP/3.3/HeuristicLabRoutingTSPPlugin.cs.frame
r2790 r2796 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Text;25 22 using HeuristicLab.PluginInfrastructure; 26 23 … … 31 28 [Plugin("HeuristicLab.Routing.TSP", "3.3.0.$WCREV$")] 32 29 [PluginFile("HeuristicLab.Routing.TSP-3.3.dll", PluginFileType.Assembly)] 30 [PluginDependency("HeuristicLab.Collections", "3.3")] 33 31 [PluginDependency("HeuristicLab.Core", "3.3")] 34 [PluginDependency("HeuristicLab.Core.Views", "3.3")]35 32 [PluginDependency("HeuristicLab.Data", "3.3")] 36 [PluginDependency("HeuristicLab.MainForm", "3.2")]37 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.2")]38 33 [PluginDependency("HeuristicLab.Operators", "3.3")] 39 34 [PluginDependency("HeuristicLab.Permutation", "3.3")] -
trunk/sources/HeuristicLab.Routing.TSP/3.3/Properties/AssemblyInfo.frame
r2790 r2796 21 21 22 22 using System.Reflection; 23 using System.Runtime.CompilerServices;24 23 using System.Runtime.InteropServices; 25 24 -
trunk/sources/HeuristicLab.Routing.TSP/3.3/TSPParser.cs
r1530 r2796 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-20 08Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using System; 23 using System.Collections.Generic; 24 using System.Text; 23 using System.Globalization; 25 24 using System.IO; 26 using System.Globalization;27 25 28 26 namespace HeuristicLab.Routing.TSP { 29 27 /// <summary> 30 /// Parses a *.tsp file and extracts its information about a TSP.28 /// Parses a *.tsp file in the TSPLIB format and extracts its information about a TSP. 31 29 /// </summary> 32 30 public class TSPParser {
Note: See TracChangeset
for help on using the changeset viewer.