use Win11 as default theme for Updater

This commit is contained in:
2024-09-06 16:13:14 +02:00
parent 5083af5fd1
commit 0276f11a8a
9 changed files with 87 additions and 440 deletions

View File

@@ -43,20 +43,20 @@ public partial class Form1
private void LoadMinecraftProfile(string folderPath)
{
RadTextBoxControl_MinecraftProfileFolder.Text = folderPath;
RadTextBox_MinecraftProfileFolder.Text = folderPath;
AppConfig.Instance.LastMinecraftProfilePath = folderPath;
CheckStatusAndUpdate(loadedProfile: true);
}
private void LoadUpdateConfigFile(string filePath)
{
RadTextBoxControl_ModpackConfig.Text = filePath;
RadTextBox_ModpackConfig.Text = filePath;
CheckStatusAndUpdate();
}
private void LoadInstallKey(string installKey)
{
radTextBoxControl_InstallKey.Text = modpackInfo.ExtrasKey = installKey;
radTextBox_InstallKey.Text = modpackInfo.ExtrasKey = installKey;
CheckStatusAndUpdate();
}
@@ -82,11 +82,11 @@ public partial class Form1
{
try
{
modpackInfo = ModpackInfo.TryLoad(RadTextBoxControl_MinecraftProfileFolder.Text.Trim());
modpackInfo = ModpackInfo.TryLoad(RadTextBox_MinecraftProfileFolder.Text.Trim());
if (loadedProfile)
{
RadTextBoxControl_ModpackConfig.Text = modpackInfo.ConfigUrl;
radTextBoxControl_InstallKey.Text = modpackInfo.ExtrasKey;
RadTextBox_ModpackConfig.Text = modpackInfo.ConfigUrl;
radTextBox_InstallKey.Text = modpackInfo.ExtrasKey;
}
}
catch
@@ -95,7 +95,7 @@ public partial class Form1
try
{
updateConfig = ModpackConfig.LoadFromUrl(RadTextBoxControl_ModpackConfig.Text);
updateConfig = ModpackConfig.LoadFromUrl(RadTextBox_ModpackConfig.Text);
}
catch (Exception)
{
@@ -104,7 +104,7 @@ public partial class Form1
if (modpackInfo != null)
features = new(updateConfig);
if (modpackInfo == null || string.IsNullOrWhiteSpace(RadTextBoxControl_MinecraftProfileFolder.Text) /*|| modpackInfo.Valid*/)
if (modpackInfo == null || string.IsNullOrWhiteSpace(RadTextBox_MinecraftProfileFolder.Text) /*|| modpackInfo.Valid*/)
{
SetStatus(LangRes.StatusText_MinecraftProfileWarning, AppGlobals.Symbols.GetSvgImage(AppSymbols.general_warning_sign, SymbolSize.Small));
RadButton_PasteModpackConfig.Enabled = false;
@@ -113,7 +113,7 @@ public partial class Form1
RadButton_Install.Enabled = false;
return false;
}
else if (updateConfig == null || string.IsNullOrWhiteSpace(RadTextBoxControl_ModpackConfig.Text))
else if (updateConfig == null || string.IsNullOrWhiteSpace(RadTextBox_ModpackConfig.Text))
{
SetStatus(LangRes.StatusText_ConfigIncompleteOrNotLoaded, AppGlobals.Symbols.GetSvgImage(AppSymbols.general_warning_sign, SymbolSize.Small));
RadButton_PasteModpackConfig.Enabled = true;
@@ -264,7 +264,7 @@ public partial class Form1
private void RadButton_RefreshConfig_Click(object sender, EventArgs e)
{
LoadUpdateConfigFile(RadTextBoxControl_ModpackConfig.Text);
LoadUpdateConfigFile(RadTextBox_ModpackConfig.Text);
}
private async void ButtonX_CheckForUpdates_Click(object sender, EventArgs e)
@@ -284,7 +284,7 @@ public partial class Form1
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
AppConfig.Instance.LastMinecraftProfilePath = RadTextBoxControl_MinecraftProfileFolder.Text;
AppConfig.Instance.LastMinecraftProfilePath = RadTextBox_MinecraftProfileFolder.Text;
}
private void Form1_Load(object sender, EventArgs e)