chore: move initialization error out of Bootstrapper::Initialize
This commit is contained in:
parent
98f1786bbb
commit
813537af75
|
|
@ -28,7 +28,6 @@ public class Bootstrapper : Interfaces.IBootstrapper
|
|||
{
|
||||
if (!Helpers.Base64.IsBase64String(Payload))
|
||||
{
|
||||
Error($"Failed to launch {Constants.PROJECT_NAME}", $"Try launching {Constants.PROJECT_NAME} from the website again.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -36,7 +35,6 @@ public class Bootstrapper : Interfaces.IBootstrapper
|
|||
string[] pieces = Helpers.Base64.ConvertBase64ToString(Payload).Split("|");
|
||||
if (pieces.Length != 4)
|
||||
{
|
||||
Error($"Failed to launch {Constants.PROJECT_NAME}", $"Try launching {Constants.PROJECT_NAME} from the website again.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,14 @@ public class MainWindow : Form
|
|||
|
||||
Page.Created += (_, _) =>
|
||||
{
|
||||
if (Bootstrapper.Initialize())
|
||||
Bootstrapper.Run();
|
||||
if (!Bootstrapper.Initialize())
|
||||
{
|
||||
// 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
|
||||
|
|
|
|||
Loading…
Reference in New Issue