Changeset 2513 for branches/PluginInfrastructure Refactoring/HeuristicLab
- Timestamp:
- 11/19/09 17:47:13 (15 years ago)
- Location:
- branches/PluginInfrastructure Refactoring/HeuristicLab
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PluginInfrastructure Refactoring/HeuristicLab/HeuristicLab.csproj
r2504 r2513 6 6 <SchemaVersion>2.0</SchemaVersion> 7 7 <ProjectGuid>{623FB817-8371-4A9A-A491-4DECC87B2BBB}</ProjectGuid> 8 <OutputType> WinExe</OutputType>8 <OutputType>Exe</OutputType> 9 9 <AppDesignerFolder>Properties</AppDesignerFolder> 10 10 <RootNamespace>HeuristicLab</RootNamespace> … … 20 20 <RunPostBuildEvent>Always</RunPostBuildEvent> 21 21 <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> 22 <StartupObject> 23 </StartupObject> 22 24 </PropertyGroup> 23 25 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> -
branches/PluginInfrastructure Refactoring/HeuristicLab/Program.cs
r2508 r2513 26 26 using System.Threading; 27 27 using System.Text; 28 using System.Linq; 28 29 using HeuristicLab.PluginInfrastructure; 30 using HeuristicLab.PluginInfrastructure.Advanced; 29 31 30 32 namespace HeuristicLab { … … 32 34 [STAThread] 33 35 static void Main(string[] args) { 34 try {35 if (args.Length == 0) { // normal mode36 if (args.Length == 0) { // normal mode 37 try { 36 38 Application.EnableVisualStyles(); 37 39 Application.SetCompatibleTextRenderingDefault(false); 38 40 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 } 41 } 42 catch (Exception ex) { 43 ShowErrorMessageBox(ex); 44 } 45 46 } else { 47 var cmd = args[0].ToUpperInvariant(); 48 switch (cmd) { 49 case "START": { 50 if (args.Length != 2) { 51 PrintUsage(); 52 } else { 53 Application.EnableVisualStyles(); 54 Application.SetCompatibleTextRenderingDefault(false); 55 Application.Run(new StarterForm(args[1])); 56 } 57 break; 58 } 59 case "SHOW": { 60 InstallationManager manager = new InstallationManager(); 61 foreach (string info in manager.Show(args.Skip(1))) { 62 Console.WriteLine(info); 63 } 64 break; 65 } 66 case "INSTALL": { 67 InstallationManager manager = new InstallationManager(); 68 manager.Install(args.Skip(1)); 69 break; 70 } 71 case "UPDATE": { 72 InstallationManager manager = new InstallationManager(); 73 manager.Update(args.Skip(1)); 74 break; 75 } 76 case "REMOVE": { 77 InstallationManager manager = new InstallationManager(); 78 manager.Remove(args.Skip(1)); 79 break; 80 } 81 default: PrintUsage(); break; 47 82 } 48 83 } 49 catch (Exception ex) { 50 ShowErrorMessageBox(ex); 51 } 84 } 85 86 private static void PrintUsage() { 87 Console.WriteLine("Usage: HeuristicLab.exe <command> <args>"); 88 Console.WriteLine("Commands:"); 89 Console.WriteLine("\tstart <application name>"); 90 Console.WriteLine("\tshow <plugin name(s)>"); 91 Console.WriteLine("\tupdate <plugin name(s)>"); 92 Console.WriteLine("\tremove <plugin name(s)>"); 93 Console.WriteLine("\tinstall <plugin name(s)>"); 52 94 } 53 95
Note: See TracChangeset
for help on using the changeset viewer.