C# 클래스 XWord.AddinActions

Provides implementations for the common addin actions. This class should contain most VSTO specific code.
파일 보기 프로젝트 열기: xwiki-contrib/xwiki-office 1 사용 예제들

공개 메소드들

메소드 설명
AddNewPage ( String space, String pageName ) : void

Starts editing a new wiki page. The page will not be created in the wiki until the fisrt save.

AddNewPage ( String spaceName, String pageName, String pageTitle, Form sender ) : void

Starts editing a new wiki page. The page will not be created in the wiki until the fisrt save.

AddinActions ( XWikiAddIn addin ) : System

Creates an instance for this class.

AttachCurrentFile ( String pageFullName ) : bool

Saves the document and attaches it to a wiki page

AttachCurrentFile ( String space, String page ) : bool

Saves the document and attaches it to a wiki page

CheckForErrors ( string content ) : bool

Searches the server response for error strings.

ConvertToNormalFolder ( string folder ) : void

Converts the folder to a "Normal" type folder.

DownloadAttachment ( String pageFullName, String attachmentName, String path ) : FileInfo

Downloads the file to a local folder. The folder is located in MyDocuments

EditPage ( String pageFullName ) : void

Edits a wiki page. The LoadingDialog is shown during the operation. EditPage

GetActivePageName ( ) : String

Gets the fullname of the wiki page edited in the active document.

HideProtectedPages ( Wiki wiki, List wildcards ) : void

Removes all protected pages from the Word wiki structure.

IsOpened ( String pageFullName ) : bool

Specifies if a wiki page is opened for editing.

IsProtectedPage ( String pageFullName, List wildCards ) : bool

Specifies if a page is protected or not.

RefreshActiveDocument ( ) : void

Reloads the active document, if it's a wiki page.

SaveFileDialog ( String fileName ) : String

Displays a SaveFileDialog

SaveToServer ( ) : void

Saves the currently edited page or document to the server. Displays the operation in progress dialog.

ShadowCopyDocument ( Microsoft.Office.Interop.Word document, string path, Microsoft.Office.Interop.Word saveFormat ) : bool

Copies a document to a specified path.

The document is saved in Unicode little endian encoding.

StartProcess ( String fullFileName ) : void

Starts a new process. - If the file is executable then it will execute that file. - If the file file is resistered to be opened with another application then it will be opened with that application - If the file doesnt have an assigned application then Windows Explorer openes it's directory.

비공개 메소드들

메소드 설명
Application_MailMergeAfterMerge ( Microsoft Doc, Microsoft DocResult ) : void
CheckPageHistory ( String pageFullName, bool &wasModified, String &lastAuthor ) : XWiki.XmlRpc.PageHistorySummary[]

Updates the history of a page, the last author and specifies if the page was modified.

DisableGrammarAndSpellingChecking ( ) : void

Disable grammar and spelling checking.

GetPage ( Object _pageFullName ) : void

Edits a wiki page.

IndexPageHistory ( String pageFullName ) : void

Retrieves the versioning information for a wiki page, and registers it ot the history dictionary.

KeepNewWindowActivated ( Microsoft.Office.Interop.Word doc, Microsoft.Office.Interop.Word Wn ) : void

Activates the newest Word window.

MergeWithLatestVersion ( String pageFullName ) : bool

If the document was modified externally, prompts the user with the document merge screen.

OpenForMerge ( String pageFullName, String &localFileName ) : void

Retrieves a page from the wiki and save it locally in order to be merged to the active document.

OpenHTMLDocument ( String path ) : Microsoft.Office.Interop.Word.Document

Opens a local(document) file with Word.

ReportSaveProblem ( ) : void
RestoreGrammarAndSpellingSettings ( ) : void

Restore user settings for grammar and spelling checking.

SaveGrammarAndSpellingSettings ( ) : void

Save user settings for grammar and spelling checking.

SavePage ( String pageName, String &pageContent, String syntax ) : bool

Saves the page to the wiki. Shows a message box with an error if the operation fails.

SaveToXwiki ( ) : void

Saves the currently edited page or document to the server.

메소드 상세

AddNewPage() 공개 메소드

Starts editing a new wiki page. The page will not be created in the wiki until the fisrt save.
public AddNewPage ( String space, String pageName ) : void
space String The name of the wiki space
pageName String The name of page
리턴 void

