示例#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
文件: HexLine.cs 项目: nakijun/dnSpy
		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));
		}