code cosmetic

This commit is contained in:
2024-06-18 10:59:08 +02:00
parent deb14caf24
commit 0f3e93bfff
4 changed files with 9 additions and 13 deletions

View File

@@ -40,7 +40,8 @@ public partial class Form1
private bool CheckStatus()
{
bool CheckStatusRet = default;
bool CheckStatusRet;
if (!IsMinecaftProfileLoaded() || !MinecraftProfileChecker.CheckProfile(GetMinecraftProfilePath()))
{
SetStatus(LangRes.StatusText_MinecraftProfileWarning, MySymbols.icons8_general_warning_sign_16px);
@@ -52,9 +53,7 @@ public partial class Form1
CheckStatusRet = false;
}
else
{
CheckStatusRet = true;
}
return CheckStatusRet;
}
@@ -91,7 +90,7 @@ public partial class Form1
if (IsUpdateConfigLoaded())
updateConfig = (ModpackConfig)ModpackConfig.LoadFromUrl(filePath);
}
catch (Exception ex)
catch
{
RadTextBoxControl_ModpackConfig.Text = string.Empty;
}
@@ -117,9 +116,9 @@ public partial class Form1
try
{
lastUpdateCheckResult = await updater.Check(!AppConfig.Instance.AllowRemoveLocalFiles);
lastUpdateCheckResult = await updater.Check();
}
catch (Exception ex)
catch
{
SetStatus(LangRes.StatusText_ErrorWhileUpdateCheckOrUpdate, MySymbols.icons8_delete_16px);
}