示例#1
0
        public override void Close()
        {
            lock (this)
            {
                base.Close();

                // In embedded page, just clear page data.
                _pageData.Clear();

                DocumentPage parentPage = ParentWidget.ParentPage as DocumentPage;
                if (parentPage != null)
                {
                    parentPage.OnEmbeddedPageClosed();
                }
            }
        }
示例#2
0
        public IDocumentPage CreatePage(string pageName)
        {
            CheckOpen();

            DocumentPage page = null;

            if (_documentData.DocumentType == DocumentType.Library)
            {
                page = new CustomObjectPage(this, pageName);
            }
            else
            {
                page = new StandardPage(this, pageName);
            }

            AddPage(page);

            return(page);
        }
示例#3
0
        public void AddPage(IDocumentPage page)
        {
            if (page == null)
            {
                throw new ArgumentNullException("page");
            }

            CheckOpen();

            DocumentPage pageToAdd = page as DocumentPage;

            if (pageToAdd != null && !_documentData.Pages.Contains(pageToAdd.Guid))
            {
                _documentData.Pages.Add(pageToAdd.Guid, pageToAdd);

                pageToAdd.ParentDocument = this;

                pageToAdd.OnAddToDocument();
            }
        }