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.
Mostrar archivo Open project: Kajabity/Kajabity-Tools Class Usage Examples

Protected Properties

Property Type Description
document Document

Public Methods

Method 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 method

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
return void

DocumentManager() public method

Construct an empty DocumentManager instance.
public DocumentManager ( ) : System
return System

Load() public method

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
return void

NewDocument() public method

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
return void

Save() public method

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
return 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
return Document