Add registration form to MPN00BS

This commit is contained in:
Li 2022-07-20 18:48:05 +12:00
parent cdc136dcd4
commit c32d1740e3
31 changed files with 1032 additions and 807 deletions

View file

@ -41,7 +41,7 @@ namespace MPN00BS
if (type == "CRASH")
MessageBox.Show(null, text, type, MessageBoxButtons.Ok);
}
private static void HorseIsleClientExited(object? sender, EventArgs e)
private static void HorseIsleClientExited(object sender, EventArgs e)
{
HorseIsleClientExitCallback();
}
@ -63,7 +63,7 @@ namespace MPN00BS
clientProcess.WaitForExit();
}
public static void StartHispServer(Action ProgressCallback)
public static void StartHispServer(Action ProgressCallback, Action UserCreationCallback, Action ServerStartedCallback)
{
Entry.RegisterCrashHandler();
@ -90,10 +90,7 @@ namespace MPN00BS
if (Database.GetUsers().Length <= 0)
{
// RegisterForm rfrm = new RegisterForm();
// if (rfrm.ShowDialog() == DialogResult.Cancel)
// GameServer.ShutdownServer();
UserCreationCallback();
}
@ -151,10 +148,12 @@ namespace MPN00BS
return;
}
ProgressCallback();
ServerStartedCallback();
}
public static void StartHttpServer()
{
string? hispFolder = Environment.GetEnvironmentVariable("APPDATA");
string hispFolder = Environment.GetEnvironmentVariable("APPDATA");
if (hispFolder == null)
return;