bloxstrap/Bloxstrap/Enums/BootstrapperStyle.cs
pizzaboxer 8316c9ec72 Code cleanup and minor fixes
- Fixed channel arg not being set when launching game client
 - Fixed preferences tooltip hiding too early
 - Fixed last deploy info not showing for the right channel
 - Last deploy info now shows deploy timestamp according to system timezone
2022-08-27 13:41:15 +01:00

55 lines
1.4 KiB
C#

using Bloxstrap.Dialogs.BootstrapperStyles;
namespace Bloxstrap.Enums
{
public enum BootstrapperStyle
{
VistaDialog,
LegacyDialog2009,
LegacyDialog2011,
ProgressDialog,
ProgressDialogDark,
}
public static class BootstrapperStyleEx
{
public static void Show(this BootstrapperStyle bootstrapperStyle, Bootstrapper? bootstrapper = null)
{
Form dialog;
switch (bootstrapperStyle)
{
case BootstrapperStyle.VistaDialog:
dialog = new VistaDialog(bootstrapper);
break;
case BootstrapperStyle.LegacyDialog2009:
dialog = new LegacyDialog2009(bootstrapper);
break;
case BootstrapperStyle.LegacyDialog2011:
dialog = new LegacyDialog2011(bootstrapper);
break;
case BootstrapperStyle.ProgressDialog:
default:
dialog = new ProgressDialog(bootstrapper);
break;
case BootstrapperStyle.ProgressDialogDark:
dialog = new ProgressDialogDark(bootstrapper);
break;
}
if (bootstrapper is null)
{
dialog.ShowDialog();
}
else
{
Application.Run(dialog);
}
}
}
}