示例#1
0
        private static void FormatAbbreviatedName(CardFormatInfo cardFormatInfo,
            int i,
            StringBuilder sb,
            int rankIndex,
            int suitIndex)
        {
            if (i != 0)
            {
                sb.Append(cardFormatInfo.CardAbbreviationsSeparator);
            }

            sb.Append((cardFormatInfo.FormatSettings & CardFormatSettings.UseSuitFirst) == CardFormatSettings.None
                ? cardFormatInfo.GetAbbreviatedRankName(rankIndex)
                : cardFormatInfo.GetAbbreviatedSuitName(suitIndex));
            sb.Append(cardFormatInfo.CardAbbreviationPartsSeparator);
            sb.Append((cardFormatInfo.FormatSettings & CardFormatSettings.UseSuitFirst) == CardFormatSettings.None
                ? cardFormatInfo.GetAbbreviatedSuitName(suitIndex)
                : cardFormatInfo.GetAbbreviatedRankName(rankIndex));
        }
示例#2
0
        private static void FormatAbbreviatedName2(CardFormatInfo cardFormatInfo,
            int i,
            StringBuilder sb,
            char patternChar,
            int rankIndex,
            int suitIndex,
            int num1)
        {
            if (i != 0)
            {
                sb.Append(cardFormatInfo.CardAbbreviationsSeparator);
            }

            sb.Append(patternChar == 'r'
                ? cardFormatInfo.GetAbbreviatedRankName(rankIndex)
                : cardFormatInfo.GetAbbreviatedSuitName(suitIndex));

            if (num1 != 2)
            {
                return;
            }

            sb.Append(cardFormatInfo.CardAbbreviationPartsSeparator);
            sb.Append(patternChar == 'r'
                ? cardFormatInfo.GetAbbreviatedSuitName(suitIndex)
                : cardFormatInfo.GetAbbreviatedRankName(rankIndex));
        }