C# 클래스 OneNoteConversionTool.OutputGenerator.OneNoteGenerator

Handles the interaction with the OneNote document output, including creating notebook, section, page, adding content, and other things
파일 보기 프로젝트 열기: OneNoteDev/OneNoteConversionTool 1 사용 예제들

공개 메소드들

메소드 설명
AddImageToPage ( string pageId, Image img, int yPos = 80 ) : void

Adds an image to the page The width of the page is at most MaxPageWidth (960 pixels) If the width is bigger, the image is proportionally minimized to MaxPageWidth

AddPageContent ( string pageId, string content, int yPos = 80, int width = 520 ) : void

Adds the content to the corresponding page.

AddPageContentAsHtmlBlock ( string pageId, string content, int yPos = 80, int width = 520 ) : void

Adds the content as a HTML block.

AppendImageToPage ( string pageId, Image img ) : void

Adds the image at the end of the corresponding page

AppendPageContent ( string pageId, string content, int width = 520 ) : void

Adds the content at the end of the corresponding page.

AppendPageContentAsHtmlBlock ( string pageId, string content, int width = 520 ) : void

Adds the content as HTML block at the end of the corresponding page

CreateNotebook ( string notebookName ) : string

Creates a new OneNote notebook with the given name

CreatePage ( string pageName, string sectionId ) : string

Creates a one note page under the given section ID

CreateSection ( string sectionName, string notebookId ) : string

Creates one note section under the given notebook ID

CreateTableOfContentPage ( string sectionId, string tocPageTitle = "Table of Contents" ) : string

Generates a Table of Content Page of all the pages underneath the given section Also sets the Table of Content Page to be the first page in the given section

GetChildrenScopeHierarchy ( string objectId ) : string

Returns the children scope hierarchy of the OneNote object in XML format Gets the immediate child nodes of the start node, and no descendants in higher or lower subsection groups.

GetHyperLinkToObject ( string objectId ) : string

get the hyper link to the object

GetNotebook ( string notebookName ) : string

Gets the ID of an existing notebook in the current directory

GetPage ( string pageName, string sectionId ) : string

Gets the ID o fan existing page in the given section If more than one exists, it returns the first one

GetPageAttribute ( string pageId, string attr ) : string

Gets the value of an attribute of the page

GetPageContent ( string pageId ) : XmlDocument

GetPageContent return DOM representation of onenote's page

GetPageHeight ( string pageId ) : double

Get the height of the page

GetPageScopeHierarchy ( string objectId ) : string

Returns the page scope hierarchy of the onenote object(page\section\notebook) in XML format Gets all pages below the start node, including all pages in section groups and subsection groups.

GetPageWidth ( string pageId ) : double

Get the height of the page

GetSection ( string sectionName, string notebookId ) : string

Gets the ID of an existing section in the given notebook If more than one exists, it returns the first one

GetSectionScopeHierarchy ( string objectId ) : string

Returns the section scope hierarchy of the onenote object(section\notebook) in XML format Gets all sections below the start node, including sections in section groups and subsection groups.

OneNoteGenerator ( string mOutputDir ) : System

Constructor

RemoveAuthor ( string pageId ) : void

Removes the author from any node in the page

SetAsFirstPage ( string pageId, string sectionId ) : void

set a page as the first page in the section

SetCollapsePage ( string pageId, bool isCollapsed = true ) : void

Sets the collapse attribute of the page to hide or unhide the subpages under the given page

SetPageAttribute ( string pageId, string attr, string value ) : void

Sets the page attribute to the given value

SetPageLevel ( string pageId, int pageLevel ) : void

Sets the page level of a given page (note, page level must be {1, 2, or 3})

SetPageTitleAttribute ( string pageId, string attr, string value ) : void

Sets the page title attribute to the given value

SetShowDate ( string pageId, bool isShown = true ) : void

Sets whether the date should be shown or not in the page

SetShowTime ( string pageId, bool isShown = true ) : void

