add installation without gui & pass arguments to gui
This commit is contained in:
@@ -13,6 +13,15 @@ public partial class Form1
|
||||
private bool currentUpdating = false;
|
||||
private UpdateCheckResult lastUpdateCheckResult = null;
|
||||
|
||||
public Form1(string modpackConfig, string profilePath) : this()
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(modpackConfig))
|
||||
LoadUpdateConfigFile(modpackConfig);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(profilePath))
|
||||
LoadMinecraftProfile(profilePath);
|
||||
}
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -84,10 +93,11 @@ public partial class Form1
|
||||
private void LoadUpdateConfigFile(string filePath)
|
||||
{
|
||||
RadTextBoxControl_ModpackConfig.Text = filePath;
|
||||
|
||||
try
|
||||
{
|
||||
if (IsUpdateConfigLoaded())
|
||||
updateConfig = (ModpackConfig)ModpackConfig.LoadFromUrl(filePath);
|
||||
updateConfig = ModpackConfig.LoadFromUrl(filePath);
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -222,7 +232,8 @@ public partial class Form1
|
||||
{
|
||||
if (Directory.Exists(AppConfig.Instance.LastMinecraftProfilePath))
|
||||
LoadMinecraftProfile(AppConfig.Instance.LastMinecraftProfilePath);
|
||||
LoadUpdateConfigFile(AppConfig.Instance.LastConfigFilePath);
|
||||
if (!string.IsNullOrWhiteSpace(AppConfig.Instance.LastConfigFilePath))
|
||||
LoadUpdateConfigFile(AppConfig.Instance.LastConfigFilePath);
|
||||
}
|
||||
|
||||
private async void Form1_Shown(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user