Imported 2.x Project Files
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace VMwareLauncher
|
||||
{
|
||||
public class MessageHandler
|
||||
{
|
||||
public enum MessageCode
|
||||
{
|
||||
VmwareNotInstalled,
|
||||
TooManyVMLInstances,
|
||||
WelcomeMessage
|
||||
}
|
||||
|
||||
public static void Show(MessageCode mc)
|
||||
{
|
||||
switch (mc)
|
||||
{
|
||||
case MessageCode.VmwareNotInstalled:
|
||||
MessageBox.Show("Could not find VMware Workstation! Please ensure VMware has been installed correctly.",
|
||||
"VMware not found",
|
||||
MessageBoxButton.OK,
|
||||
MessageBoxImage.Error);
|
||||
break;
|
||||
case MessageCode.TooManyVMLInstances:
|
||||
MessageBox.Show("Only one instance of VMware Launcher can be open!",
|
||||
"External Error",
|
||||
MessageBoxButton.OK,
|
||||
MessageBoxImage.Exclamation);
|
||||
break;
|
||||
case MessageCode.WelcomeMessage:
|
||||
MessageBox.Show(@"Welcome to VMwareLauncher! This utility is designed to automatically start and stop VMware Workstation services " +
|
||||
"as needed when running the application. Since you've never run this tool before, your services will be configured " +
|
||||
"automatically.",
|
||||
"VMware Launcher",
|
||||
MessageBoxButton.OK,
|
||||
MessageBoxImage.Information);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user