C# Class 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.
Afficher le fichier Open project: Kajabity/Kajabity-Tools Class Usage Examples

Protected Properties

Свойство Type Description
document Document

Méthodes publiques

Méthode Description
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);).

Method Details

Close() public méthode

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
Résultat void

DocumentManager() public méthode

Construct an empty DocumentManager instance.
public DocumentManager ( ) : System
Résultat System

Load() public méthode

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
Résultat void

NewDocument() public méthode

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
Résultat void

Save() public méthode

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
Résultat void

Property Details

document protected_oe property

Holds a reference to the currently loaded document - or null if none loaded.
protected Document,Kajabity.Tools.Forms document
Résultat Document