public static void Quit()
{
if (_FrontendManager != null) {
_FrontendManager.IsFrontendDisconnecting = true;
if (IsLocalEngine) {
try {
// we don't shutdown the remote session
Session.Shutdown();
} catch (Exception ex) {
#if LOG4NET
_Logger.Error("Quit(): Exception", ex);
#endif
}
} else if (EngineManager != null) {
EngineManager.Disconnect();
}
}
/*
BUG: don't do this, the access to config is lost and the entry will
throw an exception then.
if (_FrontendManager != null) {
DisconnectEngineFromGUI();
}
*/
MainWindow.Reset();
Environment.Exit(0);
}