private static void WriteHeaderDivStart(IStyleSheet styleSheet, System.IO.TextWriter writer) { string foreground = string.Empty; string background = string.Empty; if (styleSheet.Styles.Contains(ColorCode.Common.ScopeName.PlainText)) { ColorCode.Styling.Style plainTextStyle = styleSheet.Styles[ColorCode.Common.ScopeName.PlainText]; foreground = plainTextStyle.Foreground; background = plainTextStyle.Background; } WriteElementStart(writer, "div", foreground, background); }
private static void BuildSpanForCapturedStyle(ColorCode.Parsing.Scope scope, IStyleSheet styleSheet, System.IO.TextWriter writer) { string foreground = string.Empty; string background = string.Empty; bool italic = false; bool bold = false; if (styleSheet.Styles.Contains(scope.Name)) { ColorCode.Styling.Style style = styleSheet.Styles[scope.Name]; foreground = style.Foreground; background = style.Background; italic = style.Italic; bold = style.Bold; } WriteElementStart(writer, "span", foreground, background, italic, bold); }