Changeset 2591 for trunk/sources/HeuristicLab.Constraints
- Timestamp:
- 01/05/10 10:31:40 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Constraints/3.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Constraints/3.2/HeuristicLabConstraintsPlugin.cs
r1927 r2591 29 29 /// Plugin class for HeuristicLab.Constraints plugin. 30 30 /// </summary> 31 [ ClassInfo(Name ="HeuristicLab.Constraints-3.2")]32 [PluginFile( Filename = "HeuristicLab.Constraints-3.2.dll", Filetype =PluginFileType.Assembly)]33 [ Dependency(Dependency ="HeuristicLab.Core-3.2")]34 [ Dependency(Dependency ="HeuristicLab.Data-3.2")]31 [Plugin("HeuristicLab.Constraints-3.2")] 32 [PluginFile("HeuristicLab.Constraints-3.2.dll", PluginFileType.Assembly)] 33 [PluginDependency("HeuristicLab.Core-3.2")] 34 [PluginDependency("HeuristicLab.Data-3.2")] 35 35 public class HeuristicLabConstraintsPlugin : PluginBase { 36 36 } -
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.