bloxstrap/Bloxstrap/Dialogs/LegacyDialog2011.cs
pizzaboxer ff8e68abb2 Break down logic for bootstrapper/dialog handling
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.
2023-02-11 18:57:58 +00:00

53 lines
1.3 KiB
C#

using System;
using System.Windows.Forms;
using Bloxstrap.Enums;
namespace Bloxstrap.Dialogs
{
// https://youtu.be/3K9oCEMHj2s?t=35
public partial class LegacyDialog2011 : BootstrapperDialogForm
{
protected override string _message
{
get => labelMessage.Text;
set => labelMessage.Text = value;
}
protected override ProgressBarStyle _progressStyle
{
get => ProgressBar.Style;
set => ProgressBar.Style = value;
}
protected override int _progressValue
{
get => ProgressBar.Value;
set => ProgressBar.Value = value;
}
protected override bool _cancelEnabled
{
get => this.buttonCancel.Enabled;
set => this.buttonCancel.Enabled = this.buttonCancel.Visible = value;
}
public LegacyDialog2011()
{
InitializeComponent();
// have to convert icon -> bitmap since winforms scaling is poop
this.IconBox.BackgroundImage = App.Settings.Prop.BootstrapperIcon.GetIcon().ToBitmap();
ScaleWindow();
SetupDialog();
}
private void LegacyDialog2011_Load(object sender, EventArgs e)
{
this.Activate();
}
}
}