Free cookie consent management tool by TermsFeed Policy Generator

source: branches/GP-MoveOperators/HeuristicLab.Optimizer/3.3/Plugin.cs.frame @ 8471

Last change on this file since 8471 was 8085, checked in by gkronber, 13 years ago

#1847: merged trunk changes r7800:HEAD into gp move operators branch

File size: 3.3 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;
[8085]23using HeuristicLab.Clients.Access;
[6827]24using HeuristicLab.Optimizer.Properties;
[2754]25using HeuristicLab.PluginInfrastructure;
26
27namespace HeuristicLab.Optimizer {
[7225]28  [Plugin("HeuristicLab.Optimizer", "3.3.6.$WCREV$")]
[2754]29  [PluginFile("HeuristicLab.Optimizer-3.3.dll", PluginFileType.Assembly)]
[4387]30  [PluginDependency("HeuristicLab.Clients.Common", "3.3")]
[4650]31  [PluginDependency("HeuristicLab.Collections", "3.3")]
[3384]32  [PluginDependency("HeuristicLab.Common", "3.3")]
[3702]33  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
[2754]34  [PluginDependency("HeuristicLab.Core", "3.3")]
35  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
[8085]36  [PluginDependency("HeuristicLab.Data", "3.3")]
37  [PluginDependency("HeuristicLab.Data.Views", "3.3")]
[3437]38  [PluginDependency("HeuristicLab.MainForm", "3.3")]
39  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
[3759]40  [PluginDependency("HeuristicLab.Optimization", "3.3")]
[8085]41  [PluginDependency("HeuristicLab.Parameters", "3.3")]
[4650]42  [PluginDependency("HeuristicLab.Persistence", "3.3")]
[8085]43  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
44  [PluginDependency("HeuristicLab.Clients.Access", "3.3")]
[2754]45  public class HeuristicLabOptimizerPlugin : PluginBase {
46  }
[2931]47
[7260]48  [Application("Optimizer", "HeuristicLab Optimizer 3.3.6.$WCREV$")]
[2931]49  internal class HeuristicLabOptimizerApplication : ApplicationBase {
50    public override void Run() {
[6827]51     HeuristicLab.MainForm.WindowsForms.MainForm mainForm = null;
52
53      if (Settings.Default.MainFormType == OptimizerMainFormTypes.DockingMainForm) {
54        mainForm = new OptimizerDockingMainForm(typeof(IOptimizerUserInterfaceItemProvider));
55      } else if (Settings.Default.MainFormType == OptimizerMainFormTypes.MultipleDocumentMainForm) {
56        mainForm = new OptimizerMultipleDocumentMainForm(typeof(IOptimizerUserInterfaceItemProvider));
57      } else if (Settings.Default.MainFormType == OptimizerMainFormTypes.SingleDocumentMainForm) {
58        mainForm = new OptimizerSingleDocumentMainForm(typeof(IOptimizerUserInterfaceItemProvider));
59      }
60
61      if (mainForm != null) {
[8085]62        ClientInformation.InitializeAsync();
63        UserInformation.InitializeAsync();
64
[6827]65        mainForm.ShowContentInViewHost = true;
66        Application.Run(mainForm);
67      } else {
68        MessageBox.Show("Error loading setting for the MainForm Type. Please check your configuration file!", "HeuristicLab", MessageBoxButtons.OK, MessageBoxIcon.Error);
69      }
[2931]70    }
71  }
[2754]72}
Note: See TracBrowser for help on using the repository browser.