Changeset 2796 for trunk/sources/HeuristicLab.Core.Views/3.3
- Timestamp:
- 02/15/10 05:26:02 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Core.Views/3.3
- Files:
-
- 4 added
- 11 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
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");
Note: See TracChangeset
for help on using the changeset viewer.