Changeset 13014 for trunk/sources/HeuristicLab.Optimization.Views/3.3
- Timestamp:
- 10/15/15 16:41:12 (9 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization.Views/3.3
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.Designer.cs
r12012 r13014 41 41 this.newProblemButton = new System.Windows.Forms.Button(); 42 42 this.parametersTabPage = new System.Windows.Forms.TabPage(); 43 this.parameterCollectionView = new HeuristicLab.Core.Views. ParameterCollectionView();43 this.parameterCollectionView = new HeuristicLab.Core.Views.BreadcrumbViewHost(); 44 44 this.resultsTabPage = new System.Windows.Forms.TabPage(); 45 45 this.resultsView = new HeuristicLab.Optimization.Views.ResultCollectionView(); … … 179 179 // parameterCollectionView 180 180 // 181 this.parameterCollectionView.AllowEditingOfHiddenParameters = true;182 181 this.parameterCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 183 182 | System.Windows.Forms.AnchorStyles.Left) … … 185 184 this.parameterCollectionView.Caption = "ParameterCollection View"; 186 185 this.parameterCollectionView.Content = null; 186 this.parameterCollectionView.EnableBreadcrumbs = true; 187 187 this.parameterCollectionView.Location = new System.Drawing.Point(6, 6); 188 188 this.parameterCollectionView.Name = "parameterCollectionView"; … … 190 190 this.parameterCollectionView.Size = new System.Drawing.Size(659, 388); 191 191 this.parameterCollectionView.TabIndex = 0; 192 this.parameterCollectionView.ViewsLabelVisible = false; 192 193 // 193 194 // resultsTabPage … … 297 298 protected System.Windows.Forms.TabPage parametersTabPage; 298 299 protected System.Windows.Forms.TabPage problemTabPage; 299 protected HeuristicLab.Core.Views. ParameterCollectionViewparameterCollectionView;300 protected HeuristicLab.Core.Views.BreadcrumbViewHost parameterCollectionView; 300 301 protected HeuristicLab.MainForm.WindowsForms.ViewHost problemViewHost; 301 302 protected System.Windows.Forms.Button newProblemButton; -
trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs
r12012 r13014 88 88 } else { 89 89 parameterCollectionView.Content = Content.Parameters; 90 var view = parameterCollectionView.ActiveView as ParameterCollectionView; 91 if (view != null) view.AllowEditingOfHiddenParameters = true; 90 92 problemViewHost.ViewType = null; 91 93 problemViewHost.Content = Content.Problem; -
trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.Designer.cs
r12012 r13014 50 50 this.engineViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 51 51 this.operatorGraphTabPage = new System.Windows.Forms.TabPage(); 52 this.openOperatorGraphButton = new System.Windows.Forms.Button(); 53 this.newOperatorGraphButton = new System.Windows.Forms.Button(); 54 this.operatorGraphViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 52 this.operatorGraphViewHost = new HeuristicLab.Core.Views.BreadcrumbViewHost(); 55 53 this.tabControl.SuspendLayout(); 56 54 this.parametersTabPage.SuspendLayout(); … … 219 217 // operatorGraphTabPage 220 218 // 221 this.operatorGraphTabPage.Controls.Add(this.openOperatorGraphButton);222 this.operatorGraphTabPage.Controls.Add(this.newOperatorGraphButton);223 219 this.operatorGraphTabPage.Controls.Add(this.operatorGraphViewHost); 224 220 this.operatorGraphTabPage.Location = new System.Drawing.Point(4, 22); … … 229 225 this.operatorGraphTabPage.UseVisualStyleBackColor = true; 230 226 // 231 // openOperatorGraphButton232 //233 this.openOperatorGraphButton.Enabled = false;234 this.openOperatorGraphButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Open;235 this.openOperatorGraphButton.Location = new System.Drawing.Point(33, 3);236 this.openOperatorGraphButton.Name = "openOperatorGraphButton";237 this.openOperatorGraphButton.Size = new System.Drawing.Size(24, 24);238 this.openOperatorGraphButton.TabIndex = 1;239 this.toolTip.SetToolTip(this.openOperatorGraphButton, "Open Operator Graph");240 this.openOperatorGraphButton.UseVisualStyleBackColor = true;241 //242 // newOperatorGraphButton243 //244 this.newOperatorGraphButton.Enabled = false;245 this.newOperatorGraphButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.NewDocument;246 this.newOperatorGraphButton.Location = new System.Drawing.Point(3, 3);247 this.newOperatorGraphButton.Name = "newOperatorGraphButton";248 this.newOperatorGraphButton.Size = new System.Drawing.Size(24, 24);249 this.newOperatorGraphButton.TabIndex = 1;250 this.toolTip.SetToolTip(this.newOperatorGraphButton, "New Operator Graph");251 this.newOperatorGraphButton.UseVisualStyleBackColor = true;252 //253 227 // operatorGraphViewHost 254 228 // … … 258 232 this.operatorGraphViewHost.Caption = "View"; 259 233 this.operatorGraphViewHost.Content = null; 234 this.operatorGraphViewHost.EnableBreadcrumbs = true; 260 235 this.operatorGraphViewHost.Enabled = false; 261 this.operatorGraphViewHost.Location = new System.Drawing.Point( 3, 33);236 this.operatorGraphViewHost.Location = new System.Drawing.Point(6, 6); 262 237 this.operatorGraphViewHost.Name = "operatorGraphViewHost"; 263 238 this.operatorGraphViewHost.ReadOnly = true; 264 this.operatorGraphViewHost.Size = new System.Drawing.Size(699, 431); 239 this.operatorGraphViewHost.ShowSingle = true; 240 this.operatorGraphViewHost.Size = new System.Drawing.Size(693, 455); 265 241 this.operatorGraphViewHost.TabIndex = 0; 266 242 this.operatorGraphViewHost.ViewsLabelVisible = true; … … 295 271 protected HeuristicLab.MainForm.WindowsForms.ViewHost engineViewHost; 296 272 protected System.Windows.Forms.TabPage operatorGraphTabPage; 297 protected HeuristicLab.MainForm.WindowsForms.ViewHost operatorGraphViewHost; 298 protected System.Windows.Forms.Button openOperatorGraphButton; 299 protected System.Windows.Forms.Button newOperatorGraphButton; 273 protected HeuristicLab.Core.Views.BreadcrumbViewHost operatorGraphViewHost; 300 274 301 275 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.cs
r12012 r13014 95 95 base.SetEnabledStateOfControls(); 96 96 engineViewHost.Enabled = Content != null; 97 newOperatorGraphButton.Enabled = false;98 openOperatorGraphButton.Enabled = false;99 97 operatorGraphViewHost.Enabled = Content != null; 100 98 operatorGraphViewHost.ReadOnly = true; -
trunk/sources/HeuristicLab.Optimization.Views/3.3/ProblemView.Designer.cs
r12012 r13014 58 58 // parameterCollectionView 59 59 // 60 this.parameterCollectionView.EnableBreadcrumbs = true; 60 61 this.parameterCollectionView.Location = new System.Drawing.Point(6, 27); 61 62 this.parameterCollectionView.Size = new System.Drawing.Size(501, 303); -
trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.Designer.cs
r12012 r13014 65 65 // 66 66 this.engineViewHost.Size = new System.Drawing.Size(693, 402); 67 //68 // openOperatorGraphButton69 //70 this.toolTip.SetToolTip(this.openOperatorGraphButton, "Open Operator Graph");71 this.openOperatorGraphButton.Click += new System.EventHandler(openOperatorGraphButton_Click);72 //73 // newOperatorGraphButton74 //75 this.toolTip.SetToolTip(this.newOperatorGraphButton, "New Operator Graph");76 this.newOperatorGraphButton.Click += new System.EventHandler(newOperatorGraphButton_Click);77 67 // 78 68 // tabControl -
trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.cs
r12012 r13014 57 57 base.SetEnabledStateOfControls(); 58 58 globalScopeView.Enabled = Content != null; 59 newOperatorGraphButton.Enabled = Content != null && !ReadOnly;60 openOperatorGraphButton.Enabled = Content != null && !ReadOnly;61 59 operatorGraphViewHost.ReadOnly = Content == null || ReadOnly; 62 }63 64 private void newOperatorGraphButton_Click(object sender, EventArgs e) {65 Content.OperatorGraph = new OperatorGraph();66 }67 private void openOperatorGraphButton_Click(object sender, EventArgs e) {68 openFileDialog.Title = "Open Operator Graph";69 if (openFileDialog.ShowDialog(this) == DialogResult.OK) {70 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = false;71 operatorGraphViewHost.Enabled = false;72 73 ContentManager.LoadAsync(openFileDialog.FileName, delegate(IStorableContent content, Exception error) {74 try {75 if (error != null) throw error;76 OperatorGraph operatorGraph = content as OperatorGraph;77 if (operatorGraph == null)78 MessageBox.Show(this, "The selected file does not contain an operator graph.", "Invalid File", MessageBoxButtons.OK, MessageBoxIcon.Error);79 else80 Content.OperatorGraph = operatorGraph;81 }82 catch (Exception ex) {83 ErrorHandling.ShowErrorDialog(this, ex);84 }85 finally {86 Invoke(new Action(delegate() {87 operatorGraphViewHost.Enabled = true;88 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = true;89 }));90 }91 });92 }93 60 } 94 61 }
Note: See TracChangeset
for help on using the changeset viewer.