public static string GetAllMessages(this Exception ex)
        {
            var message = new StringBuilder();
            for (var e = ex; e != null; e = e.InnerException)
                message.PrependLine(e.Message);

            return message.ToString();
        }
Example #2
0
        private void DoReset(string resetReason = "")
        {
            ControlsDelegate.SetText(this, tbTitle, "");
            ControlsDelegate.SetText(this, labelNextSplit, "");
            ControlsDelegate.SetText(this, labelScene, "");
            ControlsDelegate.SetText(this, labelCheckpoint, "");
            ControlsDelegate.SetText(this, labelGlove, "");
            ControlsDelegate.SetText(this, labelBlink, "");
            ControlsDelegate.SetText(this, labelSuit, "");
            ControlsDelegate.SetText(this, labelStaff, "");
            ControlsDelegate.SetText(this, labelBarriers, "");
            ControlsDelegate.SetText(this, labelOrbs, "");
            ControlsDelegate.SetText(this, labelScrollCount, "");
            ControlsDelegate.SetText(this, labelBosses, "");
            ControlsDelegate.SetText(this, labelComplete, "");
            splitCounter = 0;
            scrollCounter = 0;
            sceneIndex = 0;
            checkpointIndex = 0;
            previousText = "";
            sbText = new StringBuilder(resetReason);
            sbText.PrependLine(String.Format("Watching Save Directories:\r\n{0}\r\n{1}", fswLegacy == null ? "" : fswLegacy.Path, fswCloud == null ? "" : fswCloud.Path));
            buttonReset.Enabled = false;
            if (fswLegacy != null && fswLegacy.EnableRaisingEvents)
                ControlsDelegate.SetText(this, tbTitle, sbText.ToString());
            else if (fswCloud != null && fswCloud.EnableRaisingEvents)
                ControlsDelegate.SetText(this, tbTitle, sbText.ToString());

            if (HamsterDance.playState == WMPPlayState.wmppsPlaying)
                HamsterDance.controls.stop();
        }