Changeset 3454
- Timestamp:
- 04/21/10 06:14:03 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.cs ¶
r3080 r3454 95 95 chart.Titles.Clear(); 96 96 chart.Series.Clear(); 97 if (Content == null) { 98 Caption = "DataTable"; 99 chart.Enabled = false; 100 } else { 97 Caption = "DataTable"; 98 if (Content != null) { 101 99 Caption = Content.Name + " (" + Content.GetType().Name + ")"; 102 chart.Enabled = true;103 100 chart.Titles.Add(new Title(Content.Name, Docking.Top)); 104 101 foreach (DataRow row in Content.Rows) 105 102 AddDataRow(row); 106 103 } 104 SetEnabledStateOfControls(); 105 } 106 107 protected override void OnReadOnlyChanged() { 108 base.OnReadOnlyChanged(); 109 SetEnabledStateOfControls(); 110 } 111 112 private void SetEnabledStateOfControls() { 113 chart.Enabled = Content != null; 107 114 } 108 115 -
TabularUnified trunk/sources/HeuristicLab.CodeEditor/3.2/CodeViewer.Designer.cs ¶
r2659 r3454 62 62 this.Controls.Add(this.textEditorControl1); 63 63 this.Controls.Add(this.button1); 64 this.Icon = HeuristicLab.Common.Resources.Resources.HeuristicLabIcon; 64 65 this.Name = "CodeViewer"; 65 66 this.Text = "GeneratedCode"; -
TabularUnified trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemView.cs ¶
r3396 r3454 65 65 if (Content == null) { 66 66 Caption = "NamedItem"; 67 nameTextBox.Text = "-";68 descriptionTextBox.Text = "";67 nameTextBox.Text = string.Empty; 68 descriptionTextBox.Text = string.Empty; 69 69 toolTip.SetToolTip(descriptionTextBox, string.Empty); 70 70 } else { -
TabularUnified trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleArrayView.cs ¶
r3431 r3454 86 86 } 87 87 private void SetEnabledStateOfControls() { 88 if (Content == null) { 89 lengthTextBox.Enabled = false; 90 dataGridView.Enabled = false; 91 } else { 92 lengthTextBox.Enabled = true; 93 dataGridView.Enabled = true; 94 lengthTextBox.ReadOnly = ReadOnly; 95 dataGridView.ReadOnly = ReadOnly; 96 } 88 lengthTextBox.Enabled = Content != null; 89 dataGridView.Enabled = Content != null; 90 lengthTextBox.ReadOnly = ReadOnly; 91 dataGridView.ReadOnly = ReadOnly; 97 92 } 98 93 -
TabularUnified trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs ¶
r3448 r3454 101 101 } 102 102 private void SetEnabledStateOfControls() { 103 if (Content == null) { 104 rowsTextBox.Enabled = false; 105 columnsTextBox.Enabled = false; 106 dataGridView.Enabled = false; 107 } else { 108 rowsTextBox.Enabled = true; 109 columnsTextBox.Enabled = true; 110 dataGridView.Enabled = true; 111 rowsTextBox.ReadOnly = ReadOnly; 112 columnsTextBox.ReadOnly = ReadOnly; 113 dataGridView.ReadOnly = ReadOnly; 114 } 103 rowsTextBox.Enabled = Content != null; 104 columnsTextBox.Enabled = Content != null; 105 dataGridView.Enabled = Content != null; 106 rowsTextBox.ReadOnly = ReadOnly; 107 columnsTextBox.ReadOnly = ReadOnly; 108 dataGridView.ReadOnly = ReadOnly; 115 109 } 116 110 -
TabularUnified trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleValueView.cs ¶
r3430 r3454 80 80 } 81 81 private void SetEnabledStateOfControls() { 82 if (Content == null) valueTextBox.Enabled = false; 83 else { 84 valueTextBox.Enabled = true; 85 valueTextBox.ReadOnly = ReadOnly; 86 } 82 valueTextBox.Enabled = Content != null; 83 valueTextBox.ReadOnly = ReadOnly; 87 84 } 88 85 -
TabularUnified trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/GraphicalSymbolicExpressionTreeView.cs ¶
r3294 r3454 60 60 symbolicExpressionTreeChart.Tree = Content; 61 61 } 62 SetEnabledStateOfControls(); 63 } 64 65 protected override void OnReadOnlyChanged() { 66 base.OnReadOnlyChanged(); 67 SetEnabledStateOfControls(); 68 } 69 70 private void SetEnabledStateOfControls() { 71 symbolicExpressionTreeChart.Enabled = Content != null; 62 72 } 63 73 } -
TabularUnified trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionView.cs ¶
r3442 r3454 35 35 Caption = "SymbolicExpression View"; 36 36 textBox.Text = string.Empty; 37 textBox.Enabled = false;38 37 } else { 39 38 textBox.Text = SymbolicExpression(Content.Root, 0); 40 textBox.Enabled = true;41 39 } 40 SetEnabledStateOfControls(); 41 } 42 43 protected override void OnReadOnlyChanged() { 44 base.OnReadOnlyChanged(); 45 SetEnabledStateOfControls(); 46 } 47 48 private void SetEnabledStateOfControls() { 49 textBox.Enabled = Content != null; 50 textBox.ReadOnly = ReadOnly; 42 51 } 43 52 -
TabularUnified trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperator.cs ¶
r3376 r3454 132 132 } 133 133 134 public void SetDescription(string description) {135 if (description == null)136 throw new NullReferenceException("description must not be null");137 Description = description;138 }139 140 134 public IEnumerable<string> GetAllNamespaces(bool selectedAssembliesOnly) { 141 135 var namespaces = new HashSet<string>(); … … 223 217 typeof(System.Text.StringBuilder).Assembly, 224 218 typeof(System.Data.Linq.DataContext).Assembly, 219 typeof(HeuristicLab.Common.IDeepCloneable).Assembly, 225 220 typeof(HeuristicLab.Core.Item).Assembly, 226 221 typeof(HeuristicLab.Data.IntValue).Assembly, … … 258 253 "System.Linq", 259 254 "System.Data.Linq", 255 "HeuristicLab.Common", 260 256 "HeuristicLab.Core", 261 257 "HeuristicLab.Data", … … 419 415 public override IDeepCloneable Clone(Cloner cloner) { 420 416 ProgrammableOperator clone = (ProgrammableOperator)base.Clone(cloner); 421 clone.description = description;422 417 clone.code = Code; 423 418 clone.executeMethod = executeMethod; -
TabularUnified trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperatorView.Designer.cs ¶
r3014 r3454 78 78 // 79 79 this.descriptionTextBox.Size = new System.Drawing.Size(913, 20); 80 this.descriptionTextBox.TextChanged += new System.EventHandler(this.descriptionTextBox_TextChanged);81 80 // 82 81 // tabPage2 -
TabularUnified trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperatorView.cs ¶
r3376 r3454 60 60 base.RegisterContentEvents(); 61 61 ProgrammableOperator.CodeChanged += ProgrammableOperator_CodeChanged; 62 ProgrammableOperator.DescriptionChanged += ProgrammableOperator_DescriptionChanged;63 62 ProgrammableOperator.SignatureChanged += ProgrammableOperator_SignatureChanged; 64 63 } … … 66 65 protected override void DeregisterContentEvents() { 67 66 ProgrammableOperator.CodeChanged -= ProgrammableOperator_CodeChanged; 68 ProgrammableOperator.DescriptionChanged -= ProgrammableOperator_DescriptionChanged;69 67 ProgrammableOperator.SignatureChanged -= ProgrammableOperator_SignatureChanged; 70 68 base.DeregisterContentEvents(); … … 75 73 if (ProgrammableOperator == null) { 76 74 codeEditor.Text = ""; 77 codeEditor.Enabled = false;78 descriptionTextBox.Text = "";79 descriptionTextBox.Enabled = false;80 75 assembliesTreeView.Nodes.Clear(); 81 76 parameterCollectionView.Content = null; 82 77 } else { 83 codeEditor.Enabled = true;84 descriptionTextBox.Text = ProgrammableOperator.Description;85 descriptionTextBox.Enabled = true;86 78 codeEditor.Prefix = GetGeneratedPrefix(); 87 79 codeEditor.Suffix = @" … … 104 96 parameterCollectionView.Content = ProgrammableOperator.Parameters; 105 97 } 98 SetEnabledStateOfControls(); 99 } 100 101 protected override void OnReadOnlyChanged() { 102 base.OnReadOnlyChanged(); 103 SetEnabledStateOfControls(); 104 } 105 106 private void SetEnabledStateOfControls() { 107 parameterCollectionView.Enabled = Content != null; 108 parameterCollectionView.ReadOnly = ReadOnly; 109 assembliesTreeView.Enabled = Content != null && !ReadOnly; 110 namespacesTreeView.Enabled = Content != null && !ReadOnly; 111 compileButton.Enabled = Content != null && !ReadOnly; 112 codeEditor.Enabled = Content != null && !ReadOnly; 106 113 } 107 114 … … 141 148 private void ProgrammableOperator_CodeChanged(object sender, EventArgs e) { 142 149 codeEditor.Text = ProgrammableOperator.Code; 143 }144 private void ProgrammableOperator_DescriptionChanged(object sender, EventArgs e) {145 descriptionTextBox.Text = ProgrammableOperator.Description;146 150 } 147 151 private void ProgrammableOperator_SignatureChanged(object sender, EventArgs args) { … … 279 283 new CodeViewer(ProgrammableOperator.CompilationUnitCode).ShowDialog(this); 280 284 } 281 282 private void descriptionTextBox_TextChanged(object sender, EventArgs e) {283 ProgrammableOperator.SetDescription(descriptionTextBox.Text);284 }285 286 287 285 } 288 286 } -
TabularUnified trunk/sources/HeuristicLab.Operators.Views/3.3/AlgorithmOperatorView.cs ¶
r3376 r3454 75 75 if (Content == null) { 76 76 breakpointCheckBox.Checked = false; 77 breakpointCheckBox.Enabled = false;78 77 parameterCollectionView.Content = null; 79 78 operatorGraphViewHost.Content = null; 80 tabControl.Enabled = false;81 79 } else { 82 80 breakpointCheckBox.Checked = Content.Breakpoint; 83 breakpointCheckBox.Enabled = true;84 81 parameterCollectionView.Content = ((IOperator)Content).Parameters; 85 82 operatorGraphViewHost.ViewType = null; 86 83 operatorGraphViewHost.Content = Content.OperatorGraph; 87 tabControl.Enabled = true;88 84 } 85 SetEnabledStateOfControls(); 86 } 87 88 protected override void OnReadOnlyChanged() { 89 base.OnReadOnlyChanged(); 90 SetEnabledStateOfControls(); 91 } 92 93 private void SetEnabledStateOfControls() { 94 breakpointCheckBox.Enabled = Content != null && !ReadOnly; 95 parameterCollectionView.Enabled = Content != null; 96 parameterCollectionView.ReadOnly = ReadOnly; 97 operatorGraphViewHost.Enabled = Content != null; 98 operatorGraphViewHost.ReadOnly = ReadOnly; 89 99 } 90 100 -
TabularUnified trunk/sources/HeuristicLab.Operators.Views/3.3/MultiOperatorView.cs ¶
r3407 r3454 75 75 if (Content == null) { 76 76 breakpointCheckBox.Checked = false; 77 breakpointCheckBox.Enabled = false;78 77 operatorListView.Content = null; 79 78 parameterCollectionView.Content = null; 80 tabControl.Enabled = false;81 79 } else { 82 80 breakpointCheckBox.Checked = Content.Breakpoint; 83 breakpointCheckBox.Enabled = true;84 81 operatorListView.Content = Content.Operators; 85 82 parameterCollectionView.Content = ((IOperator)Content).Parameters; 86 tabControl.Enabled = true;87 83 } 84 SetEnabledStateOfControls(); 85 } 86 87 protected override void OnReadOnlyChanged() { 88 base.OnReadOnlyChanged(); 89 SetEnabledStateOfControls(); 90 } 91 92 private void SetEnabledStateOfControls() { 93 breakpointCheckBox.Enabled = Content != null && !ReadOnly; 94 operatorListView.Enabled = Content != null; 95 operatorListView.ReadOnly = ReadOnly; 96 parameterCollectionView.Enabled = Content != null; 97 parameterCollectionView.ReadOnly = ReadOnly; 88 98 } 89 99 -
TabularUnified trunk/sources/HeuristicLab.Operators.Views/3.3/OperatorView.cs ¶
r3376 r3454 76 76 if (Content == null) { 77 77 breakpointCheckBox.Checked = false; 78 breakpointCheckBox.Enabled = false;79 78 } else { 80 79 breakpointCheckBox.Checked = Content.Breakpoint; 81 breakpointCheckBox.Enabled = true;82 80 } 81 SetEnabledStateOfControls(); 82 } 83 84 protected override void OnReadOnlyChanged() { 85 base.OnReadOnlyChanged(); 86 SetEnabledStateOfControls(); 87 } 88 89 private void SetEnabledStateOfControls() { 90 breakpointCheckBox.Enabled = Content != null && !ReadOnly; 83 91 } 84 92 -
TabularUnified trunk/sources/HeuristicLab.Operators.Views/3.3/ValuesCollectorView.cs ¶
r3376 r3454 75 75 if (Content == null) { 76 76 breakpointCheckBox.Checked = false; 77 breakpointCheckBox.Enabled = false;78 77 collectedValuesView.Content = null; 79 78 parameterCollectionView.Content = null; 80 tabControl.Enabled = false;81 79 } else { 82 80 breakpointCheckBox.Checked = Content.Breakpoint; 83 breakpointCheckBox.Enabled = true;84 81 collectedValuesView.Content = Content.CollectedValues; 85 82 parameterCollectionView.Content = ((IOperator)Content).Parameters; 86 tabControl.Enabled = true;87 83 } 84 SetEnabledStateOfControls(); 85 } 86 87 protected override void OnReadOnlyChanged() { 88 base.OnReadOnlyChanged(); 89 SetEnabledStateOfControls(); 90 } 91 92 private void SetEnabledStateOfControls() { 93 breakpointCheckBox.Enabled = Content != null && !ReadOnly; 94 collectedValuesView.Enabled = Content != null; 95 collectedValuesView.ReadOnly = ReadOnly; 96 parameterCollectionView.Enabled = Content != null; 97 parameterCollectionView.ReadOnly = ReadOnly; 88 98 } 89 99 -
TabularUnified trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.Designer.cs ¶
r3299 r3454 52 52 this.problemPanel = new System.Windows.Forms.Panel(); 53 53 this.problemViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 54 this.saveProblemButton = new System.Windows.Forms.Button();55 54 this.openProblemButton = new System.Windows.Forms.Button(); 56 55 this.newProblemButton = new System.Windows.Forms.Button(); … … 65 64 this.executionTimeTextBox = new System.Windows.Forms.TextBox(); 66 65 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 67 this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();68 66 this.stopButton = new System.Windows.Forms.Button(); 69 67 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); … … 127 125 // 128 126 this.problemTabPage.Controls.Add(this.problemPanel); 129 this.problemTabPage.Controls.Add(this.saveProblemButton);130 127 this.problemTabPage.Controls.Add(this.openProblemButton); 131 128 this.problemTabPage.Controls.Add(this.newProblemButton); … … 163 160 this.problemViewHost.ViewType = null; 164 161 // 165 // saveProblemButton166 //167 this.saveProblemButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Save;168 this.saveProblemButton.Location = new System.Drawing.Point(66, 6);169 this.saveProblemButton.Name = "saveProblemButton";170 this.saveProblemButton.Size = new System.Drawing.Size(24, 24);171 this.saveProblemButton.TabIndex = 2;172 this.toolTip.SetToolTip(this.saveProblemButton, "Save Problem");173 this.saveProblemButton.UseVisualStyleBackColor = true;174 this.saveProblemButton.Click += new System.EventHandler(this.saveProblemButton_Click);175 //176 162 // openProblemButton 177 163 // … … 303 289 this.openFileDialog.Filter = "HeuristicLab Files|*.hl|All Files|*.*"; 304 290 this.openFileDialog.Title = "Open Problem"; 305 //306 // saveFileDialog307 //308 this.saveFileDialog.DefaultExt = "hl";309 this.saveFileDialog.FileName = "Problem";310 this.saveFileDialog.Filter = "Uncompressed HeuristicLab Files|*.hl|HeuristicLab Files|*.hl|All Files|*.*";311 this.saveFileDialog.FilterIndex = 2;312 this.saveFileDialog.Title = "Save Problem";313 291 // 314 292 // stopButton … … 368 346 protected HeuristicLab.MainForm.WindowsForms.ViewHost problemViewHost; 369 347 protected System.Windows.Forms.Button newProblemButton; 370 protected System.Windows.Forms.Button saveProblemButton;371 348 protected System.Windows.Forms.Button openProblemButton; 372 349 protected System.Windows.Forms.Button startButton; … … 376 353 protected System.Windows.Forms.TextBox executionTimeTextBox; 377 354 protected System.Windows.Forms.OpenFileDialog openFileDialog; 378 protected System.Windows.Forms.SaveFileDialog saveFileDialog;379 355 protected System.Windows.Forms.TabPage resultsTabPage; 380 356 protected HeuristicLab.Optimization.Views.ResultCollectionView resultsView; -
TabularUnified trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs ¶
r3416 r3454 97 97 resultsView.Content = null; 98 98 runsView.Content = null; 99 tabControl.Enabled = false;100 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false;101 99 executionTimeTextBox.Text = "-"; 102 executionTimeTextBox.Enabled = false;103 100 } else { 104 101 parameterCollectionView.Content = Content.Parameters; 105 saveProblemButton.Enabled = Content.Problem != null;106 102 problemViewHost.ViewType = null; 107 103 problemViewHost.Content = Content.Problem; 108 104 resultsView.Content = Content.Results.AsReadOnly(); 109 105 runsView.Content = Content.Runs; 110 tabControl.Enabled = true;111 EnableDisableButtons();112 106 executionTimeTextBox.Text = Content.ExecutionTime.ToString(); 113 executionTimeTextBox.Enabled = true;114 107 } 115 108 SetEnableStateOfControls(); … … 121 114 } 122 115 private void SetEnableStateOfControls() { 116 parameterCollectionView.Enabled = Content != null; 123 117 parameterCollectionView.ReadOnly = ReadOnly; 118 newProblemButton.Enabled = Content != null && !ReadOnly; 119 openProblemButton.Enabled = Content != null && !ReadOnly; 120 problemViewHost.Enabled = Content != null; 124 121 problemViewHost.ReadOnly = ReadOnly; 122 resultsView.Enabled = Content != null; 125 123 resultsView.ReadOnly = ReadOnly; 124 runsView.Enabled = Content != null; 126 125 runsView.ReadOnly = ReadOnly; 126 executionTimeTextBox.Enabled = Content != null; 127 SetEnabledStateOfExecutableButtons(); 127 128 } 128 129 … … 139 140 problemViewHost.ViewType = null; 140 141 problemViewHost.Content = Content.Problem; 141 saveProblemButton.Enabled = Content.Problem != null;142 142 } 143 143 } … … 152 152 Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e); 153 153 else { 154 this.ReadOnly = Content.ExecutionState == ExecutionState.Started;154 ReadOnly = Content.ExecutionState == ExecutionState.Started; 155 155 Locked = Content.ExecutionState == ExecutionState.Started; 156 EnableDisableButtons();156 SetEnabledStateOfExecutableButtons(); 157 157 } 158 158 } … … 192 192 if (openFileDialog.ShowDialog(this) == DialogResult.OK) { 193 193 this.Cursor = Cursors.AppStarting; 194 newProblemButton.Enabled = openProblemButton.Enabled = saveProblemButton.Enabled =false;194 newProblemButton.Enabled = openProblemButton.Enabled = false; 195 195 problemViewHost.Enabled = false; 196 196 … … 211 211 Content.Problem = problem; 212 212 problemViewHost.Enabled = true; 213 newProblemButton.Enabled = openProblemButton.Enabled = saveProblemButton.Enabled = true; 214 this.Cursor = Cursors.Default; 215 })); 216 }, null); 217 } 218 } 219 protected virtual void saveProblemButton_Click(object sender, EventArgs e) { 220 saveFileDialog.Title = "Save Problem"; 221 if (saveFileDialog.ShowDialog(this) == DialogResult.OK) { 222 this.Cursor = Cursors.AppStarting; 223 newProblemButton.Enabled = openProblemButton.Enabled = saveProblemButton.Enabled = false; 224 problemViewHost.Enabled = false; 225 226 var call = new Action<IProblem, string, int>(XmlGenerator.Serialize); 227 int compression = 9; 228 if (saveFileDialog.FilterIndex == 1) compression = 0; 229 call.BeginInvoke(Content.Problem, saveFileDialog.FileName, compression, delegate(IAsyncResult a) { 230 try { 231 call.EndInvoke(a); 232 } 233 catch (Exception ex) { 234 Auxiliary.ShowErrorMessageBox(ex); 235 } 236 Invoke(new Action(delegate() { 237 problemViewHost.Enabled = true; 238 newProblemButton.Enabled = openProblemButton.Enabled = saveProblemButton.Enabled = true; 213 newProblemButton.Enabled = openProblemButton.Enabled = true; 239 214 this.Cursor = Cursors.Default; 240 215 })); … … 282 257 283 258 #region Helpers 284 private void EnableDisableButtons() { 285 startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused); 286 pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started; 287 stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused); 288 resetButton.Enabled = Content.ExecutionState != ExecutionState.Started; 259 private void SetEnabledStateOfExecutableButtons() { 260 if (Content == null) { 261 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false; 262 } else { 263 startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused); 264 pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started; 265 stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused); 266 resetButton.Enabled = Content.ExecutionState != ExecutionState.Started; 267 } 289 268 } 290 269 #endregion -
TabularUnified trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.Designer.cs ¶
r3299 r3454 50 50 this.algorithmPanel = new System.Windows.Forms.Panel(); 51 51 this.algorithmViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 52 this.saveAlgorithmButton = new System.Windows.Forms.Button();53 52 this.openAlgorithmButton = new System.Windows.Forms.Button(); 54 53 this.newAlgorithmButton = new System.Windows.Forms.Button(); … … 61 60 this.executionTimeTextBox = new System.Windows.Forms.TextBox(); 62 61 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 63 this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();64 62 this.repetitionsLabel = new System.Windows.Forms.Label(); 65 63 this.repetitionsNumericUpDown = new System.Windows.Forms.NumericUpDown(); … … 99 97 // 100 98 this.algorithmTabPage.Controls.Add(this.algorithmPanel); 101 this.algorithmTabPage.Controls.Add(this.saveAlgorithmButton);102 99 this.algorithmTabPage.Controls.Add(this.openAlgorithmButton); 103 100 this.algorithmTabPage.Controls.Add(this.newAlgorithmButton); … … 135 132 this.algorithmViewHost.ViewType = null; 136 133 // 137 // saveAlgorithmButton138 //139 this.saveAlgorithmButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Save;140 this.saveAlgorithmButton.Location = new System.Drawing.Point(66, 6);141 this.saveAlgorithmButton.Name = "saveAlgorithmButton";142 this.saveAlgorithmButton.Size = new System.Drawing.Size(24, 24);143 this.saveAlgorithmButton.TabIndex = 2;144 this.toolTip.SetToolTip(this.saveAlgorithmButton, "Save Problem");145 this.saveAlgorithmButton.UseVisualStyleBackColor = true;146 this.saveAlgorithmButton.Click += new System.EventHandler(this.saveAlgorithmButton_Click);147 //148 134 // openAlgorithmButton 149 135 // … … 252 238 this.openFileDialog.Filter = "HeuristicLab Files|*.hl|All Files|*.*"; 253 239 this.openFileDialog.Title = "Open Algorithm"; 254 //255 // saveFileDialog256 //257 this.saveFileDialog.DefaultExt = "hl";258 this.saveFileDialog.FileName = "Algorithm";259 this.saveFileDialog.Filter = "Uncompressed HeuristicLab Files|*.hl|HeuristicLab Files|*.hl|All Files|*.*";260 this.saveFileDialog.FilterIndex = 2;261 this.saveFileDialog.Title = "Save Algorithm";262 240 // 263 241 // repetitionsLabel … … 353 331 private HeuristicLab.MainForm.WindowsForms.ViewHost algorithmViewHost; 354 332 private System.Windows.Forms.Button newAlgorithmButton; 355 private System.Windows.Forms.Button saveAlgorithmButton;356 333 private System.Windows.Forms.Button openAlgorithmButton; 357 334 private System.Windows.Forms.Button startButton; … … 361 338 private System.Windows.Forms.TextBox executionTimeTextBox; 362 339 private System.Windows.Forms.OpenFileDialog openFileDialog; 363 private System.Windows.Forms.SaveFileDialog saveFileDialog;364 340 private System.Windows.Forms.TabPage runsTabPage; 365 341 private System.Windows.Forms.Label repetitionsLabel; -
TabularUnified trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.cs ¶
r3416 r3454 78 78 if (Content == null) { 79 79 repetitionsNumericUpDown.Value = 1; 80 repetitionsNumericUpDown.Enabled = false;81 80 algorithmViewHost.Content = null; 82 81 runsView.Content = null; 83 tabControl.Enabled = false;84 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false;85 82 executionTimeTextBox.Text = "-"; 86 executionTimeTextBox.Enabled = false;87 83 } else { 88 84 repetitionsNumericUpDown.Value = Content.Repetitions; 89 repetitionsNumericUpDown.Enabled = true;90 saveAlgorithmButton.Enabled = Content.Algorithm != null;91 85 algorithmViewHost.ViewType = null; 92 86 algorithmViewHost.Content = Content.Algorithm; 93 87 runsView.Content = Content.Runs; 94 tabControl.Enabled = true;95 EnableDisableButtons();96 88 executionTimeTextBox.Text = Content.ExecutionTime.ToString(); 97 executionTimeTextBox.Enabled = true;98 89 } 99 90 SetEnableStateOfControls(); … … 104 95 } 105 96 private void SetEnableStateOfControls() { 106 repetitionsNumericUpDown.ReadOnly = ReadOnly; 97 repetitionsNumericUpDown.Enabled = Content != null && !ReadOnly; 98 newAlgorithmButton.Enabled = Content != null && !ReadOnly; 99 openAlgorithmButton.Enabled = Content != null && !ReadOnly; 100 algorithmViewHost.Enabled = Content != null; 107 101 algorithmViewHost.ReadOnly = ReadOnly; 102 runsView.Enabled = Content != null; 108 103 runsView.ReadOnly = ReadOnly; 104 executionTimeTextBox.Enabled = Content != null; 105 SetEnabledStateOfExecutableButtons(); 109 106 } 110 107 … … 121 118 this.ReadOnly = Content.ExecutionState == ExecutionState.Started; 122 119 Locked = Content.ExecutionState == ExecutionState.Started; 123 newAlgorithmButton.Enabled = openAlgorithmButton.Enabled = saveAlgorithmButton.Enabled = Content.ExecutionState != ExecutionState.Started; 124 EnableDisableButtons(); 120 SetEnabledStateOfExecutableButtons(); 125 121 } 126 122 } … … 143 139 algorithmViewHost.ViewType = null; 144 140 algorithmViewHost.Content = Content.Algorithm; 145 saveAlgorithmButton.Enabled = Content.Algorithm != null;146 141 } 147 142 } … … 182 177 if (openFileDialog.ShowDialog(this) == DialogResult.OK) { 183 178 this.Cursor = Cursors.AppStarting; 184 newAlgorithmButton.Enabled = openAlgorithmButton.Enabled = saveAlgorithmButton.Enabled =false;179 newAlgorithmButton.Enabled = openAlgorithmButton.Enabled = false; 185 180 algorithmViewHost.Enabled = false; 186 181 … … 199 194 Content.Algorithm = algorithm; 200 195 algorithmViewHost.Enabled = true; 201 newAlgorithmButton.Enabled = openAlgorithmButton.Enabled = saveAlgorithmButton.Enabled = true; 202 this.Cursor = Cursors.Default; 203 })); 204 }, null); 205 } 206 } 207 private void saveAlgorithmButton_Click(object sender, EventArgs e) { 208 saveFileDialog.Title = "Save Algorithm"; 209 if (saveFileDialog.ShowDialog(this) == DialogResult.OK) { 210 this.Cursor = Cursors.AppStarting; 211 newAlgorithmButton.Enabled = openAlgorithmButton.Enabled = saveAlgorithmButton.Enabled = false; 212 algorithmViewHost.Enabled = false; 213 214 var call = new Action<IAlgorithm, string, int>(XmlGenerator.Serialize); 215 int compression = 9; 216 if (saveFileDialog.FilterIndex == 1) compression = 0; 217 call.BeginInvoke(Content.Algorithm, saveFileDialog.FileName, compression, delegate(IAsyncResult a) { 218 try { 219 call.EndInvoke(a); 220 } 221 catch (Exception ex) { 222 Auxiliary.ShowErrorMessageBox(ex); 223 } 224 Invoke(new Action(delegate() { 225 algorithmViewHost.Enabled = true; 226 newAlgorithmButton.Enabled = openAlgorithmButton.Enabled = saveAlgorithmButton.Enabled = true; 196 newAlgorithmButton.Enabled = openAlgorithmButton.Enabled = true; 227 197 this.Cursor = Cursors.Default; 228 198 })); … … 272 242 273 243 #region Helpers 274 private void EnableDisableButtons() { 275 startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused); 276 pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started; 277 stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused); 278 resetButton.Enabled = Content.ExecutionState != ExecutionState.Started; 244 private void SetEnabledStateOfExecutableButtons() { 245 if (Content == null) { 246 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false; 247 } else { 248 startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused); 249 pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started; 250 stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused); 251 resetButton.Enabled = Content.ExecutionState != ExecutionState.Started; 252 } 279 253 } 280 254 #endregion -
TabularUnified trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.Designer.cs ¶
r3361 r3454 52 52 this.engineViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 53 53 this.operatorGraphTabPage = new System.Windows.Forms.TabPage(); 54 this.saveOperatorGraphButton = new System.Windows.Forms.Button();55 54 this.openOperatorGraphButton = new System.Windows.Forms.Button(); 56 55 this.newOperatorGraphButton = new System.Windows.Forms.Button(); … … 99 98 this.toolTip.SetToolTip(this.newProblemButton, "New Problem"); 100 99 // 101 // saveProblemButton102 //103 this.toolTip.SetToolTip(this.saveProblemButton, "Save Problem");104 //105 100 // openProblemButton 106 101 // … … 228 223 // operatorGraphTabPage 229 224 // 230 this.operatorGraphTabPage.Controls.Add(this.saveOperatorGraphButton);231 225 this.operatorGraphTabPage.Controls.Add(this.openOperatorGraphButton); 232 226 this.operatorGraphTabPage.Controls.Add(this.newOperatorGraphButton); … … 238 232 this.operatorGraphTabPage.Text = "Operator Graph"; 239 233 this.operatorGraphTabPage.UseVisualStyleBackColor = true; 240 //241 // saveOperatorGraphButton242 //243 this.saveOperatorGraphButton.Enabled = false;244 this.saveOperatorGraphButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Save;245 this.saveOperatorGraphButton.Location = new System.Drawing.Point(63, 3);246 this.saveOperatorGraphButton.Name = "saveOperatorGraphButton";247 this.saveOperatorGraphButton.Size = new System.Drawing.Size(24, 24);248 this.saveOperatorGraphButton.TabIndex = 1;249 this.toolTip.SetToolTip(this.saveOperatorGraphButton, "Save Operator Graph");250 this.saveOperatorGraphButton.UseVisualStyleBackColor = true;251 234 // 252 235 // openOperatorGraphButton … … 328 311 protected System.Windows.Forms.TabPage operatorGraphTabPage; 329 312 protected HeuristicLab.MainForm.WindowsForms.ViewHost operatorGraphViewHost; 330 protected System.Windows.Forms.Button saveOperatorGraphButton;331 313 protected System.Windows.Forms.Button openOperatorGraphButton; 332 314 protected System.Windows.Forms.Button newOperatorGraphButton; -
TabularUnified trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.cs ¶
r3423 r3454 88 88 if (Content == null) { 89 89 engineViewHost.Content = null; 90 createUserDefinedAlgorithmButton.Enabled = false;91 90 operatorGraphViewHost.Content = null; 92 91 } else { … … 99 98 operatorGraphViewHost.ViewType = null; 100 99 operatorGraphViewHost.Content = Content.OperatorGraph; 101 createUserDefinedAlgorithmButton.Enabled = true;102 100 } 103 101 SetEnableStateOfControls(); … … 108 106 SetEnableStateOfControls(); 109 107 } 108 protected override void OnLockedChanged() { 109 base.OnLockedChanged(); 110 SetEnableStateOfControls(); 111 } 110 112 private void SetEnableStateOfControls() { 113 engineViewHost.Enabled = Content != null; 111 114 engineViewHost.ReadOnly = ReadOnly; 112 if (Content == null) 113 engineComboBox.Enabled = false; 114 else 115 engineComboBox.Enabled = Content.ExecutionState != ExecutionState.Started; 115 newOperatorGraphButton.Enabled = false; 116 openOperatorGraphButton.Enabled = false; 117 operatorGraphViewHost.Enabled = Content != null; 118 engineComboBox.Enabled = Content != null && !ReadOnly; 119 createUserDefinedAlgorithmButton.Enabled = Content != null && !Locked; 116 120 } 117 121 118 protected override void Content_ExecutionStateChanged(object sender, EventArgs e) {119 if (InvokeRequired)120 Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e);121 else {122 createUserDefinedAlgorithmButton.Enabled = Content.ExecutionState != ExecutionState.Started;123 base.Content_ExecutionStateChanged(sender, e);124 }125 }126 122 protected virtual void Content_EngineChanged(object sender, System.EventArgs e) { 127 123 if (InvokeRequired) -
TabularUnified trunk/sources/HeuristicLab.Optimization.Views/3.3/ExperimentView.cs ¶
r3416 r3454 72 72 optimizerListView.Content = null; 73 73 runsViewHost.Content = null; 74 tabControl.Enabled = false;75 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false;76 74 executionTimeTextBox.Text = "-"; 77 executionTimeTextBox.Enabled = false;78 75 } else { 79 76 optimizerListView.Content = Content.Optimizers; 80 77 runsViewHost.Content = Content.Runs; 81 tabControl.Enabled = true;82 EnableDisableButtons();83 78 executionTimeTextBox.Text = Content.ExecutionTime.ToString(); 84 executionTimeTextBox.Enabled = true;85 79 } 86 80 SetEnableStateOfControls(); … … 92 86 } 93 87 private void SetEnableStateOfControls() { 88 optimizerListView.Enabled = Content != null; 94 89 optimizerListView.ReadOnly = ReadOnly; 90 runsViewHost.Enabled = Content != null; 91 runsViewHost.ReadOnly = ReadOnly; 92 executionTimeTextBox.Enabled = Content != null; 93 SetEnabledStateOfExecutableButtons(); 95 94 } 96 95 … … 108 107 descriptionTextBox.Enabled = Content.ExecutionState != ExecutionState.Started; 109 108 Locked = Content.ExecutionState == ExecutionState.Started; 110 EnableDisableButtons();109 SetEnabledStateOfExecutableButtons(); 111 110 } 112 111 } … … 148 147 149 148 #region Helpers 150 private void EnableDisableButtons() { 151 startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused); 152 pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started; 153 stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused); 154 resetButton.Enabled = Content.ExecutionState != ExecutionState.Started; 149 private void SetEnabledStateOfExecutableButtons() { 150 if (Content == null) { 151 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false; 152 } else { 153 startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused); 154 pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started; 155 stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused); 156 resetButton.Enabled = Content.ExecutionState != ExecutionState.Started; 157 } 155 158 } 156 159 #endregion -
TabularUnified trunk/sources/HeuristicLab.Optimization.Views/3.3/ResultView.cs ¶
r3362 r3454 104 104 } 105 105 private void SetEnabledStateOfControls() { 106 if (Content == null) { 107 dataTypeTextBox.Enabled = false; 108 valueGroupBox.Enabled = false; 109 viewHost.Enabled = false; 110 } else { 111 dataTypeTextBox.Enabled = true; 112 valueGroupBox.Enabled = true; 113 viewHost.Enabled = true; 114 viewHost.ReadOnly = ReadOnly; 115 } 106 dataTypeTextBox.Enabled = Content != null; 107 viewHost.Enabled = Content != null; 108 viewHost.ReadOnly = ReadOnly; 116 109 } 117 110 -
TabularUnified trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs ¶
r3449 r3454 69 69 this.chart.ChartAreas[0].CursorX.Interval = 0; 70 70 this.chart.ChartAreas[0].CursorY.Interval = 0; 71 72 base.ReadOnly = true;73 71 } 74 72 -
TabularUnified trunk/sources/HeuristicLab.Optimization.Views/3.3/RunView.cs ¶
r3432 r3454 82 82 SetEnabledStateOfControls(); 83 83 } 84 protected override void OnLockedChanged() { 85 base.OnLockedChanged(); 86 SetEnabledStateOfControls(); 87 } 84 88 private void SetEnabledStateOfControls() { 85 if (Content == null) { 86 parametersResultsGroupBox.Enabled = false; 87 viewHost.Enabled = false; 88 } else { 89 parametersResultsGroupBox.Enabled = true; 90 viewHost.Enabled = true; 91 viewHost.ReadOnly = ReadOnly; 92 } 89 listView.Enabled = Content != null; 90 viewHost.Enabled = Content != null; 91 viewHost.ReadOnly = ReadOnly; 92 showAlgorithmButton.Enabled = Content != null && !Locked; 93 93 } 94 94 … … 147 147 } 148 148 private void showAlgorithmButton_Click(object sender, EventArgs e) { 149 IContentView view = MainFormManager.CreateDefaultView(Content.Algorithm.Clone()); 150 if (view != null) { 151 view.ReadOnly = ReadOnly; 152 view.Locked = Locked; 153 view.Show(); 149 if (!Locked) { 150 IContentView view = MainFormManager.CreateDefaultView(Content.Algorithm.Clone()); 151 if (view != null) { 152 view.ReadOnly = ReadOnly; 153 view.Locked = Locked; 154 view.Show(); 155 } 154 156 } 155 157 } -
TabularUnified trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.Designer.cs ¶
r3361 r3454 79 79 this.toolTip.SetToolTip(this.newProblemButton, "New Problem"); 80 80 // 81 // saveProblemButton82 //83 this.toolTip.SetToolTip(this.saveProblemButton, "Save Problem");84 //85 81 // openProblemButton 86 82 // -
TabularUnified trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.cs ¶
r3376 r3454 69 69 } 70 70 private void SetEnableStateOfControls() { 71 globalScopeView.Enabled = Content != null; 71 72 globalScopeView.ReadOnly = ReadOnly; 73 newOperatorGraphButton.Enabled = Content != null && !ReadOnly; 74 openOperatorGraphButton.Enabled = Content != null && !ReadOnly; 72 75 operatorGraphViewHost.ReadOnly = ReadOnly; 73 if (Content == null)74 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = false;75 else76 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = Content.ExecutionState != ExecutionState.Started;77 76 } 78 77 … … 84 83 if (openFileDialog.ShowDialog(this) == DialogResult.OK) { 85 84 this.Cursor = Cursors.AppStarting; 86 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled =false;85 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = false; 87 86 operatorGraphViewHost.Enabled = false; 88 87 … … 102 101 Content.OperatorGraph = operatorGraph; 103 102 operatorGraphViewHost.Enabled = true; 104 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = true; 105 this.Cursor = Cursors.Default; 106 })); 107 }, null); 108 } 109 } 110 private void saveOperatorGraphButton_Click(object sender, EventArgs e) { 111 saveFileDialog.Title = "Save Operator Graph"; 112 if (saveFileDialog.ShowDialog(this) == DialogResult.OK) { 113 this.Cursor = Cursors.AppStarting; 114 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = false; 115 operatorGraphViewHost.Enabled = false; 116 117 var call = new Action<OperatorGraph, string, int>(XmlGenerator.Serialize); 118 int compression = 9; 119 if (saveFileDialog.FilterIndex == 1) compression = 0; 120 call.BeginInvoke(Content.OperatorGraph, saveFileDialog.FileName, compression, delegate(IAsyncResult a) { 121 try { 122 call.EndInvoke(a); 123 } 124 catch (Exception ex) { 125 Auxiliary.ShowErrorMessageBox(ex); 126 } 127 Invoke(new Action(delegate() { 128 operatorGraphViewHost.Enabled = true; 129 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = true; 103 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = true; 130 104 this.Cursor = Cursors.Default; 131 105 })); -
TabularUnified trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailView.cs ¶
r3239 r3454 60 60 if (Content == null) { 61 61 pictureBox.Image = null; 62 pictureBox.Enabled = false;63 62 } else { 64 pictureBox.Enabled = true;65 63 GenerateImage(); 66 64 } 65 SetEnabledStateOfControls(); 66 } 67 68 protected override void OnReadOnlyChanged() { 69 base.OnReadOnlyChanged(); 70 SetEnabledStateOfControls(); 71 } 72 73 private void SetEnabledStateOfControls() { 74 pictureBox.Enabled = Content != null; 75 playButton.Enabled = Content != null && !ReadOnly; 67 76 } 68 77 69 78 private void GenerateImage() { 70 playButton.Enabled = this.Enabled ;79 playButton.Enabled = this.Enabled && !ReadOnly; 71 80 animationTimer.Stop(); 72 81 if ((pictureBox.Width > 0) && (pictureBox.Height > 0)) { … … 219 228 } else { 220 229 animationTimer.Stop(); 221 playButton.Enabled = this.Enabled ;230 playButton.Enabled = this.Enabled && !ReadOnly; 222 231 } 223 232 } … … 226 235 227 236 private void AntTrailView_EnabledChanged(object sender, EventArgs e) { 228 if (this.Enabled) playButton.Enabled = true;237 if (this.Enabled) playButton.Enabled = !ReadOnly; 229 238 else playButton.Enabled = false; 230 239 } -
TabularUnified trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/PathTSPTourView.cs ¶
r3213 r3454 70 70 if (Content == null) { 71 71 pictureBox.Image = null; 72 pictureBox.Enabled = false;73 72 } else { 74 pictureBox.Enabled = true;75 73 GenerateImage(); 76 74 } 75 SetEnabledStateOfControls(); 76 } 77 78 protected override void OnReadOnlyChanged() { 79 base.OnReadOnlyChanged(); 80 SetEnabledStateOfControls(); 81 } 82 83 private void SetEnabledStateOfControls() { 84 pictureBox.Enabled = Content != null; 77 85 } 78 86 -
TabularUnified trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.cs ¶
r3376 r3454 71 71 if (Content == null) { 72 72 parameterCollectionView.Content = null; 73 parameterCollectionView.Enabled = false;74 73 pathTSPTourView.Content = null; 75 pathTSPTourView.Enabled = false;76 importButton.Enabled = false;77 74 } else { 78 75 parameterCollectionView.Content = ((IParameterizedNamedItem)Content).Parameters; 79 parameterCollectionView.Enabled = true;80 76 pathTSPTourView.Content = new PathTSPTour(Content.Coordinates, Content.BestKnownSolution); 81 pathTSPTourView.Enabled = true;82 importButton.Enabled = true;83 77 } 78 SetEnabledStateOfControls(); 79 } 80 81 protected override void OnReadOnlyChanged() { 82 base.OnReadOnlyChanged(); 83 SetEnabledStateOfControls(); 84 } 85 86 private void SetEnabledStateOfControls() { 87 parameterCollectionView.Enabled = Content != null; 88 parameterCollectionView.ReadOnly = ReadOnly; 89 pathTSPTourView.Enabled = Content != null; 90 pathTSPTourView.ReadOnly = ReadOnly; 91 importButton.Enabled = Content != null && !ReadOnly; 84 92 } 85 93
Note: See TracChangeset
for help on using the changeset viewer.