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

A base class to manage the lifecycle of a Document by creating new, empty documents, Opening existing documents, tracking the modification state of documents and Saving documents. Extend this class to implement methods to handle specific document types.
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
document Document

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

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

Close any currently open document - setting state appropriately. Override this method to perform any necessary cleanup (releasing resources, etc.) for the Document instance then call this base class (base.Close();).

DocumentManager ( ) : System

Construct an empty DocumentManager instance.

Load ( string filename ) : void

Performs base class setup of loaded filename and status. Override to load a file into a Document instance then call this base class once document set (base.Load(filename);).

NewDocument ( ) : void

Performs base initialisation of the document name and status of a new document. Override this method to provide initialisation for specific Document types then call this base class once document set (base.NewDocument();).

Save ( string filename ) : void

Performs base class setup of Saved filename and status. Override to save a file from a Document instance then call this base class (base.Save(filename);).

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

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

Close any currently open document - setting state appropriately. Override this method to perform any necessary cleanup (releasing resources, etc.) for the Document instance then call this base class (base.Close();).
public Close ( ) : void
Результат void

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

Construct an empty DocumentManager instance.
public DocumentManager ( ) : System
Результат System

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

Performs base class setup of loaded filename and status. Override to load a file into a Document instance then call this base class once document set (base.Load(filename);).
public Load ( string filename ) : void
filename string filename and path loaded
Результат void

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

Performs base initialisation of the document name and status of a new document. Override this method to provide initialisation for specific Document types then call this base class once document set (base.NewDocument();).
public NewDocument ( ) : void
Результат void

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

Performs base class setup of Saved filename and status. Override to save a file from a Document instance then call this base class (base.Save(filename);).
public Save ( string filename ) : void
filename string filename and path to save to
Результат void

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

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

Holds a reference to the currently loaded document - or null if none loaded.
protected Document,Kajabity.Tools.Forms document
Результат Document