public bool Shutdown()
        {
            if (Engine.Instance.Storage.GetBool("gui.exit_confirm") == true)
            {
                bool result = GuiUtils.MessageYesNo(Messages.ExitConfirm);
                if (result == false)
                {
                    return(false);
                }
            }
            ShutdownConfirmed = true;
            if (windowAbout != null)
            {
                windowAbout.Close();
            }
            if (windowPreferences != null)
            {
                windowPreferences.Close();
            }

            Engine.Instance.RequestStop();
            return(true);
        }
        public bool Shutdown()
        {
            if (Engine.AskExitConfirm())
            {
                bool result = GuiUtils.MessageYesNo(LanguageManager.GetText("ExitConfirm"));
                if (result == false)
                {
                    Engine.Instance.OnExitRejected();
                    return(false);
                }
            }
            ShutdownConfirmed = true;
            if (windowAbout != null)
            {
                windowAbout.Close();
            }
            if (windowPreferences != null)
            {
                windowPreferences.Close();
            }

            Engine.Instance.RequestStop();
            return(true);
        }