Sets whether the time should be shown or not in the page

SetSubPage ( string sectionId, string pageId, bool isSet = true ) : void

Make the page as subpage (if isSet true) or promote it (if isSet if false)

UpdatePageContent ( string pageId, string content ) : void

UpdatePageContent this method is invoked when a previous page word section needs to be updated

비공개 메소드들

메소드 설명
GetNSManager ( XmlNameTable nameTable ) : XmlNamespaceManager

Returns the namespace manager from the passed xml name table.

메소드 상세

AddImageToPage() 공개 메소드

Adds an image to the page The width of the page is at most MaxPageWidth (960 pixels) If the width is bigger, the image is proportionally minimized to MaxPageWidth
public AddImageToPage ( string pageId, Image img, int yPos = 80 ) : void
pageId string
img Image
yPos int
리턴 void

AddPageContent() 공개 메소드

Adds the content to the corresponding page.
public AddPageContent ( string pageId, string content, int yPos = 80, int width = 520 ) : void
pageId string Page Identifier in which the content to be displayed.
content string The content which needs to be added to the page.
yPos int Starting vertical position of the block in the page in Pixels from the top of the page
width int Maximum width of the outline block where the content is added
리턴 void

AddPageContentAsHtmlBlock() 공개 메소드

Adds the content as a HTML block.
public AddPageContentAsHtmlBlock ( string pageId, string content, int yPos = 80, int width = 520 ) : void
pageId string Id of the page
content string content to be added
yPos int Starting position of the block
width int Width of the block
리턴 void

AppendImageToPage() 공개 메소드

Adds the image at the end of the corresponding page
public AppendImageToPage ( string pageId, Image img ) : void
pageId string ID of the page
img Image The Image to be added
리턴 void

AppendPageContent() 공개 메소드

Adds the content at the end of the corresponding page.
public AppendPageContent ( string pageId, string content, int width = 520 ) : void
pageId string Id of the page
content string content to be added
width int Width of the block
리턴 void

AppendPageContentAsHtmlBlock() 공개 메소드

Adds the content as HTML block at the end of the corresponding page
public AppendPageContentAsHtmlBlock ( string pageId, string content, int width = 520 ) : void
pageId string ID of the page
content string HTML block to be added
width int Width of the block
리턴 void

CreateNotebook() 공개 메소드

Creates a new OneNote notebook with the given name
public CreateNotebook ( string notebookName ) : string
notebookName string
리턴 string

CreatePage() 공개 메소드

Creates a one note page under the given section ID
public CreatePage ( string pageName, string sectionId ) : string
pageName string
sectionId string
리턴 string

CreateSection() 공개 메소드

Creates one note section under the given notebook ID
public CreateSection ( string sectionName, string notebookId ) : string
sectionName string
notebookId string
리턴 string

CreateTableOfContentPage() 공개 메소드

Generates a Table of Content Page of all the pages underneath the given section Also sets the Table of Content Page to be the first page in the given section
public CreateTableOfContentPage ( string sectionId, string tocPageTitle = "Table of Contents" ) : string
sectionId string
tocPageTitle string
리턴 string

GetChildrenScopeHierarchy() 공개 메소드

Returns the children scope hierarchy of the OneNote object in XML format Gets the immediate child nodes of the start node, and no descendants in higher or lower subsection groups.
public GetChildrenScopeHierarchy ( string objectId ) : string
objectId string
리턴 string

GetHyperLinkToObject() 공개 메소드

get the hyper link to the object
public GetHyperLinkToObject ( string objectId ) : string
objectId string
리턴 string

GetNotebook() 공개 메소드

Gets the ID of an existing notebook in the current directory
public GetNotebook ( string notebookName ) : string
notebookName string name of the notebook of interest
리턴 string

GetPage() 공개 메소드

Gets the ID o fan existing page in the given section If more than one exists, it returns the first one
public GetPage ( string pageName, string sectionId ) : string
pageName string page name
sectionId string ID of the section where the page exists
리턴 string

