- Enhancement: #4 Verify Windows services have properly terminated upon shutdown. - Moved instanciation of ServiceControl class from Startup.xaml.cs to StatusWindow.xaml.cs.
26 lines
600 B
C#
26 lines
600 B
C#
using System;
|
|
|
|
namespace VMwareLauncher
|
|
{
|
|
public static class ApplicationControl
|
|
{
|
|
public static void Shutdown(int exitCode)
|
|
{
|
|
switch (exitCode)
|
|
{
|
|
case 0:
|
|
Startup.trayIcon.ShowShutdownSuccessMessage();
|
|
break;
|
|
case -1:
|
|
Startup.trayIcon.WarnServiceShutdownFailure();
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
Startup.trayIcon.Destroy();
|
|
Environment.Exit(exitCode);
|
|
}
|
|
}
|
|
}
|