/// <summary> /// Add another style (foreground color, background color, bold etc...) to the collection /// of styles that make up this highlighting theme. /// </summary> /// <param name="brushName"></param> /// <param name="widgetStyle">color and brush representation (eg.: "#FF00FFFF" etc)</param> public void AddWordStyle(string brushName, WidgetStyle widgetStyle) { if (this.mWidgetStyles == null) this.mWidgetStyles = new Dictionary<string, WidgetStyle>(); this.mWidgetStyles.Add(brushName, widgetStyle); }
/// <summary> /// Add another style (foreground color, background color, bold etc...) to the collection /// of styles that make up this highlighting theme. /// </summary> /// <param name="brushName"></param> /// <param name="widgetStyle">color and brush representation (eg.: "#FF00FFFF" etc)</param> public void AddWordStyle(string brushName, WidgetStyle widgetStyle) { if (this.mWidgetStyles == null) { this.mWidgetStyles = new Dictionary <string, WidgetStyle>(); } this.mWidgetStyles.Add(brushName, widgetStyle); }
/// <summary> /// Add a highlighting theme into the collection /// of highlighting themes stored in this object. /// </summary> /// <param name="styleName"></param> /// <param name="style"></param> public void AddWidgetStyle(string styleName, WidgetStyle style) { if (this.mGlobalStyles == null) { this.mGlobalStyles = new Dictionary <string, WidgetStyle>(); } this.mGlobalStyles.Add(styleName, style); }
/// <summary> /// Add a highlighting theme into the collection /// of highlighting themes stored in this object. /// </summary> /// <param name="styleName"></param> /// <param name="style"></param> public void AddWidgetStyle(string styleName, WidgetStyle style) { if (this.mGlobalStyles == null) this.mGlobalStyles = new Dictionary<string,WidgetStyle>(); this.mGlobalStyles.Add(styleName, style); }
internal static WidgetStyle ReadSelectionNode(XmlReader reader) { WidgetStyle ret = null; string fgColor = string.Empty; string bgColor = string.Empty; string borderColor = string.Empty; reader.ReadToNextSibling(ReadWidgetStyle.XMLName_Selection); while (reader.MoveToNextAttribute()) { switch (reader.Name) { case ReadWidgetStyle.attr_fgColor: fgColor = (reader.Value == null ? string.Empty : reader.Value); break; case ReadWidgetStyle.attr_bgColor: bgColor = (reader.Value == null ? string.Empty : reader.Value); break; case ReadWidgetStyle.attr_borderColor: borderColor = (reader.Value == null ? string.Empty : reader.Value); break; case XMLNameSpace: break; default: if (reader.Name.Trim().Length > 0 && reader.Name != XMLComment) logger.Warn("Parsing the XML child:'" + reader.Name + "' of '" + ReadLexerType.XMLName + "' is not implemented."); break; } } ret = new WidgetStyle(ReadWidgetStyle.XMLName_Selection); if (fgColor != string.Empty) ret.fgColor = ReadWidgetStyle.SetColorFromString(ReadWidgetStyle.attr_fgColor, fgColor); if (bgColor != string.Empty) ret.bgColor = ReadWidgetStyle.SetColorFromString(ReadWidgetStyle.attr_bgColor, bgColor); if (borderColor != string.Empty) ret.borderColor = ReadWidgetStyle.SetColorFromString(ReadWidgetStyle.attr_borderColor, borderColor); return ret; }