Files
2019-03-05 20:26:02 +00:00

49 lines
1.8 KiB
C#

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;
}
}
}
}