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
파일 보기 프로젝트 열기: nhmkdev/cardmaker

보호된 프로퍼티들

프로퍼티 타입 설명
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