C# Класс Support.UI.AbstractDirtyForm

Handles Form "dirty/clean" states in relation to file loading / saving. Acts as an abstract class, but is not. (forms & abstraction break the IDE in MSVS2003) Be sure to override SaveFormData and OpenFormData
Наследование: System.Windows.Forms.Form
Показать файл Открыть проект

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

Свойство Тип Описание
m_sBaseTitle string
m_sFileOpenFilter string
m_sLoadedFile string

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

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

Marks this form as clean (save not needed)

MarkDirty ( ) : void

Marks this form as dirty (needing save)

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

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

Initializes a simple new file

InitOpen ( string sFileName ) : bool

Initializes the open process with the file specified.

InitOpen ( ) : void

Initializes the Open process via the OpenFileDialog

InitSave ( bool bForceSaveAs ) : void

Initializes the Save / Save As dialog

OpenFormData ( string sFileName ) : bool

This method should have an override that performs the load of the data from the file.

SaveFormData ( string sFileName ) : bool

This method should have an override that performs the save of the data to the file.

SaveOnClose ( CancelEventArgs eArg ) : void

Event to associate with the OnClose event of the form

SaveOnEvent ( CancelEventArgs eArg, bool bAllowCancel ) : void
SetLoadedFile ( string sFileName ) : void

Sets the currently loaded file and marks the state as clean

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

Метод Описание
GetDialogDirectory ( ) : string

Gets the current directory associated with the form

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

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

Initializes a simple new file
protected InitNew ( ) : void
Результат void

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

Initializes the open process with the file specified.
protected InitOpen ( string sFileName ) : bool
sFileName string The file to open the data from
Результат bool

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

Initializes the Open process via the OpenFileDialog
protected InitOpen ( ) : void
Результат void

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

Initializes the Save / Save As dialog
protected InitSave ( bool bForceSaveAs ) : void
bForceSaveAs bool
Результат void

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

Marks this form as clean (save not needed)
public MarkClean ( ) : void
Результат void

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

Marks this form as dirty (needing save)
public MarkDirty ( ) : void
Результат void

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

This method should have an override that performs the load of the data from the file.
protected OpenFormData ( string sFileName ) : bool
sFileName string The file to load the data from
Результат bool

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

This method should have an override that performs the save of the data to the file.
protected SaveFormData ( string sFileName ) : bool
sFileName string The file to save the data to
Результат bool

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

Event to associate with the OnClose event of the form
protected SaveOnClose ( CancelEventArgs eArg ) : void
eArg CancelEventArgs
Результат void

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

protected SaveOnEvent ( CancelEventArgs eArg, bool bAllowCancel ) : void
eArg CancelEventArgs
bAllowCancel bool
Результат void

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

Sets the currently loaded file and marks the state as clean
protected SetLoadedFile ( string sFileName ) : void
sFileName string
Результат void

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

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

protected string m_sBaseTitle
Результат string

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

protected string m_sFileOpenFilter
Результат string

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

protected string m_sLoadedFile
Результат string