Ejemplo n.º 1
0
        /// <summary>
        /// Commits all pending changes to the Page to OneNote.
        /// </summary>
        public void Commit()
        {
            if (!CommitPending)
            {
                return;
            }

            SimpleImporter importer = new SimpleImporter();

            importer.Import(this.ToString());

            // Remove all deleted objects:
            foreach (PageObject pageObject in this)
            {
                if (pageObject.DeletePending)
                {
                    RemoveChild(pageObject);
                    pageObject.DeletePending = false;
                }
            }

            committed     = true;
            CommitPending = false;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Navigates to this page in OneNote.
        /// </summary>
        public void NavigateTo()
        {
            SimpleImporter importer = new SimpleImporter();

            importer.NavigateToPage(sectionPath, id.ToString());
        }