AddNewPage() 공개 메소드

Starts editing a new wiki page. The page will not be created in the wiki until the fisrt save.
public AddNewPage ( String spaceName, String pageName, String pageTitle, Form sender ) : void
spaceName String The name of the wiki space.
pageName String The name of page.
pageTitle String The title of the page.
sender System.Windows.Forms.Form /// The instance of the fprm that started the action. /// This form need to be closed before swithing the Active Word Document. ///
리턴 void

AddinActions() 공개 메소드

Creates an instance for this class.
public AddinActions ( XWikiAddIn addin ) : System
addin XWikiAddIn The instance of the current add-in.
리턴 System

AttachCurrentFile() 공개 메소드

Saves the document and attaches it to a wiki page
public AttachCurrentFile ( String pageFullName ) : bool
pageFullName String The full name of the wiki page.
리턴 bool

AttachCurrentFile() 공개 메소드

Saves the document and attaches it to a wiki page
public AttachCurrentFile ( String space, String page ) : bool
space String The name of the wiki space.
page String The name of the page.
리턴 bool

CheckForErrors() 공개 메소드

Searches the server response for error strings.
public CheckForErrors ( string content ) : bool
content string The server response.
리턴 bool

ConvertToNormalFolder() 공개 메소드

Converts the folder to a "Normal" type folder.
public ConvertToNormalFolder ( string folder ) : void
folder string
리턴 void

DownloadAttachment() 공개 메소드

Downloads the file to a local folder. The folder is located in MyDocuments
public DownloadAttachment ( String pageFullName, String attachmentName, String path ) : FileInfo
pageFullName String FullName of the wiki page - Space.Name
attachmentName String Name of the attached file
path String The location where the attachment will be downloaded. Use null for default location.
리턴 System.IO.FileInfo

EditPage() 공개 메소드

Edits a wiki page. The LoadingDialog is shown during the operation. EditPage
public EditPage ( String pageFullName ) : void
pageFullName String The full name of the wiki page that is being opened for editing.
리턴 void

GetActivePageName() 공개 메소드

Gets the fullname of the wiki page edited in the active document.
public GetActivePageName ( ) : String
리턴 String

HideProtectedPages() 공개 메소드

Removes all protected pages from the Word wiki structure.
public HideProtectedPages ( Wiki wiki, List wildcards ) : void
wiki XWiki.Model.Wiki The wiki instance.
wildcards List The list of protected pages wildcards.
리턴 void

IsOpened() 공개 메소드

Specifies if a wiki page is opened for editing.
public IsOpened ( String pageFullName ) : bool
pageFullName String The full name of the page.
리턴 bool

IsProtectedPage() 공개 메소드

Specifies if a page is protected or not.
public IsProtectedPage ( String pageFullName, List wildCards ) : bool
pageFullName String The full name of the page.
wildCards List The wildcard list of protected pages.
리턴 bool

RefreshActiveDocument() 공개 메소드

Reloads the active document, if it's a wiki page.
public RefreshActiveDocument ( ) : void
리턴 void

SaveFileDialog() 공개 메소드

Displays a SaveFileDialog
public SaveFileDialog ( String fileName ) : String
fileName String Optional name of file to be saved.
리턴 String

SaveToServer() 공개 메소드

Saves the currently edited page or document to the server. Displays the operation in progress dialog.
public SaveToServer ( ) : void
리턴 void

ShadowCopyDocument() 공개 메소드

Copies a document to a specified path.
The document is saved in Unicode little endian encoding.
When the file cannot be saved.
public ShadowCopyDocument ( Microsoft.Office.Interop.Word document, string path, Microsoft.Office.Interop.Word saveFormat ) : bool
document Microsoft.Office.Interop.Word The Document instance.
path string The path where the new file will be saved.
saveFormat Microsoft.Office.Interop.Word The save format.
리턴 bool

StartProcess() 공개 메소드

Starts a new process. - If the file is executable then it will execute that file. - If the file file is resistered to be opened with another application then it will be opened with that application - If the file doesnt have an assigned application then Windows Explorer openes it's directory.
public StartProcess ( String fullFileName ) : void
fullFileName String The full path and name of the file.
리턴 void