Example #1
0
        private void cmdParse_Click(object sender, EventArgs e)
        {
            lblStatus.Text = "Processing";

            double fontSize = 0.0;

            double.TryParse(txtFontSize.Text, out fontSize);

            string[,] parsedData = DataParser.Parser(Clipboard.GetText(TextDataFormat.Text));
            string htmlTable = HtmlFunctions.CreateHtmlTable(parsedData,
                                                             txtTableNumber.Text,
                                                             txtTableName.Text,
                                                             txtTableNotes.Text,
                                                             cbHasColumnTitles.Checked,
                                                             cbExtraColRow.Checked,
                                                             cbHasSummaryRow.Checked,
                                                             cbRowTitles.Checked,
                                                             cbBandedRows.Checked,
                                                             fontSize,
                                                             txtTableWidth.Text);

            HtmlFragment.CopyToClipboard(htmlTable);

            tableNum++;
            txtTableNumber.Text = "Table " + tableNum;

            lblStatus.Text = "Ready";
        }
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);
            HtmlFragment h = new HtmlFragment(rawClipboardText);

            return(h);
        }