예제 #1
0
        public static int GetFontColorIndex(FontColor c)
        {
            AvailableColors brushList  = new AvailableColors();
            int             idx        = 0;
            SolidColorBrush colorBrush = c.Brush;

            foreach (FontColor brush in brushList)
            {
                if (brush.Brush.Color.Equals(colorBrush.Color))
                {
                    break;
                }

                idx++;
            }

            return(idx);
        }
예제 #2
0
 public static FontColor GetFontColor(Color c)
 {
     return(AvailableColors.GetFontColor(new SolidColorBrush(c)));
 }
예제 #3
0
        public static FontColor GetFontColor(SolidColorBrush b)
        {
            AvailableColors brushList = new AvailableColors();

            return(brushList.GetFontColorByBrush(b));
        }
예제 #4
0
        public static FontColor GetFontColor(string name)
        {
            AvailableColors brushList = new AvailableColors();

            return(brushList.GetFontColorByName(name));
        }
예제 #5
0
 public ColorComboBox()
 {
     this.selectedFontColor = AvailableColors.GetFontColor(Colors.Black);
     this.fontColorList     = new ReadOnlyCollection <FontColor>(new AvailableColors());
 }