C# 클래스 Smrf.AppLib.SaveFileDialog2

Represents a smart SaveFileDialog that knows how to get a file name from the user and save an object to the file. Abstract.
This is an abstract base class. Each class derived from this one is responsible for saving one type of object, such as an image or an XML document. A derived class must implement GetDialogTitle(), GetFilter(), and SaveObject(). It should also implement a public method called ShowDialogAndSaveXXX(), where XXX is Image or XML, for example. ShowDialogAndSaveXXX() should call ShowDialogAndSaveObject() in this base class to do most of the work.
파일 보기 프로젝트 열기: 2014-sed-team3/term-project

보호된 프로퍼티들

프로퍼티 타입 설명
m_oSaveFileDialog System.Windows.Forms.SaveFileDialog

공개 메소드들

메소드 설명
SaveFileDialog2 ( String sInitialDirectory, String sInitialFileName ) : System

Initializes a new instance of the SaveFileDialog2 class.

보호된 메소드들

메소드 설명
GetDialogTitle ( Object oObjectBeingSaved ) : String
GetFilter ( ) : String
GetInitialFilterIndex ( ) : Int32
GetNameOfFileToSave ( ) : String
OnSaveError ( String sErrorDescription ) : void
SaveObject ( Object oObject, String sFileName ) : void
ShowDialogAndSaveObject ( Object oObject ) : DialogResult

비공개 메소드들

메소드 설명
AssertValid ( ) : void

메소드 상세

GetDialogTitle() 보호된 추상적인 메소드

protected abstract GetDialogTitle ( Object oObjectBeingSaved ) : String
oObjectBeingSaved Object
리턴 String

GetFilter() 보호된 추상적인 메소드

protected abstract GetFilter ( ) : String
리턴 String

GetInitialFilterIndex() 보호된 메소드

protected GetInitialFilterIndex ( ) : Int32
리턴 System.Int32

GetNameOfFileToSave() 보호된 메소드

protected GetNameOfFileToSave ( ) : String
리턴 String

OnSaveError() 보호된 메소드

protected OnSaveError ( String sErrorDescription ) : void
sErrorDescription String
리턴 void

SaveFileDialog2() 공개 메소드

Initializes a new instance of the SaveFileDialog2 class.
public SaveFileDialog2 ( String sInitialDirectory, String sInitialFileName ) : System
sInitialDirectory String /// Initial directory the dialog will display. Use an empty string to let /// the dialog select an initial directory. ///
sInitialFileName String /// Initial file name. Can be a complete path, a path without an /// extension, a file name, or a file name without an extension. ///
리턴 System

SaveObject() 보호된 추상적인 메소드

protected abstract SaveObject ( Object oObject, String sFileName ) : void
oObject Object
sFileName String
리턴 void

ShowDialogAndSaveObject() 보호된 메소드

protected ShowDialogAndSaveObject ( Object oObject ) : DialogResult
oObject Object
리턴 DialogResult

프로퍼티 상세

m_oSaveFileDialog 보호되어 있는 프로퍼티

protected SaveFileDialog,System.Windows.Forms m_oSaveFileDialog
리턴 System.Windows.Forms.SaveFileDialog