Пример #1
0
        private void SetFastestLabel(StatSummary levelInfo, LevelType type)
        {
            int fastestSwitchCount = switchCount;

            if (!StatsForm.CurrentSettings.SwitchBetweenLongest)
            {
                fastestSwitchCount = StatsForm.CurrentSettings.OnlyShowLongest ? 0 : type.FastestLabel();
            }
            switch (fastestSwitchCount % (levelInfo.BestScore.HasValue ? 3 : 2))
            {
            case 0:
                lblFastest.Text      = "LONGEST:";
                lblFastest.TextRight = levelInfo.LongestFinish.HasValue ? $"{levelInfo.LongestFinish:m\\:ss\\.ff}" : "-";
                break;

            case 1:
                lblFastest.Text      = "FASTEST:";
                lblFastest.TextRight = levelInfo.BestFinish.HasValue ? $"{levelInfo.BestFinish:m\\:ss\\.ff}" : "-";
                break;

            case 2:
                lblFastest.Text      = "HIGH SCORE:";
                lblFastest.TextRight = levelInfo.BestScore.Value.ToString();
                break;
            }
        }