Exemplo n.º 1
0
        private Document OpenDocument(DotaDataObject ddo)
        {
            Document doc = DocumentRegistry.GetDocumentFor(ddo);

            if (doc == null)
            {
                //If we don't have this document open, create it and add it to the registry
                doc = new DotaObjectDocument(ddo);
                DocumentRegistry.OpenDocument(ddo, doc);
            }

            return(doc);
        }
Exemplo n.º 2
0
        private void OpenTextEditor(DotaDataObject ddo)
        {
            Document doc = DocumentRegistry.GetDocumentFor(ddo);

            if (doc == null)
            {
                //If we don't have this document open, create it and add it to the registry
                doc = new DotaObjectDocument(ddo);
                DocumentRegistry.OpenDocument(ddo, doc);
            }

            (doc as DotaObjectDocument).OpenTextEditor();
        }