public void LaunchApplication(string appPath) { var myProcess = new Process { StartInfo = new ProcessStartInfo(appPath) }; myProcess.Start(); ApplicationStarted?.Invoke(this, EventArgs.Empty); myProcess.WaitForExit(); ApplicationStopped?.Invoke(this, EventArgs.Empty); }
private void ExitInternal() { using (var snapshot = Bitmap.CreateSnapshot()) { Bitmap.CreateWiper().Wipe(); ApplicationStopped.Fire(); Bitmap.Console.ForegroundColor = ConsoleString.DefaultForegroundColor; Bitmap.Console.BackgroundColor = ConsoleString.DefaultBackgroundColor; } Dispose(); }