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(); } } }
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); }
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(); } }