Imported 1.x Project Files
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace VmwareLauncher
|
||||
{
|
||||
public partial class ErrorHandler
|
||||
{
|
||||
public enum ErrorCode
|
||||
{
|
||||
VmwareNotInstalled,
|
||||
NoAdminRights,
|
||||
TooManyVMLInstances
|
||||
}
|
||||
|
||||
public static void ShowError (ErrorCode ec)
|
||||
{
|
||||
switch (ec)
|
||||
{
|
||||
case ErrorCode.VmwareNotInstalled:
|
||||
MessageBox.Show("Could not find VMware Workstation! Please ensure VMware has been installed correctly.",
|
||||
"VMware not found",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Error);
|
||||
break;
|
||||
case ErrorCode.NoAdminRights:
|
||||
MessageBox.Show("You must run VMware Launcher as an Administrator!",
|
||||
"Excecution Error",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Warning);
|
||||
break;
|
||||
case ErrorCode.TooManyVMLInstances:
|
||||
MessageBox.Show("Only one instance of VMware Launcher can be open!",
|
||||
"External Error",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Exclamation);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user