C# 클래스 Smrf.AppLib.OpenFileDialog2

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

보호된 프로퍼티들

프로퍼티 타입 설명
m_oOpenFileDialog System.Windows.Forms.OpenFileDialog

공개 메소드들

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

Initializes a new instance of the OpenFileDialog2 class.

보호된 메소드들

메소드 설명
GetDialogTitle ( ) : String
GetFilter ( ) : String
OnOpenError ( String sErrorDescription ) : void
OpenObject ( String sFileName, Object &oObject ) : void
ShowDialogAndOpenObject ( Object &oObject ) : DialogResult

비공개 메소드들

메소드 설명
AssertValid ( ) : void

메소드 상세

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

protected abstract GetDialogTitle ( ) : String
리턴 String

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

protected abstract GetFilter ( ) : String
리턴 String

OnOpenError() 보호된 메소드

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

OpenFileDialog2() 공개 메소드

Initializes a new instance of the OpenFileDialog2 class.
public OpenFileDialog2 ( 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

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

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

ShowDialogAndOpenObject() 보호된 메소드

protected ShowDialogAndOpenObject ( Object &oObject ) : DialogResult
oObject Object
리턴 DialogResult

프로퍼티 상세

m_oOpenFileDialog 보호되어 있는 프로퍼티

protected OpenFileDialog,System.Windows.Forms m_oOpenFileDialog
리턴 System.Windows.Forms.OpenFileDialog