Changeset 2591 for trunk/sources/HeuristicLab.OptimizationFrontend
- Timestamp:
- 01/05/10 10:31:40 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.OptimizationFrontend/3.2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.OptimizationFrontend/3.2/AvailableOperatorsForm.cs
r1530 r2591 56 56 builtinOperatorsTreeView.TreeViewNodeSorter = nodeSorter; 57 57 58 DiscoveryService discoveryService = new DiscoveryService(); 59 PluginInfo[] plugins = discoveryService.Plugins; 60 foreach(PluginInfo plugin in plugins) { 58 foreach(IPluginDescription plugin in ApplicationManager.Manager.Plugins) { 61 59 TreeNode pluginItem = new TreeNode(); 62 60 pluginItem.Text = plugin.Name; 63 61 pluginItem.Tag = plugin; 64 62 65 Type[] operators = discoveryService.GetTypes(typeof(IOperator), plugin); 66 foreach(Type type in operators) { 63 foreach(Type type in ApplicationManager.Manager.GetTypes(typeof(IOperator), plugin)) { 67 64 if(!type.IsAbstract) { 68 65 TreeNode operatorItem = new TreeNode(); -
trunk/sources/HeuristicLab.OptimizationFrontend/3.2/HeuristicLab.OptimizationFrontend-3.2.csproj
r1534 r2591 11 11 <RootNamespace>HeuristicLab.OptimizationFrontend</RootNamespace> 12 12 <AssemblyName>HeuristicLab.OptimizationFrontend-3.2</AssemblyName> 13 <TargetFrameworkVersion>v 2.0</TargetFrameworkVersion>13 <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> 14 14 <FileAlignment>512</FileAlignment> 15 15 <SignAssembly>true</SignAssembly> … … 70 70 <ItemGroup> 71 71 <Reference Include="System" /> 72 <Reference Include="System.Core"> 73 <RequiredTargetFramework>3.5</RequiredTargetFramework> 74 </Reference> 72 75 <Reference Include="System.Data" /> 73 76 <Reference Include="System.Drawing" /> -
trunk/sources/HeuristicLab.OptimizationFrontend/3.2/HeuristicLabOptimizationFrontendApplication.cs
r1530 r2591 27 27 28 28 namespace HeuristicLab.OptimizationFrontend { 29 [ ClassInfo(Name = "HeuristicLab 3.2", Description="Next generation heuristic optimization environment.")]29 [Application("HeuristicLab 3.2", "Next generation heuristic optimization environment.")] 30 30 class HeuristicLabOptimizationFrontendApplication : ApplicationBase { 31 31 public override void Run() { 32 32 Form mainForm = new MainForm(); 33 PluginManager.ControlManager = (IControlManager)mainForm;33 ControlManager.RegisterManager((IControlManager)mainForm); 34 34 Application.Run(mainForm); 35 35 } -
trunk/sources/HeuristicLab.OptimizationFrontend/3.2/HeuristicLabOptimizationFrontendPlugin.cs
r1530 r2591 27 27 28 28 namespace HeuristicLab.OptimizationFrontend { 29 [ ClassInfo(Name ="HeuristicLab.OptimizationFrontend-3.2")]30 [PluginFile( Filename = "HeuristicLab.OptimizationFrontend-3.2.dll", Filetype =PluginFileType.Assembly)]31 [ Dependency(Dependency ="HeuristicLab.Core-3.2")]29 [Plugin("HeuristicLab.OptimizationFrontend-3.2")] 30 [PluginFile("HeuristicLab.OptimizationFrontend-3.2.dll", PluginFileType.Assembly)] 31 [PluginDependency("HeuristicLab.Core-3.2")] 32 32 public class HeuristicLabOptimizationFrontendPlugin : PluginBase { 33 33 } -
trunk/sources/HeuristicLab.OptimizationFrontend/3.2/MainForm.cs
r2576 r2591 26 26 using System.Drawing; 27 27 using System.Text; 28 using System.Linq; 28 29 using System.Threading; 29 30 using System.Windows.Forms; … … 58 59 runningTasks = 0; 59 60 60 DiscoveryService discoveryService = new DiscoveryService();61 62 61 // discover creatable items 63 Type[] creatables = discoveryService.GetTypes(typeof(IEditable)); 64 string[] names = new string[creatables.Length]; 65 for (int i = 0; i < creatables.Length; i++) 66 names[i] = creatables[i].Name; 67 Array.Sort(names, creatables); 62 IEnumerable<Type> creatables = from x in ApplicationManager.Manager.GetTypes(typeof(IEditable)) 63 orderby x.Name 64 select x; 68 65 foreach (Type type in creatables) { 69 66 if (!type.IsAbstract) { … … 84 81 85 82 #region IControlManager Members 86 public void ShowControl( IControlcontrol) {87 if (InvokeRequired) Invoke((Action< IControl>)ShowControl, control);83 public void ShowControl(object control) { 84 if (InvokeRequired) Invoke((Action<object>)ShowControl, control); 88 85 else { 89 86 if (control is IEditor) { … … 176 173 else { 177 174 editor.Filename = task.filename; 178 PluginManager.ControlManager.ShowControl(editor);175 ControlManager.Manager.ShowControl(editor); 179 176 } 180 177 lock (locker) { … … 239 236 MessageBox.Show("The selected item doesn't provide an editor.", "Editor Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 240 237 } else { 241 PluginManager.ControlManager.ShowControl(editor);238 ControlManager.Manager.ShowControl(editor); 242 239 EnableDisableItems(); 243 240 }
Note: See TracChangeset
for help on using the changeset viewer.