Exemplo n.º 1
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);
        }
Exemplo n.º 2
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();
        }