chore: move initialization error out of Bootstrapper::Initialize

This commit is contained in:
rjindael 2023-08-02 16:11:24 -07:00
parent 98f1786bbb
commit 813537af75
No known key found for this signature in database
GPG Key ID: D069369C906CCF31
2 changed files with 8 additions and 4 deletions

View File

@ -28,7 +28,6 @@ public class Bootstrapper : Interfaces.IBootstrapper
{ {
if (!Helpers.Base64.IsBase64String(Payload)) if (!Helpers.Base64.IsBase64String(Payload))
{ {
Error($"Failed to launch {Constants.PROJECT_NAME}", $"Try launching {Constants.PROJECT_NAME} from the website again.");
return false; return false;
} }
@ -36,7 +35,6 @@ public class Bootstrapper : Interfaces.IBootstrapper
string[] pieces = Helpers.Base64.ConvertBase64ToString(Payload).Split("|"); string[] pieces = Helpers.Base64.ConvertBase64ToString(Payload).Split("|");
if (pieces.Length != 4) if (pieces.Length != 4)
{ {
Error($"Failed to launch {Constants.PROJECT_NAME}", $"Try launching {Constants.PROJECT_NAME} from the website again.");
return false; return false;
} }

View File

@ -33,8 +33,14 @@ public class MainWindow : Form
Page.Created += (_, _) => Page.Created += (_, _) =>
{ {
if (Bootstrapper.Initialize()) if (!Bootstrapper.Initialize())
Bootstrapper.Run(); {
// hack
Bootstrapper_Errored(null, new string[] { $"Failed to launch {Constants.PROJECT_NAME}", $"Try launching {Constants.PROJECT_NAME} from the website again." });
return;
}
Bootstrapper.Run();
}; };
// This is a small hack to ensure that the underlying Form that MainWindow has // This is a small hack to ensure that the underlying Form that MainWindow has