C# Класс Kajabity.Tools.Forms.SDIForm

Description of SDIForm.
Наследование: System.Windows.Forms.Form
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
backup bool
manager DocumentManager

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

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

Called whenever a document is created or loaded (or closed). Override to provide specific Forms handling when the document is changed.

FileCloseClick ( object sender, EventArgs e ) : void

A handler for the File->Close command. Closes any currently open document (prompting the user to save it if modified). Call this method your form's 'OnClick()' handler.

FileExitClick ( object sender, EventArgs e ) : void

A handler for the File->Exit command. Exits the application, closing any currently open document (prompting the user to save it if modified). Call this method your form's 'OnClick()' handler.

FileNewClick ( object sender, System e ) : void

A handler for the File->New command. Closes any currently open document (prompting the user to save it if modified). Creates a new instance of the managed document type. Call this method your form's 'OnClick()' handler.

FileOpenClick ( object sender, System e ) : void

A handler for the File->Open command. Uses the OpenFileDialog to select and open a file. Closes any currently open document (prompting the user to save it if modified). Call this method your form's 'OnClick()' handler.

FileSaveAsClick ( object sender, EventArgs e ) : void

A handler for the File->Save As command. Prompts the user for a filename and path and saves the document to it. Call this method your form's 'OnClick()' handler.

FileSaveClick ( object sender, EventArgs e ) : void

A handler for the File->Save command. Saves the currently open document - prompting for a filename if it is a new document. Call this method your form's 'OnClick()' handler.

SDIForm ( ) : System

Default constructor - required to enable the Visual Editor for Forms in Visual Studio to work.

SDIForm ( DocumentManager manager ) : System

Construct an SDIForm providing an instance of a document manager.

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

Метод Описание
canCloseDocument ( object sender, System e ) : bool

A "helper" menu action to try to close the currently loaded file if there is one. The method will display a prompt to the user to save the file if modified.

loadDocument ( string filename ) : void

Helper to load a document - triggers DocumentChanged().

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

Метод Описание
SDIForm_Load ( object sender, System e ) : void
closeDocument ( ) : void

Helper to close any currently open document - triggers DocumentChanged().

newDocument ( ) : void

Helper to create a new document - triggers DocumentChanged().

saveDocument ( string filename ) : void

Helper to save a document - triggers DocumentChanged().

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

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

Called whenever a document is created or loaded (or closed). Override to provide specific Forms handling when the document is changed.
public DocumentChanged ( ) : void
Результат void

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

A handler for the File->Close command. Closes any currently open document (prompting the user to save it if modified). Call this method your form's 'OnClick()' handler.
public FileCloseClick ( object sender, EventArgs e ) : void
sender object the object that sent the event - e.g. menu item or tool bar button.
e System.EventArgs Any additional arguments to the event.
Результат void

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

A handler for the File->Exit command. Exits the application, closing any currently open document (prompting the user to save it if modified). Call this method your form's 'OnClick()' handler.
public FileExitClick ( object sender, EventArgs e ) : void
sender object the object that sent the event - e.g. menu item or tool bar button.
e System.EventArgs Any additional arguments to the event.
Результат void

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

A handler for the File->New command. Closes any currently open document (prompting the user to save it if modified). Creates a new instance of the managed document type. Call this method your form's 'OnClick()' handler.
public FileNewClick ( object sender, System e ) : void
sender object the object that sent the event - e.g. menu item or tool bar button.
e System Any additional arguments to the event.
Результат void

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

A handler for the File->Open command. Uses the OpenFileDialog to select and open a file. Closes any currently open document (prompting the user to save it if modified). Call this method your form's 'OnClick()' handler.
public FileOpenClick ( object sender, System e ) : void
sender object the object that sent the event - e.g. menu item or tool bar button.
e System Any additional arguments to the event.
Результат void

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

A handler for the File->Save As command. Prompts the user for a filename and path and saves the document to it. Call this method your form's 'OnClick()' handler.
public FileSaveAsClick ( object sender, EventArgs e ) : void
sender object the object that sent the event - e.g. menu item or tool bar button.
e System.EventArgs Any additional arguments to the event.
Результат void

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

A handler for the File->Save command. Saves the currently open document - prompting for a filename if it is a new document. Call this method your form's 'OnClick()' handler.
public FileSaveClick ( object sender, EventArgs e ) : void
sender object the object that sent the event - e.g. menu item or tool bar button.
e System.EventArgs Any additional arguments to the event.
Результат void

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

Default constructor - required to enable the Visual Editor for Forms in Visual Studio to work.
public SDIForm ( ) : System
Результат System

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

Construct an SDIForm providing an instance of a document manager.
public SDIForm ( DocumentManager manager ) : System
manager DocumentManager the DocumentManager to be used by this form.
Результат System

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

A "helper" menu action to try to close the currently loaded file if there is one. The method will display a prompt to the user to save the file if modified.
protected canCloseDocument ( object sender, System e ) : bool
sender object the object that sent the event - e.g. menu item or tool bar button.
e System Any additional arguments to the event.
Результат bool

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

Helper to load a document - triggers DocumentChanged().
protected loadDocument ( string filename ) : void
filename string
Результат void

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

backup защищенное свойство

If true, when saving a document any existing file with the same name will be renamed with a trailing '~' character as a backup. Any previous backup (i.e. with the same backup filename) will be deleted.
protected bool backup
Результат bool

manager защищенное свойство

A reference to an instance of the DocumentManager used to load and save documents for the application.
protected DocumentManager,Kajabity.Tools.Forms manager
Результат DocumentManager