Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/19/09 15:47:15 (15 years ago)
Author:
gkronber
Message:

Renamed MainForm to StarterForm and added possibility to start a specific application from the command line. #799

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PluginInfrastructure Refactoring/HeuristicLab/Program.cs

    r2504 r2508  
    3636          Application.EnableVisualStyles();
    3737          Application.SetCompatibleTextRenderingDefault(false);
    38           Application.Run(new MainForm());
    39         } else if (args.Length == 1) {  // start specific application
    40           //PluginManager.Manager.Initialize();
    41 
    42           //ApplicationInfo app = null;
    43           //foreach (ApplicationInfo info in PluginManager.Manager.InstalledApplications) {
    44           //  if (info.Name == args[0])
    45           //    app = info;
    46           //}
    47           //if (app == null) {  // application not found
    48           //  MessageBox.Show("Cannot start application.\nApplication " + args[0] + " is not installed.\n\nStarting HeuristicLab in normal mode ...",
    49           //                  "HeuristicLab",
    50           //                  MessageBoxButtons.OK,
    51           //                  MessageBoxIcon.Warning);
    52           //  Application.EnableVisualStyles();
    53           //  Application.SetCompatibleTextRenderingDefault(false);
    54           //  Application.Run(new MainForm());
    55           //} else {
    56           //  PluginManager.Manager.Run(app);
    57           //}
     38          Application.Run(new StarterForm());
     39        } else if (args[0].ToUpperInvariant() == "START") {  // start specific application
     40          if (args.Length != 2) {
     41            Console.WriteLine("Usage: HeuristicLab.exe start <application name>");
     42          } else {
     43            Application.EnableVisualStyles();
     44            Application.SetCompatibleTextRenderingDefault(false);
     45            Application.Run(new StarterForm(args[1]));
     46          }
    5847        }
    5948      }
Note: See TracChangeset for help on using the changeset viewer.