mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-22 02:21:27 -07:00
The functionality for how bootstrapper dialogs are handled has been broken down to be more relevant to the sections of code. Bootstrapper initialization and preview configuration are now handled by app startup and the preferences menu respectively, rather than all being handled in the dialog constructor. Next things to do are handle exceptions and cancellation.
30 lines
812 B
C#
30 lines
812 B
C#
using System.Windows.Forms;
|
|
|
|
using Bloxstrap.Dialogs;
|
|
|
|
namespace Bloxstrap.Enums
|
|
{
|
|
public enum BootstrapperStyle
|
|
{
|
|
VistaDialog,
|
|
LegacyDialog2009,
|
|
LegacyDialog2011,
|
|
ProgressDialog,
|
|
}
|
|
|
|
public static class BootstrapperStyleEx
|
|
{
|
|
public static IBootstrapperDialog GetNew(this BootstrapperStyle bootstrapperStyle)
|
|
{
|
|
return bootstrapperStyle switch
|
|
{
|
|
BootstrapperStyle.VistaDialog => new VistaDialog(),
|
|
BootstrapperStyle.LegacyDialog2009 => new LegacyDialog2009(),
|
|
BootstrapperStyle.LegacyDialog2011 => new LegacyDialog2011(),
|
|
BootstrapperStyle.ProgressDialog => new ProgressDialog(),
|
|
_ => new ProgressDialog()
|
|
};
|
|
}
|
|
}
|
|
}
|