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()); } } }
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(); } } }
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; } } } }
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(); }
/// <summary> /// Makes an item a lighter color /// </summary> /// <param name="rich"></param> public static void HighlightItem(this TextBoxBase rich) { rich.BackColor = ColorMy.BackgroundColorHighlighted(); }