Ejemplo n.º 1
0
        /// <summary>
        /// Open a previously created document.
        /// It also creates the correct document-instance
        /// </summary>
        /// <param name="filename"></param>
        /// <returns></returns>
        public iDocument OpenDocument(string filename)
        {
            string    type  = GetTypeFromFilename(filename);
            iDocument myDoc = CreateDocument(type);

            myDoc.Open();
            Console.WriteLine("Doc found and openend. Type: " + type);
            return(myDoc);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create new document according to the type of the document
        /// </summary>
        /// <param name="type">Type of doc to be created</param>
        /// <returns>Newly created document</returns>
        public iDocument NewDocument(string type)
        {
            iDocument myDoc = CreateDocument(type);

            myDoc.Open();

            Console.WriteLine("New doc created and openend. Type: " + type);
            return(myDoc);
        }