private void UpdateColors() { FlatColors colors = Helpers.GetColors(this); _ProgressColor = colors.Flat; }
private void UpdateColors() { FlatColors colors = Helpers.GetColors(this); _BaseColor = colors.Flat; }
private void UpdateColors() { FlatColors colors = Helpers.GetColors(this); }
private void UpdateColors() { FlatColors colors = Helpers.GetColors(this); _selectedColor = colors.Flat; }
private void UpdateColors() { FlatColors colors = Helpers.GetColors(this); _BaseColor = Color.FromArgb(164, 66, 244); //colors.Flat; }
private void UpdateColors() { FlatColors colors = Helpers.GetColors(this); _SelectedColor = Color.FromArgb(35, 168, 109); }
/// <summary> /// Get the colorscheme of a Control from a parent FormSkin. /// </summary> /// <param name="control">Control</param> /// <returns>Colors</returns> /// <exception cref="System.ArgumentNullException"></exception> public static FlatColors GetColors(Control control) { if (control == null) throw new ArgumentNullException(); FlatColors colors = new FlatColors(); while(control != null && (control.GetType() != typeof(FormSkin))) { control = control.Parent; } if(control != null) { FormSkin skin = (FormSkin)control; colors.Flat = skin.FlatColor; } return colors; }