- Timestamp:
- 04/19/10 03:28:16 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorListView.cs
r3393 r3407 20 20 #endregion 21 21 22 using System; 22 23 using System.Windows.Forms; 23 24 using HeuristicLab.Collections; … … 29 30 [Content(typeof(IItemList<IOperator>), false)] 30 31 public partial class OperatorListView : ItemListView<IOperator> { 31 protected TypeSelectorDialog typeSelectorDialog;32 33 32 /// <summary> 34 33 /// Initializes a new instance of <see cref="VariablesScopeView"/> with caption "Variables Scope View". … … 53 52 if (typeSelectorDialog == null) { 54 53 typeSelectorDialog = new TypeSelectorDialog(); 54 typeSelectorDialog.Caption = "Select Operator"; 55 55 typeSelectorDialog.TypeSelector.Caption = "Available Operators"; 56 56 typeSelectorDialog.TypeSelector.Configure(typeof(IOperator), false, false); 57 57 } 58 58 59 if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) 60 return (IOperator)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 61 else 62 return null; 59 if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) { 60 try { 61 return (IOperator)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 62 } 63 catch (Exception ex) { 64 Auxiliary.ShowErrorMessageBox(ex); 65 } 66 } 67 return null; 63 68 } 64 69 }
Note: See TracChangeset
for help on using the changeset viewer.