Skip to content

Commit

Permalink
Merge pull request #62 from RWELabs/release-alpha
Browse files Browse the repository at this point in the history
Push Release v220601 to Stable
  • Loading branch information
RyanWalpole authored Jun 15, 2022
2 parents 40f54f1 + 0055f74 commit 7c83a1e
Show file tree
Hide file tree
Showing 195 changed files with 927 additions and 383 deletions.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<value />
</setting>
<setting name="Version" serializeAs="String">
<value>220502</value>
<value>220601</value>
</setting>
<setting name="CheckUpdateOnStartup" serializeAs="String">
<value>TRUE</value>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,21 @@ private void DoModInstall_DoWork(object sender, DoWorkEventArgs e)

private void DoModInstall_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
DoMovementOperation.Start();
if (e.Cancelled == true)
{
MessageBox.Show("The operation was cancelled by the user or the system.", "Stardew Valley Modpack Installer", MessageBoxButtons.OK, MessageBoxIcon.Warning);
Application.Exit();
}
else if (e.Error != null)
{
//resultLabel.Text = "Error: " + e.Error.Message;
MessageBox.Show("The application experienced an issue whilst trying to install the modpack:" + Environment.NewLine + e.Error.Message, "Stardew Valley Modpack Installer", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
else
{
DoMovementOperation.Start();
}
}

private void DoMovementOperation_Tick(object sender, EventArgs e)
Expand All @@ -89,7 +103,6 @@ private void DoMovementOperation_Tick(object sender, EventArgs e)

private void DoModDelete_DoWork(object sender, DoWorkEventArgs e)
{

string AppData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string SDVAppData = AppData + @"\RWE Labs\SDV Mod Manager\";
string UnpackLocation = SDVAppData + @"\tmp\unpack\";
Expand All @@ -102,37 +115,61 @@ private void DoModDelete_DoWork(object sender, DoWorkEventArgs e)

private void DoModDelete_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
string PresetName = Path.GetFileNameWithoutExtension(Properties.Settings.Default.LaunchArguments);

foreach (string item in ModsToInstall.Items)
if (e.Cancelled == true)
{
PresetGenerator.AppendText(item + Environment.NewLine);
MessageBox.Show("The operation was cancelled by the user or the system.", "Stardew Valley Modpack Installer", MessageBoxButtons.OK, MessageBoxIcon.Warning);
Application.Exit();
}
else if (e.Error != null)
{
//resultLabel.Text = "Error: " + e.Error.Message;
MessageBox.Show("The application experienced an issue whilst trying to install the modpack:" + Environment.NewLine + e.Error.Message, "Stardew Valley Modpack Installer", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
else
{
string PresetName = Path.GetFileNameWithoutExtension(Properties.Settings.Default.LaunchArguments);

PresetGenerator.AppendText("ConsoleCommands" + Environment.NewLine);
PresetGenerator.AppendText("ErrorHandler" + Environment.NewLine);
PresetGenerator.AppendText("SaveBackup" + Environment.NewLine);
foreach (string item in ModsToInstall.Items)
{
PresetGenerator.AppendText(item + Environment.NewLine);
}

PresetGenerator.SaveFile(Properties.Settings.Default.PresetsDir + PresetName + ".txt", RichTextBoxStreamType.PlainText);
PresetGenerator.AppendText("ConsoleCommands" + Environment.NewLine);
PresetGenerator.AppendText("ErrorHandler" + Environment.NewLine);
PresetGenerator.AppendText("SaveBackup" + Environment.NewLine);

DialogResult dr = MessageBox.Show("The modpack has been successfully installed. We've added a preset so you can easily one-click enable this modpack. The preset is called: " + PresetName + Environment.NewLine + Environment.NewLine + "Would you like to open the Stardew Valley Mod Manager now, to re-enable your mods?", "Stardew Valley Mod Manager", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dr == DialogResult.Yes)
{
this.Hide();
PresetGenerator.SaveFile(Properties.Settings.Default.PresetsDir + PresetName + ".txt", RichTextBoxStreamType.PlainText);

Properties.Settings.Default.LaunchArguments = null;
Properties.Settings.Default.Save();
DialogResult dr = MessageBox.Show("The modpack has been successfully installed. We've added a preset so you can easily one-click enable this modpack. The preset is called: " + PresetName + Environment.NewLine + Environment.NewLine + "Would you like to open the Stardew Valley Mod Manager now, to re-enable your mods?", "Stardew Valley Mod Manager", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dr == DialogResult.Yes)
{
this.Hide();

MainPage splash = new MainPage();
splash.Show();
splash.Activate();
}
else
{
Properties.Settings.Default.LaunchArguments = null;
Properties.Settings.Default.Save();
Application.Exit();
Properties.Settings.Default.LaunchArguments = null;
Properties.Settings.Default.Save();

MainPage splash = new MainPage();
splash.Show();
splash.Activate();
}
else
{
Properties.Settings.Default.LaunchArguments = null;
Properties.Settings.Default.Save();
Application.Exit();
}
}
}

private void DoModInstall_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
//ExtractProgress.Value = e.ProgressPercentage;
}

private void DoModDelete_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
//ExtractProgress.Value = e.ProgressPercentage;
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ public MPOpen()
IsValidSpace.Image = Properties.Resources.sdvError;
Continue.Enabled = false;
}

if(filemb > 40)
{
WarningText.AppendText(Environment.NewLine + Environment.NewLine + "Modpacks may take a long time to install when they contain many mods. This modpack contains " + filemb + "mb of mods and may take a while to install.");
}

Continue.Focus();
}

}
Expand Down Expand Up @@ -127,10 +134,24 @@ private void Extract_DoWork(object sender, DoWorkEventArgs e)

private void Extract_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
MPInstaller steptwo = new MPInstaller();
this.Hide();
steptwo.Show();
steptwo.Activate();

if (e.Cancelled == true)
{
MessageBox.Show("The operation was cancelled by the user or the system.", "Stardew Valley Modpack Installer", MessageBoxButtons.OK, MessageBoxIcon.Warning);
Application.Exit();
}
else if (e.Error != null)
{
MessageBox.Show("The application experienced an issue whilst trying to install the modpack:" + Environment.NewLine + e.Error.Message, "Stardew Valley Modpack Installer", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
else
{
MPInstaller steptwo = new MPInstaller();
this.Hide();
steptwo.Show();
steptwo.Activate();
}
}
}
}
Loading

0 comments on commit 7c83a1e

Please sign in to comment.