fix loading url & key again
This commit is contained in:
@@ -45,7 +45,7 @@ public partial class Form1
|
||||
{
|
||||
RadTextBoxControl_MinecraftProfileFolder.Text = folderPath;
|
||||
AppConfig.Instance.LastMinecraftProfilePath = folderPath;
|
||||
CheckStatusAndUpdate();
|
||||
CheckStatusAndUpdate(loadedProfile: true);
|
||||
}
|
||||
|
||||
private void LoadUpdateConfigFile(string filePath)
|
||||
@@ -72,19 +72,22 @@ public partial class Form1
|
||||
RadLabel_Status.SvgImage = null;
|
||||
}
|
||||
|
||||
private void CheckStatusAndUpdate()
|
||||
private void CheckStatusAndUpdate(bool loadedProfile = false)
|
||||
{
|
||||
if (CheckStatus())
|
||||
if (CheckStatus(loadedProfile))
|
||||
RadButton_CheckForUpdates.PerformClick();
|
||||
}
|
||||
|
||||
private bool CheckStatus()
|
||||
private bool CheckStatus(bool loadedProfile)
|
||||
{
|
||||
try
|
||||
{
|
||||
modpackInfo = ModpackInfo.TryLoad(RadTextBoxControl_MinecraftProfileFolder.Text.Trim());
|
||||
RadTextBoxControl_ModpackConfig.Text = modpackInfo.ConfigUrl;
|
||||
radTextBoxControl_InstallKey.Text = modpackInfo.ExtrasKey;
|
||||
if (loadedProfile)
|
||||
{
|
||||
RadTextBoxControl_ModpackConfig.Text = modpackInfo.ConfigUrl;
|
||||
radTextBoxControl_InstallKey.Text = modpackInfo.ExtrasKey;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user