C# Класс DocumentExplorerExample.MainForm

The main form of the DocumentExplorer demo. DocumentExplorer allows to open documents using Aspose.Words. Once a document is opened, you can explore its object model in the tree. You can also save the document into DOC, DOCX, ODF, EPUB, PDF, SWF, RTF, WordML, HTML, MHTML and plain text formats.
Наследование: System.Windows.Forms.Form
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
StatusBar System.Windows.Forms.StatusBar
Text1 System.Windows.Forms.TextBox
Tree System.Windows.Forms.TreeView

Открытые методы

Метод Описание
MainForm ( ) : System

Ctor.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Приватные методы

Метод Описание
CollapseAll ( ) : void

Collapses all nodes under currently selected node.

ExpandAll ( ) : void

Expands all nodes under currently selected node.

FindAndApplyLicense ( ) : void

Search for Aspose.Words license in the application directory. The File.Exists check is only needed in this demo so it will work Both when the license file is missing and when it is present. In your real application you just need to call SetLicense.

InitializeComponent ( ) : void
LicenseAsposeWords ( string licenseFile ) : void

This code activates Aspose.Words license. If you don't specify a license, Aspose.Words will work in evaluation mode.

OpenDocument ( ) : void

Shows the open file dialog box and opens a document.

PrintPreview ( ) : void
Remove ( ) : void

Removes currently selected node.

RenderDocument ( ) : void
Run ( ) : void
SaveDocument ( ) : void

Saves the document with the name and format provided in standard Save As dialog.

SelectOpenFileName ( ) : string

Selects file name for a document to open or null.

SelectSaveFileName ( ) : string

Selects file name for saving currently opened document or null.

Tree_AfterSelect ( object sender, TreeViewEventArgs e ) : void

Informs Item class, which provides GUI representation of a document node, That the corresponding TreeNode was selected.

Tree_BeforeExpand ( object sender, System.Windows.Forms.TreeViewCancelEventArgs e ) : void

Informs Item class, which provides GUI representation of a document node, That the corresponding TreeNode is about being expanded.

Tree_KeyDown ( object sender, KeyEventArgs e ) : void
Tree_MouseDown ( object sender, MouseEventArgs e ) : void

Ensures that tree nodes are selected by right-click also.

menuAbout_Click ( object sender, EventArgs e ) : void
menuCollapseAll_Click ( object sender, EventArgs e ) : void
menuExit_Click ( object sender, EventArgs e ) : void
menuExpandAll_Click ( object sender, EventArgs e ) : void
menuOpen_Click ( object sender, EventArgs e ) : void
menuPreview_Click ( object sender, System e ) : void
menuRemoveNode_Click ( object sender, EventArgs e ) : void
menuRender_Click ( object sender, System e ) : void
menuSaveAs_Click ( object sender, EventArgs e ) : void
toolBar1_ButtonClick ( object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e ) : void

Описание методов

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

MainForm() публичный Метод

Ctor.
public MainForm ( ) : System
Результат System

Описание свойств

StatusBar публичное свойство

public StatusBar,System.Windows.Forms StatusBar
Результат System.Windows.Forms.StatusBar

Text1 публичное свойство

public TextBox,System.Windows.Forms Text1
Результат System.Windows.Forms.TextBox

Tree публичное свойство

public TreeView,System.Windows.Forms Tree
Результат System.Windows.Forms.TreeView