Changeset 773
- Timestamp:
- 12/10/2008 6:25:27 AM (4 years ago)
- Location:
- branches/eraser6
- Files:
-
- 3 edited
-
Eraser/MainForm.cs (modified) (1 diff)
-
Eraser/Program.cs (modified) (5 diffs)
-
Installer/DirectoryStructure.wxs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Eraser/MainForm.cs
r745 r773 358 358 closedFromNotificationIcon = true; 359 359 Close(); 360 Application.Exit(); 360 361 } 361 362 -
branches/eraser6/Eraser/Program.cs
r761 r773 46 46 //Trivial case: no command parameters 47 47 if (commandLine.Length == 0) 48 GUIMain( false);48 GUIMain(commandLine); 49 49 50 50 //Determine if the sole parameter is --restart; if it is, start the GUI … … 52 52 else if (commandLine.Length == 1) 53 53 { 54 if (commandLine[0] == " /restart" || commandLine[0] == "--restart")55 { 56 GUIMain( true);54 if (commandLine[0] == "--atRestart" || commandLine[0] == "--quiet") 55 { 56 GUIMain(commandLine); 57 57 } 58 58 else … … 119 119 /// Runs Eraser as a GUI application. 120 120 /// </summary> 121 /// <param name="isRestart">True if the program was passed the --restart 122 /// switch.</param> 123 private static void GUIMain(bool isRestart) 121 /// <param name="commandLine">The command line parameters passed to Eraser.</param> 122 private static void GUIMain(string[] commandLine) 124 123 { 125 124 Application.EnableVisualStyles(); … … 153 152 MainForm form = new MainForm(); 154 153 155 //Run tasks which are meant to be run on restart 156 if (isRestart) 157 { 158 eraserClient.QueueRestartTasks(); 159 } 160 154 bool showMainForm = true; 155 foreach (string param in commandLine) 156 { 157 //Run tasks which are meant to be run on restart 158 switch (param) 159 { 160 case "--atRestart": 161 eraserClient.QueueRestartTasks(); 162 goto case "--quiet"; 163 164 //Hide the main form if the user specified the quiet command 165 //line 166 case "--quiet": 167 showMainForm = false; 168 break; 169 } 170 } 171 161 172 //Run the program 162 173 eraserClient.Run(); 163 Application.Run(form); 174 if (showMainForm) 175 Application.Run(form); 176 else 177 Application.Run(); 164 178 165 179 //Save the task list … … 720 734 //that the server process isn't running. Start an instance. 721 735 Process eraserInstance = Process.Start( 722 Assembly.GetExecutingAssembly().Location );736 Assembly.GetExecutingAssembly().Location, "--quiet"); 723 737 eraserInstance.WaitForInputIdle(); 724 738 -
branches/eraser6/Installer/DirectoryStructure.wxs
r766 r773 43 43 <RegistryValue Id="EraserStartup" Root="HKLM" 44 44 Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Run" Name="Eraser" 45 Value=""[!EraserExe]" -- restart" Type="string" />45 Value=""[!EraserExe]" --atRestart" Type="string" /> 46 46 </Component> 47 47 <Component Id="EraserShell" Guid="4C446C7E-BCBC-4561-B8F6-D406516D356F">
Note: See TracChangeset
for help on using the changeset viewer.
