- Timestamp:
- 01/05/10 10:31:40 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Constraints/3.2/NotConstraintView.cs
r1529 r2591 58 58 public NotConstraintView() { 59 59 InitializeComponent(); 60 DiscoveryService discoveryService = new DiscoveryService(); 61 itemTypes = discoveryService.GetTypes(typeof(ConstraintBase)); 62 for (int i = 0; i < itemTypes.Length; i++) { 63 subConstraintComboBox.Items.Add(itemTypes[i].Name); 60 foreach (Type itemType in ApplicationManager.Manager.GetTypes(typeof(ConstraintBase))) { 61 subConstraintComboBox.Items.Add(itemType.Name); 64 62 } 65 63 subConstraintComboBox.SelectedIndex = 0; … … 130 128 try { 131 129 NotConstraint.SubConstraint = (ConstraintBase)Activator.CreateInstance(itemTypes[subConstraintComboBox.SelectedIndex]); 132 } catch (Exception) { 130 } 131 catch (Exception) { 133 132 NotConstraint.SubConstraint = null; 134 133 } … … 144 143 private void UpdateSubConstraintComboBox() { 145 144 subConstraintComboBox.SelectedIndexChanged -= new EventHandler(subConstraintComboBox_SelectedIndexChanged); 146 for (int i = 0 ; i < itemTypes.Length; i++)145 for (int i = 0; i < itemTypes.Length; i++) 147 146 if (itemTypes[i].Name.Equals(NotConstraint.SubConstraint.GetType().Name)) 148 147 subConstraintComboBox.SelectedIndex = i;
Note: See TracChangeset
for help on using the changeset viewer.