public HexLine(ulong offset, ulong end, string text, HexLinePart[] parts, short[] originalBytes = null) { this.OriginalBytes = originalBytes; this.StartOffset = offset; this.EndOffset = end; this.Text = text; this.LineParts = parts; }
void WriteCss(StringBuilder writer, HexLinePart part) { writer.Clear(); WriteCssColor(writer, "color", part.TextRunProperties.ForegroundBrush); var tf = part.TextRunProperties.Typeface; if (tf.Weight != FontWeights.Normal) { writer.Append(string.Format("font-weight: {0}; ", tf.Weight.ToString().ToLowerInvariant())); } if (tf.Style != FontStyles.Normal) { writer.Append(string.Format("font-style: {0}; ", tf.Style.ToString().ToLowerInvariant())); } }
void Write(HtmlClipboardFormatWriter writer, string line, HexLinePart part, StringBuilder cssWriter) { WriteCss(cssWriter, part); writer.WriteSpan(cssWriter.ToString(), line.Substring(part.Offset, part.Length)); }
public HexLine(ulong offset, ulong end, string text, HexLinePart[] parts) { this.StartOffset = offset; this.EndOffset = end; this.Text = text; this.LineParts = parts; }
void WriteCss(StringBuilder writer, HexLinePart part) { writer.Clear(); WriteCssColor(writer, "color", part.TextRunProperties.ForegroundBrush); var tf = part.TextRunProperties.Typeface; if (tf.Weight != FontWeights.Normal) writer.Append(string.Format("font-weight: {0}; ", tf.Weight.ToString().ToLowerInvariant())); if (tf.Style != FontStyles.Normal) writer.Append(string.Format("font-style: {0}; ", tf.Style.ToString().ToLowerInvariant())); }