Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Optimizer/3.3/Plugin.cs.frame @ 7262

Last change on this file since 7262 was 7260, checked in by swagner, 13 years ago

Corrected AssemblyVersions and AssemblyFileVersions and updated application description of Optimizer (#1716)

File size: 2.9 KB
RevLine 
[2754]1#region License Information
2/* HeuristicLab
[7259]3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
[2754]4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
[2931]22using System.Windows.Forms;
[6827]23using HeuristicLab.Optimizer.Properties;
[2754]24using HeuristicLab.PluginInfrastructure;
25
26namespace HeuristicLab.Optimizer {
[7225]27  [Plugin("HeuristicLab.Optimizer", "3.3.6.$WCREV$")]
[2754]28  [PluginFile("HeuristicLab.Optimizer-3.3.dll", PluginFileType.Assembly)]
[4387]29  [PluginDependency("HeuristicLab.Clients.Common", "3.3")]
[4650]30  [PluginDependency("HeuristicLab.Collections", "3.3")]
[3384]31  [PluginDependency("HeuristicLab.Common", "3.3")]
[3702]32  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
[2754]33  [PluginDependency("HeuristicLab.Core", "3.3")]
34  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
[3437]35  [PluginDependency("HeuristicLab.MainForm", "3.3")]
36  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
[3759]37  [PluginDependency("HeuristicLab.Optimization", "3.3")]
[4650]38  [PluginDependency("HeuristicLab.Persistence", "3.3")]
[2754]39  public class HeuristicLabOptimizerPlugin : PluginBase {
40  }
[2931]41
[7260]42  [Application("Optimizer", "HeuristicLab Optimizer 3.3.6.$WCREV$")]
[2931]43  internal class HeuristicLabOptimizerApplication : ApplicationBase {
44    public override void Run() {
[6827]45     HeuristicLab.MainForm.WindowsForms.MainForm mainForm = null;
46
47      if (Settings.Default.MainFormType == OptimizerMainFormTypes.DockingMainForm) {
48        mainForm = new OptimizerDockingMainForm(typeof(IOptimizerUserInterfaceItemProvider));
49      } else if (Settings.Default.MainFormType == OptimizerMainFormTypes.MultipleDocumentMainForm) {
50        mainForm = new OptimizerMultipleDocumentMainForm(typeof(IOptimizerUserInterfaceItemProvider));
51      } else if (Settings.Default.MainFormType == OptimizerMainFormTypes.SingleDocumentMainForm) {
52        mainForm = new OptimizerSingleDocumentMainForm(typeof(IOptimizerUserInterfaceItemProvider));
53      }
54
55      if (mainForm != null) {
56        mainForm.ShowContentInViewHost = true;
57        Application.Run(mainForm);
58      } else {
59        MessageBox.Show("Error loading setting for the MainForm Type. Please check your configuration file!", "HeuristicLab", MessageBoxButtons.OK, MessageBoxIcon.Error);
60      }
[2931]61    }
62  }
[2754]63}
Note: See TracBrowser for help on using the repository browser.