Пример #1
0
        void New()
        {
            HtmlEditControl.SetDocumentText("<p></p>", @"C:\", true);

            //DocumentTextHashCode = DocumentText.GetHashCode();
            //The code above does not work.
            //At this stage the document is not finalized and DocumentText does not have
            //yet it's final value ("empty text"), which is in HTML format is "\r\n<P></P>"
            DocumentTextHashCode = "\r\n<P></P>".GetHashCode();
        }
Пример #2
0
        void LoadFile(string file)
        {
            string text = File.ReadAllText(file);

            HtmlEditControl.SetDocumentText(text, Path.GetDirectoryName(file), true);
            DocumentTextHashCode = DocumentText.GetHashCode();
            DocumentFile         = file;
            Text = "ZetaPad - " + DocumentFile;
            AddToHistory(file);
        }
Пример #3
0
        private void TestForm_Shown(object sender, EventArgs e)
        {
            var configuration = new HtmlEditControlConfiguration
            {
                AllowEmbeddedImages = true,
                AllowFontChange     = true,
                AllowPrint          = true
            };

            HtmlEditControl.Configure(configuration);
            New();
        }
Пример #4
0
 private void printPreviewToolStripMenuItem_Click(object sender, EventArgs e)
 {
     HtmlEditControl.ExecutePrintPreview();
 }