This commit is contained in:
60
Program.cs
60
Program.cs
@@ -12,33 +12,37 @@ ServerStartInfo.FileName = "AyaNova.exe";
|
|||||||
ServerStartInfo.WorkingDirectory = ServerExeFolderPath;
|
ServerStartInfo.WorkingDirectory = ServerExeFolderPath;
|
||||||
ServerStartInfo.UseShellExecute = true;
|
ServerStartInfo.UseShellExecute = true;
|
||||||
var ServerProcess = Process.Start(ServerStartInfo);
|
var ServerProcess = Process.Start(ServerStartInfo);
|
||||||
|
Console.WriteLine("Waiting for server to exit");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Console.WriteLine("#############################################");
|
|
||||||
Console.WriteLine("Press CTL-C key to shut down AyaNova Server");
|
|
||||||
Console.WriteLine("#############################################");
|
|
||||||
bool Quit = false;
|
|
||||||
ConsoleKeyInfo cki;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
cki = Console.ReadKey(false);
|
|
||||||
|
|
||||||
if (cki.Key == ConsoleKey.C && (cki.Modifiers & ConsoleModifiers.Control) != 0)
|
|
||||||
{
|
|
||||||
Quit = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Console.WriteLine("Press CTL-C key to shut down AyaNova Server");
|
|
||||||
}
|
|
||||||
//Console.WriteLine(cki.Key.ToString());
|
|
||||||
} while (!Quit);
|
|
||||||
|
|
||||||
if (ServerProcess != null)
|
if (ServerProcess != null)
|
||||||
{
|
ServerProcess.WaitForExit();
|
||||||
ServerProcess.CloseMainWindow();
|
|
||||||
ServerProcess.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
// Console.WriteLine("#############################################");
|
||||||
|
// Console.WriteLine("Press CTL-C key to shut down AyaNova Server");
|
||||||
|
// Console.WriteLine("#############################################");
|
||||||
|
// bool Quit = false;
|
||||||
|
// ConsoleKeyInfo cki;
|
||||||
|
// do
|
||||||
|
// {
|
||||||
|
// cki = Console.ReadKey(false);
|
||||||
|
|
||||||
|
// if (cki.Key == ConsoleKey.C && (cki.Modifiers & ConsoleModifiers.Control) != 0)
|
||||||
|
// {
|
||||||
|
// Quit = true;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// Console.WriteLine("Press CTL-C key to shut down AyaNova Server");
|
||||||
|
// }
|
||||||
|
// //Console.WriteLine(cki.Key.ToString());
|
||||||
|
// } while (!Quit);
|
||||||
|
|
||||||
|
// if (ServerProcess != null)
|
||||||
|
// {
|
||||||
|
// ServerProcess.CloseMainWindow();
|
||||||
|
// ServerProcess.Close();
|
||||||
|
// }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user