Beispiel #1
0
        internal static void Show(string pwd, string origin)
        {
            if (shown)
            {
                return;
            }

            Startup.QuitOnDestroy = shown = true;
            if (null != GameObject.Find("KSPe.FatalError.PwdIsNotOrigin"))
            {
                return;                                                                        // Already being shown.
            }
            GameObject       go  = new GameObject("KSPe.FatalError.PwdIsNotOrigin");
            FatalErrorMsgBox dlg = go.AddComponent <FatalErrorMsgBox>();

            dlg.Show(
                string.Format(MSG, pwd, origin),
                () => { Application.OpenURL("https://github.com/net-lisias-ksp/KSPAPIExtensions/issues/12"); Application.Quit(); }
                );
            Log.error("Fatal Error PwdIsNotOrigin was shown. pwd = {0} ; origin = {1} . Please visit https://github.com/net-lisias-ksp/KSPAPIExtensions/issues/12", pwd, origin);
        }
Beispiel #2
0
        internal static void Show(Exception e)
        {
            if (shown)
            {
                return;
            }

            Startup.QuitOnDestroy = shown = true;
            if (null != GameObject.Find("KSPe.FatalError.CriticalComponentsAbsent"))
            {
                return;                                                                                  // Already being shown.
            }
            GameObject       go  = new GameObject("KSPe.FatalError.CriticalComponentsAbsent");
            FatalErrorMsgBox dlg = go.AddComponent <FatalErrorMsgBox>();

            dlg.Show(
                string.Format(MSG, e.Message),
                () => { Application.OpenURL("https://github.com/net-lisias-ksp/KSPAPIExtensions/issues/17"); Application.Quit(); }
                );
            Log.error(e, "Fatal Error CriticalComponentsAbsent was shown. e = [{0}]. Please visit https://github.com/net-lisias-ksp/KSPAPIExtensions/issues/17", e.Message);
        }
Beispiel #3
0
        internal static void Show()
        {
            if (shown)
            {
                return;
            }

            Startup.QuitOnDestroy = shown = true;
            if (null != GameObject.Find("KSPe.FatalError.NoGameDataFound"))
            {
                return;                                                                         // Already being shown.
            }
            GameObject       go  = new GameObject("KSPe.FatalError.NoGameDataFound");
            FatalErrorMsgBox dlg = go.AddComponent <FatalErrorMsgBox>();

            dlg.Show(
                MSG,
                () => { Application.OpenURL("https://github.com/net-lisias-ksp/KSPAPIExtensions/issues/11"); Application.Quit(); }
                );
            Log.error("Fatal Error NoGameDataFound was shown. Please visit https://github.com/net-lisias-ksp/KSPAPIExtensions/issues/11");
        }