Skip to content

Commit

Permalink
Add revamped config menu w/ WPF and theming
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzaboxer committed Oct 4, 2022
1 parent a160efa commit 350b655
Show file tree
Hide file tree
Showing 38 changed files with 18,905 additions and 1,227 deletions.
10 changes: 5 additions & 5 deletions Bloxstrap/Bloxstrap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<ImplicitUsings>enable</ImplicitUsings>
<PlatformTarget>AnyCPU</PlatformTarget>
<Platforms>AnyCPU;x86</Platforms>
<ApplicationIcon>Bloxstrap.ico</ApplicationIcon>
<Version>1.4.4</Version>
<FileVersion>1.4.4.0</FileVersion>
<Version>1.5.0</Version>
<FileVersion>1.5.0.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -26,8 +27,7 @@
</ItemGroup>

<ItemGroup>
<Compile Update="Dialogs\BootstrapperStyles\LegacyDialog2009.cs" />
<Compile Update="Dialogs\BootstrapperStyles\ProgressDialogDark.cs" />
<Compile Update="Dialogs\BootstrapperDialogs\LegacyDialog2009.cs" />
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
Expand Down
4 changes: 2 additions & 2 deletions Bloxstrap/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Win32;

using Bloxstrap.Enums;
using Bloxstrap.Dialogs.BootstrapperStyles;
using Bloxstrap.Dialogs.BootstrapperDialogs;
using Bloxstrap.Helpers;
using Bloxstrap.Helpers.Integrations;
using Bloxstrap.Helpers.RSMM;
Expand Down Expand Up @@ -79,7 +79,7 @@ public partial class Bootstrapper
private int ProgressIncrement;
private bool CancelFired = false;

public IBootstrapperDialog Dialog;
public IBootstrapperDialog Dialog = null!;
#endregion

#region Core
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Bloxstrap.Enums;

namespace Bloxstrap.Dialogs.BootstrapperStyles
namespace Bloxstrap.Dialogs.BootstrapperDialogs
{
public class BootstrapperStyleForm : Form, IBootstrapperDialog
public class BootstrapperDialogForm : Form, IBootstrapperDialog
{
public Bootstrapper? Bootstrapper { get; set; }

Expand Down Expand Up @@ -66,7 +66,7 @@ public void SetupDialog()

if (Bootstrapper is null)
{
Message = "Select Cancel to return to preferences";
Message = "Style Preview - Click Cancel to return";
CancelEnabled = true;
}
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Bloxstrap.Helpers.RSMM;

namespace Bloxstrap.Dialogs.BootstrapperStyles
namespace Bloxstrap.Dialogs.BootstrapperDialogs
{
public interface IBootstrapperDialog
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace Bloxstrap.Dialogs.BootstrapperStyles
namespace Bloxstrap.Dialogs.BootstrapperDialogs
{
// windows: https://youtu.be/VpduiruysuM?t=18
// mac: https://youtu.be/ncHhbcVDRgQ?t=63

public partial class LegacyDialog2009 : BootstrapperStyleForm
public partial class LegacyDialog2009 : BootstrapperDialogForm
{
protected override string _message
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Bloxstrap.Enums;

namespace Bloxstrap.Dialogs.BootstrapperStyles
namespace Bloxstrap.Dialogs.BootstrapperDialogs
{
// https://youtu.be/3K9oCEMHj2s?t=35

public partial class LegacyDialog2011 : BootstrapperStyleForm
public partial class LegacyDialog2011 : BootstrapperDialogForm
{
protected override string _message
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Bloxstrap.Enums;

namespace Bloxstrap.Dialogs.BootstrapperStyles
namespace Bloxstrap.Dialogs.BootstrapperDialogs
{
// basically just the modern dialog

public partial class ProgressDialog : BootstrapperStyleForm
public partial class ProgressDialog : BootstrapperDialogForm
{
protected override string _message
{
Expand Down Expand Up @@ -34,6 +34,14 @@ public ProgressDialog(Bootstrapper? bootstrapper = null)
{
InitializeComponent();

if (Program.Settings.Theme.GetFinal() == Theme.Dark)
{
this.labelMessage.ForeColor = SystemColors.Window;
this.buttonCancel.Image = Properties.Resources.DarkCancelButton;
this.panel1.BackColor = Color.FromArgb(35, 37, 39);
this.BackColor = Color.FromArgb(25, 27, 29);
}

Bootstrapper = bootstrapper;

this.IconBox.BackgroundImage = Program.Settings.BootstrapperIcon.GetBitmap();
Expand All @@ -43,12 +51,26 @@ public ProgressDialog(Bootstrapper? bootstrapper = null)

private void ButtonCancel_MouseEnter(object sender, EventArgs e)
{
this.buttonCancel.Image = Properties.Resources.CancelButtonHover;
if (Program.Settings.Theme.GetFinal() == Theme.Dark)
{
this.buttonCancel.Image = Properties.Resources.DarkCancelButtonHover;
}
else
{
this.buttonCancel.Image = Properties.Resources.CancelButtonHover;
}
}

private void ButtonCancel_MouseLeave(object sender, EventArgs e)
{
this.buttonCancel.Image = Properties.Resources.CancelButton;
if (Program.Settings.Theme.GetFinal() == Theme.Dark)
{
this.buttonCancel.Image = Properties.Resources.DarkCancelButton;
}
else
{
this.buttonCancel.Image = Properties.Resources.CancelButton;
}
}

private void ProgressDialog_Load(object sender, EventArgs e)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using Bloxstrap.Enums;

namespace Bloxstrap.Dialogs.BootstrapperStyles
namespace Bloxstrap.Dialogs.BootstrapperDialogs
{
// https://youtu.be/h0_AL95Sc3o?t=48

// a bit hacky, but this is actually a hidden form
// since taskdialog is part of winforms, it can't really be properly used without a form
// for example, cross-threaded calls to ui controls can't really be done outside of a form

public partial class VistaDialog : BootstrapperStyleForm
public partial class VistaDialog : BootstrapperDialogForm
{
private TaskDialogPage Dialog;

Expand Down
128 changes: 0 additions & 128 deletions Bloxstrap/Dialogs/BootstrapperStyles/ProgressDialogDark.Designer.cs

This file was deleted.

59 changes: 0 additions & 59 deletions Bloxstrap/Dialogs/BootstrapperStyles/ProgressDialogDark.cs

This file was deleted.

Loading

0 comments on commit 350b655

Please sign in to comment.