Ejemplo n.º 1
0
        void CopyHtml(DataObject dataObj, List <HexLine> lines)
        {
            var writer = new HtmlClipboardFormatWriter();

            var cssWriter = new StringBuilder();

            foreach (var line in lines)
            {
                foreach (var part in line.LineParts)
                {
                    Write(writer, line.Text, part, cssWriter);
                }
                writer.WriteBr();
            }

            dataObj.SetData(DataFormats.Html, writer.ToString());
        }
Ejemplo n.º 2
0
 void Write(HtmlClipboardFormatWriter writer, string line, HexLinePart part, StringBuilder cssWriter)
 {
     WriteCss(cssWriter, part);
     writer.WriteSpan(cssWriter.ToString(), line.Substring(part.Offset, part.Length));
 }
Ejemplo n.º 3
0
        void CopyHtml(DataObject dataObj, List<HexLine> lines)
        {
            var writer = new HtmlClipboardFormatWriter();

            var cssWriter = new StringBuilder();
            foreach (var line in lines) {
                foreach (var part in line.LineParts)
                    Write(writer, line.Text, part, cssWriter);
                writer.WriteBr();
            }

            dataObj.SetData(DataFormats.Html, writer.ToString());
        }
Ejemplo n.º 4
0
 void Write(HtmlClipboardFormatWriter writer, string line, HexLinePart part, StringBuilder cssWriter)
 {
     WriteCss(cssWriter, part);
     writer.WriteSpan(cssWriter.ToString(), line.Substring(part.Offset, part.Length));
 }