From f8f6ce0c0c28438cf399186230dbde21218bbf8d Mon Sep 17 00:00:00 2001
From: pizzaboxer <41478239+pizzaboxer@users.noreply.github.com>
Date: Fri, 13 Jan 2023 20:44:14 +0000
Subject: [PATCH] Rearrange preferences, channel change prompting
---
Bloxstrap/Dialogs/Preferences.xaml | 62 ++++++++++++++-------------
Bloxstrap/Dialogs/Preferences.xaml.cs | 14 ++++--
Bloxstrap/Helpers/Protocol.cs | 2 +-
Bloxstrap/Models/SettingsFormat.cs | 1 +
4 files changed, 45 insertions(+), 34 deletions(-)
diff --git a/Bloxstrap/Dialogs/Preferences.xaml b/Bloxstrap/Dialogs/Preferences.xaml
index 2fc44dd..7262fe9 100644
--- a/Bloxstrap/Dialogs/Preferences.xaml
+++ b/Bloxstrap/Dialogs/Preferences.xaml
@@ -72,18 +72,18 @@
-
+
-
+
-
+
@@ -97,7 +97,7 @@
-
+
@@ -107,7 +107,7 @@
-
+
@@ -118,37 +118,41 @@
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Bloxstrap/Dialogs/Preferences.xaml.cs b/Bloxstrap/Dialogs/Preferences.xaml.cs
index d5dc6b1..f7f7294 100644
--- a/Bloxstrap/Dialogs/Preferences.xaml.cs
+++ b/Bloxstrap/Dialogs/Preferences.xaml.cs
@@ -299,14 +299,14 @@ namespace Bloxstrap.Dialogs
}
}
- public bool CheckForUpdates
+ public bool PromptChannelChange
{
- get => Program.Settings.CheckForUpdates;
- set => Program.Settings.CheckForUpdates = value;
+ get => Program.Settings.PromptChannelChange;
+ set => Program.Settings.PromptChannelChange = value;
}
#endregion
- #region Style
+ #region Bloxstrap
public IReadOnlyDictionary Themes { get; set; } = new Dictionary()
{
{ "System Default", Enums.Theme.Default },
@@ -355,6 +355,12 @@ namespace Bloxstrap.Dialogs
get => Icons.FirstOrDefault(x => x.Value == Program.Settings.BootstrapperIcon).Key;
set => Program.Settings.BootstrapperIcon = Icons[value];
}
+
+ public bool CheckForUpdates
+ {
+ get => Program.Settings.CheckForUpdates;
+ set => Program.Settings.CheckForUpdates = value;
+ }
#endregion
public string ConfirmButtonText { get; } = Program.IsFirstRun ? "Install" : "Save";
diff --git a/Bloxstrap/Helpers/Protocol.cs b/Bloxstrap/Helpers/Protocol.cs
index dc369b7..370f89a 100644
--- a/Bloxstrap/Helpers/Protocol.cs
+++ b/Bloxstrap/Helpers/Protocol.cs
@@ -49,7 +49,7 @@ namespace Bloxstrap.Helpers
{
if (val.ToLower() != Program.Settings.Channel.ToLower())
{
- DialogResult result = Program.ShowMessageBox(
+ DialogResult result = !Program.Settings.PromptChannelChange ? DialogResult.Yes : Program.ShowMessageBox(
$"{Program.ProjectName} was launched with the Roblox build channel set to {val}, however your current preferred channel is {Program.Settings.Channel}.\n\n" +
$"Would you like to switch channels from {Program.Settings.Channel} to {val}?",
MessageBoxIcon.Question,
diff --git a/Bloxstrap/Models/SettingsFormat.cs b/Bloxstrap/Models/SettingsFormat.cs
index 552a8d3..f0da4b4 100644
--- a/Bloxstrap/Models/SettingsFormat.cs
+++ b/Bloxstrap/Models/SettingsFormat.cs
@@ -9,6 +9,7 @@ namespace Bloxstrap.Models
public string VersionGuid { get; set; } = "";
public bool CheckForUpdates { get; set; } = true;
+ public bool PromptChannelChange { get; set; } = false;
public BootstrapperStyle BootstrapperStyle { get; set; } = BootstrapperStyle.ProgressDialog;
public BootstrapperIcon BootstrapperIcon { get; set; } = BootstrapperIcon.IconBloxstrap;