GetPageAttribute() 공개 메소드

Gets the value of an attribute of the page
public GetPageAttribute ( string pageId, string attr ) : string
pageId string ID of the page
attr string the attribute of interest
리턴 string

GetPageContent() 공개 메소드

GetPageContent return DOM representation of onenote's page
public GetPageContent ( string pageId ) : XmlDocument
pageId string
리턴 System.Xml.XmlDocument

GetPageHeight() 공개 메소드

Get the height of the page
public GetPageHeight ( string pageId ) : double
pageId string id of the page
리턴 double

GetPageScopeHierarchy() 공개 메소드

Returns the page scope hierarchy of the onenote object(page\section\notebook) in XML format Gets all pages below the start node, including all pages in section groups and subsection groups.
public GetPageScopeHierarchy ( string objectId ) : string
objectId string
리턴 string

GetPageWidth() 공개 메소드

Get the height of the page
public GetPageWidth ( string pageId ) : double
pageId string id of the page
리턴 double

GetSection() 공개 메소드

Gets the ID of an existing section in the given notebook If more than one exists, it returns the first one
public GetSection ( string sectionName, string notebookId ) : string
sectionName string section name
notebookId string ID of the notebook where the section exists
리턴 string

GetSectionScopeHierarchy() 공개 메소드

Returns the section scope hierarchy of the onenote object(section\notebook) in XML format Gets all sections below the start node, including sections in section groups and subsection groups.
public GetSectionScopeHierarchy ( string objectId ) : string
objectId string
리턴 string

OneNoteGenerator() 공개 메소드

Constructor
public OneNoteGenerator ( string mOutputDir ) : System
mOutputDir string
리턴 System

RemoveAuthor() 공개 메소드

Removes the author from any node in the page
public RemoveAuthor ( string pageId ) : void
pageId string
리턴 void

SetAsFirstPage() 공개 메소드

set a page as the first page in the section
public SetAsFirstPage ( string pageId, string sectionId ) : void
pageId string
sectionId string
리턴 void

SetCollapsePage() 공개 메소드

Sets the collapse attribute of the page to hide or unhide the subpages under the given page
public SetCollapsePage ( string pageId, bool isCollapsed = true ) : void
pageId string ID of the page
isCollapsed bool isCollapsed attribute value
리턴 void

SetPageAttribute() 공개 메소드

Sets the page attribute to the given value
public SetPageAttribute ( string pageId, string attr, string value ) : void
pageId string ID of the page
attr string The attribute of interest
value string The new value of the attribute
리턴 void

SetPageLevel() 공개 메소드

Sets the page level of a given page (note, page level must be {1, 2, or 3})
public SetPageLevel ( string pageId, int pageLevel ) : void
pageId string
pageLevel int
리턴 void

SetPageTitleAttribute() 공개 메소드

Sets the page title attribute to the given value
public SetPageTitleAttribute ( string pageId, string attr, string value ) : void
pageId string ID of the page
attr string The attribute of interest for one:Title node
value string The new value of the attribute
리턴 void

SetShowDate() 공개 메소드

Sets whether the date should be shown or not in the page
public SetShowDate ( string pageId, bool isShown = true ) : void
pageId string
isShown bool
리턴 void

SetShowTime() 공개 메소드

Sets whether the time should be shown or not in the page
public SetShowTime ( string pageId, bool isShown = true ) : void
pageId string
isShown bool
리턴 void

SetSubPage() 공개 메소드

Make the page as subpage (if isSet true) or promote it (if isSet if false)
public SetSubPage ( string sectionId, string pageId, bool isSet = true ) : void
sectionId string
pageId string
isSet bool defaults to true, if true, increment pageLevel, else decrement pageLevel
리턴 void

UpdatePageContent() 공개 메소드

UpdatePageContent this method is invoked when a previous page word section needs to be updated
public UpdatePageContent ( string pageId, string content ) : void
pageId string
content string
리턴 void