C# 클래스 Kajabity.Tools.Forms.SDIForm

Description of SDIForm.
상속: System.Windows.Forms.Form
파일 보기 프로젝트 열기: Kajabity/Kajabity-Tools

보호된 프로퍼티들

프로퍼티 타입 설명
backup bool
manager DocumentManager

공개 메소드들

메소드 설명
DocumentChanged ( ) : void

Called whenever a document is created or loaded (or closed). Override to provide specific Forms handling when the document is changed.

FileCloseClick ( object sender, EventArgs e ) : void

A handler for the File->Close command. Closes any currently open document (prompting the user to save it if modified). Call this method your form's 'OnClick()' handler.

FileExitClick ( object sender, EventArgs e ) : void

A handler for the File->Exit command. Exits the application, closing any currently open document (prompting the user to save it if modified). Call this method your form's 'OnClick()' handler.

FileNewClick ( object sender, System e ) : void

A handler for the File->New command. Closes any currently open document (prompting the user to save it if modified). Creates a new instance of the managed document type. Call this method your form's 'OnClick()' handler.

FileOpenClick ( object sender, System e ) : void

A handler for the File->Open command. Uses the OpenFileDialog to select and open a file. Closes any currently open document (prompting the user to save it if modified). Call this method your form's 'OnClick()' handler.

FileSaveAsClick ( object sender, EventArgs e ) : void

A handler for the File->Save As command. Prompts the user for a filename and path and saves the document to it. Call this method your form's 'OnClick()' handler.

FileSaveClick ( object sender, EventArgs e ) : void

A handler for the File->Save command. Saves the currently open document - prompting for a filename if it is a new document. Call this method your form's 'OnClick()' handler.

SDIForm ( ) : System

Default constructor - required to enable the Visual Editor for Forms in Visual Studio to work.

SDIForm ( DocumentManager manager ) : System

Construct an SDIForm providing an instance of a document manager.

보호된 메소드들

메소드 설명
canCloseDocument ( object sender, System e ) : bool

A "helper" menu action to try to close the currently loaded file if there is one. The method will display a prompt to the user to save the file if modified.

loadDocument ( string filename ) : void

Helper to load a document - triggers DocumentChanged().

비공개 메소드들

메소드 설명
SDIForm_Load ( object sender, System e ) : void
closeDocument ( ) : void

Helper to close any currently open document - triggers DocumentChanged().

newDocument ( ) : void

Helper to create a new document - triggers DocumentChanged().

saveDocument ( string filename ) : void

Helper to save a document - triggers DocumentChanged().

메소드 상세

DocumentChanged() 공개 메소드

Called whenever a document is created or loaded (or closed). Override to provide specific Forms handling when the document is changed.
public DocumentChanged ( ) : void
리턴 void

FileCloseClick() 공개 메소드

A handler for the File->Close command. Closes any currently open document (prompting the user to save it if modified). Call this method your form's 'OnClick()' handler.
public FileCloseClick ( object sender, EventArgs e ) : void
sender object the object that sent the event - e.g. menu item or tool bar button.
e System.EventArgs Any additional arguments to the event.
리턴 void

FileExitClick() 공개 메소드

A handler for the File->Exit command. Exits the application, closing any currently open document (prompting the user to save it if modified). Call this method your form's 'OnClick()' handler.
public FileExitClick ( object sender, EventArgs e ) : void
sender object the object that sent the event - e.g. menu item or tool bar button.
e System.EventArgs Any additional arguments to the event.
리턴 void

FileNewClick() 공개 메소드

A handler for the File->New command. Closes any currently open document (prompting the user to save it if modified). Creates a new instance of the managed document type. Call this method your form's 'OnClick()' handler.
public FileNewClick ( object sender, System e ) : void
sender object the object that sent the event - e.g. menu item or tool bar button.
e System Any additional arguments to the event.
리턴 void

FileOpenClick() 공개 메소드

A handler for the File->Open command. Uses the OpenFileDialog to select and open a file. Closes any currently open document (prompting the user to save it if modified). Call this method your form's 'OnClick()' handler.
public FileOpenClick ( object sender, System e ) : void
sender object the object that sent the event - e.g. menu item or tool bar button.
e System Any additional arguments to the event.
리턴 void

FileSaveAsClick() 공개 메소드

A handler for the File->Save As command. Prompts the user for a filename and path and saves the document to it. Call this method your form's 'OnClick()' handler.
public FileSaveAsClick ( object sender, EventArgs e ) : void
sender object the object that sent the event - e.g. menu item or tool bar button.
e System.EventArgs Any additional arguments to the event.
리턴 void

FileSaveClick() 공개 메소드

A handler for the File->Save command. Saves the currently open document - prompting for a filename if it is a new document. Call this method your form's 'OnClick()' handler.
public FileSaveClick ( object sender, EventArgs e ) : void
sender object the object that sent the event - e.g. menu item or tool bar button.
e System.EventArgs Any additional arguments to the event.
리턴 void

SDIForm() 공개 메소드

Default constructor - required to enable the Visual Editor for Forms in Visual Studio to work.
public SDIForm ( ) : System
리턴 System

SDIForm() 공개 메소드

Construct an SDIForm providing an instance of a document manager.
public SDIForm ( DocumentManager manager ) : System
manager DocumentManager the DocumentManager to be used by this form.
리턴 System

canCloseDocument() 보호된 메소드

A "helper" menu action to try to close the currently loaded file if there is one. The method will display a prompt to the user to save the file if modified.
protected canCloseDocument ( object sender, System e ) : bool
sender object the object that sent the event - e.g. menu item or tool bar button.
e System Any additional arguments to the event.
리턴 bool

loadDocument() 보호된 메소드

Helper to load a document - triggers DocumentChanged().
protected loadDocument ( string filename ) : void
filename string
리턴 void

프로퍼티 상세

backup 보호되어 있는 프로퍼티

If true, when saving a document any existing file with the same name will be renamed with a trailing '~' character as a backup. Any previous backup (i.e. with the same backup filename) will be deleted.
protected bool backup
리턴 bool

manager 보호되어 있는 프로퍼티

A reference to an instance of the DocumentManager used to load and save documents for the application.
protected DocumentManager,Kajabity.Tools.Forms manager
리턴 DocumentManager