Пример #1
0
		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;
		}
Пример #2
0
        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()));
            }
        }
Пример #3
0
 void Write(HtmlClipboardFormatWriter writer, string line, HexLinePart part, StringBuilder cssWriter)
 {
     WriteCss(cssWriter, part);
     writer.WriteSpan(cssWriter.ToString(), line.Substring(part.Offset, part.Length));
 }
Пример #4
0
		public HexLine(ulong offset, ulong end, string text, HexLinePart[] parts) {
			this.StartOffset = offset;
			this.EndOffset = end;
			this.Text = text;
			this.LineParts = parts;
		}
Пример #5
0
		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()));
		}
Пример #6
0
		void Write(HtmlClipboardFormatWriter writer, string line, HexLinePart part, StringBuilder cssWriter) {
			WriteCss(cssWriter, part);
			writer.WriteSpan(cssWriter.ToString(), line.Substring(part.Offset, part.Length));
		}