/// <summary> /// Returns color scheme part color if set otherwise returns color passed in. /// </summary> /// <param name="color">Color.</param> /// <param name="p">Color scheme part.</param> /// <returns>Color.</returns> internal Color GetColor(Color color, eColorSchemePart p) { if(p==eColorSchemePart.None) return color; ColorScheme cs=this.ColorScheme; if(cs==null) return color; return (Color)cs.GetType().GetProperty(p.ToString()).GetValue(cs,null); }
private Color GetColor(Color color, eColorSchemePart p) { if(p==eColorSchemePart.None || p==eColorSchemePart.Custom) return color; ColorScheme cs=this.GetColorScheme(); if(cs==null) return color; return (Color)cs.GetType().GetProperty(p.ToString()).GetValue(cs,null); }