示例#1
0
 public ColorGarland(int garlandLength) : base(garlandLength)
 {
     for (int i = 1; i <= numberOfColors; i++)
     {
         ColorMy color = (ColorMy)i;
         for (int j = i - 1; j < garlandLength; j = j + numberOfColors)
         {
             _garland[j] = new ColorLamp(j, color.ToString());
         }
     }
 }
示例#2
0
 public static void ColorAreaAfterUnblocking(Control set)
 {
     foreach (Control kolorOdblokowania in set.Controls)
     {
         if (kolorOdblokowania is RichTextBox)
         {
             ((RichTextBox)kolorOdblokowania).BackColor = ColorMy.CreateBright();
         }
     }
     foreach (Control kolorOdblokowania in set.Controls)
     {
         if (kolorOdblokowania is TextBox)
         {
             ((TextBox)kolorOdblokowania).BackColor = ColorMy.CreateBright();
         }
     }
 }
示例#3
0
 public static void ResetColor(TextBoxBase rich, Control set, Panel panPicture)
 {
     foreach (Control c in set.Controls)
     {
         if (c is TextBoxBase)
         {
             if (c.Name == rich.Name)
             {
                 continue;
             }
             else
             {
                 ((TextBoxBase)c).BackColor = ColorMy.CreateBright();
                 ((TextBoxBase)c).ForeColor = Color.White;
             }
         }
     }
 }
示例#4
0
        public static void ColorFieldsAfterBlocking(Control set, RichTextBox name)
        {
            foreach (Control kolorOdblokowania in set.Controls)
            {
                if (kolorOdblokowania is RichTextBox)
                {
                    ((RichTextBox)kolorOdblokowania).BackColor = ColorMy.CreateBlueAtlantic();
                }
            }
            foreach (Control kolorOdblokowania in set.Controls)
            {
                if (kolorOdblokowania is TextBox)
                {
                    ((TextBox)kolorOdblokowania).BackColor = ColorMy.CreateBlueAtlantic();
                }
            }

            name.BackColor = ColorMy.CreateDeepBlue();
        }
示例#5
0
 /// <summary>
 /// Makes an item a lighter color
 /// </summary>
 /// <param name="rich"></param>
 public static void HighlightItem(this TextBoxBase rich)
 {
     rich.BackColor = ColorMy.BackgroundColorHighlighted();
 }