26 lines
747 B
C#
26 lines
747 B
C#
|
|
// Prevent from ending if CTL+C is pressed.
|
|
Console.TreatControlCAsInput = true;
|
|
Console.WriteLine($"AyaNova server launcher {AyaNovaVersion.VersionString}");
|
|
//================== LAUNCH AYANOVA SERVER ==================
|
|
|
|
var AyaNovaProcess = System.Diagnostics.Process.Start(@"../AyaNova.exe");
|
|
|
|
|
|
Console.WriteLine("Press CTL-C keys to shut down AyaNova Server");
|
|
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 keys to shut down AyaNova Server");
|
|
}
|
|
//Console.WriteLine(cki.Key.ToString());
|
|
} while (!Quit); |