Changeset 3407 for trunk/sources/HeuristicLab.Optimization.Views
- Timestamp:
- 04/19/10 03:28:16 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization.Views/3.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs
r3367 r3407 176 176 problemTypeSelectorDialog = new TypeSelectorDialog(); 177 177 problemTypeSelectorDialog.Caption = "Select Problem"; 178 problemTypeSelectorDialog.TypeSelector.Caption = "Available Problems"; 178 179 problemTypeSelectorDialog.TypeSelector.Configure(Content.ProblemType, false, false); 179 180 } 180 181 if (problemTypeSelectorDialog.ShowDialog(this) == DialogResult.OK) { 181 Content.Problem = (IProblem)problemTypeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 182 try { 183 Content.Problem = (IProblem)problemTypeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 184 } 185 catch (Exception ex) { 186 Auxiliary.ShowErrorMessageBox(ex); 187 } 182 188 } 183 189 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.cs
r3367 r3407 166 166 algorithmTypeSelectorDialog = new TypeSelectorDialog(); 167 167 algorithmTypeSelectorDialog.Caption = "Select Algorithm"; 168 algorithmTypeSelectorDialog.TypeSelector.Caption = "Available Algorithms"; 168 169 algorithmTypeSelectorDialog.TypeSelector.Configure(typeof(IAlgorithm), false, false); 169 170 } 170 171 if (algorithmTypeSelectorDialog.ShowDialog(this) == DialogResult.OK) { 171 Content.Algorithm = (IAlgorithm)algorithmTypeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 172 try { 173 Content.Algorithm = (IAlgorithm)algorithmTypeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 174 } 175 catch (Exception ex) { 176 Auxiliary.ShowErrorMessageBox(ex); 177 } 172 178 } 173 179 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/OptimizerListView.Designer.cs
r3274 r3407 33 33 protected override void Dispose(bool disposing) { 34 34 if (disposing) { 35 if (typeSelectorDialog != null) typeSelectorDialog.Dispose();36 35 if (components != null) components.Dispose(); 37 36 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/OptimizerListView.cs
r3393 r3407 20 20 #endregion 21 21 22 using System; 22 23 using System.Windows.Forms; 23 24 using HeuristicLab.Collections; … … 31 32 [Content(typeof(IItemList<IOptimizer>), false)] 32 33 public partial class OptimizerListView : ItemListView<IOptimizer> { 33 protected TypeSelectorDialog typeSelectorDialog;34 35 34 /// <summary> 36 35 /// Initializes a new instance of <see cref="VariablesScopeView"/> with caption "Variables Scope View". … … 55 54 if (typeSelectorDialog == null) { 56 55 typeSelectorDialog = new TypeSelectorDialog(); 56 typeSelectorDialog.Caption = "Select Optimizer"; 57 57 typeSelectorDialog.TypeSelector.Caption = "Available Optimizers"; 58 58 typeSelectorDialog.TypeSelector.Configure(typeof(IOptimizer), false, false); 59 59 } 60 60 61 if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) 62 return typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType() as IOptimizer; 63 else 64 return null; 61 if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) { 62 try { 63 return (IOptimizer)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 64 } 65 catch (Exception ex) { 66 Auxiliary.ShowErrorMessageBox(ex); 67 } 68 } 69 return null; 65 70 } 66 71 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/ResultCollectionView.cs
r3393 r3407 56 56 57 57 protected override IResult CreateItem() { 58 IResult item = new Result(); 59 if (Content.ContainsKey(item.Name)) 60 item = new Result(GetUniqueName(item.Name), typeof(IItem)); 61 return item; 58 return null; 62 59 } 63 60 }
Note: See TracChangeset
for help on using the changeset viewer.