Esempio n. 1
0
        private static string GetColorCode2Digits(IrcFormatText.Color color)
        {
            string s = GetColorCodeInt(color).ToString(); while (s.Length < 2)

            {
                s = "0" + s;
            }
            return(s);
        }
Esempio n. 2
0
 public static string ColorText(this string text, IrcFormatText.Color fg, IrcFormatText.Color bg = IrcFormatText.Color.Reset)
 {
     return
         (IrcFormatText.StyleChar[IrcFormatText.GetStyleCodeInt(IrcFormatText.Style.Color)]
          + GetColorCode2Digits(fg)
          + ((bg != IrcFormatText.Color.Reset)
            ? "," + GetColorCode2Digits(bg)
             : ""
             )
          + text.TrimEnd()
          + IrcFormatText.StyleChar[IrcFormatText.GetStyleCodeInt(IrcFormatText.Style.Color)]
         );
 }
Esempio n. 3
0
 private static string GetColorCodeName(IrcFormatText.Color color)
 {
     return(color.ToString());
 }
Esempio n. 4
0
 private static int GetColorCodeInt(IrcFormatText.Color color)
 {
     return((int)color);
 }