private void buttonCopyAsHtml_Click(object sender, EventArgs e)
        {
            string headerHtml = string.Format("<p>Commit log from '{0}' to '{1}' ({2}):</p>", textBoxRevFrom.Text, textBoxRevTo.Text, MostRecentHint);
            string tableHtml  = CreateHtmlTable(_lastGeneratedLogLines);

            HtmlFragment.CopyToClipboard(headerHtml + tableHtml);
        }
Example #2
0
        /// <summary>
        /// Get a HTML fragment from the clipboard.
        /// </summary>
        /// <example>
        ///    string html = "<b>Hello!</b>";
        ///    HtmlFragment.CopyToClipboard(html);
        ///    HtmlFragment html2 = HtmlFragment.FromClipboard();
        ///    Debug.Assert(html2.Fragment == html);
        /// </example>
        static public HtmlFragment FromClipboard()
        {
            string rawClipboardText = Clipboard.GetText(TextDataFormat.Html);
            var    h = new HtmlFragment(rawClipboardText);

            return(h);
        }
Example #3
0
 /// <summary>
 /// Get a HTML fragment from the clipboard.
 /// </summary>    
 /// <example>
 ///    string html = "<b>Hello!</b>";
 ///    HtmlFragment.CopyToClipboard(html);
 ///    HtmlFragment html2 = HtmlFragment.FromClipboard();
 ///    Debug.Assert(html2.Fragment == html);
 /// </example>
 public static HtmlFragment FromClipboard()
 {
     string rawClipboardText = Clipboard.GetText(TextDataFormat.Html);
     var h = new HtmlFragment(rawClipboardText);
     return h;
 }