C# 클래스 SIL.FieldWorks.Common.Controls.Persistence

상속: System.ComponentModel.Component, ISupportInitialize, IFWDisposable
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

Private Properties

프로퍼티 타입 설명
OnLoadSettings void
OnMoveResize void
OnSaveSettings void
SaveWindowState void

공개 메소드들

메소드 설명
BeginInit ( ) : void

Required to implement ISupportInitialize.

CheckDisposed ( ) : void

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.

DeserializeFromBinary ( Stream stream ) : Object

Deserializes an object from binary.

EndInit ( ) : void

When all properties have been initialized, this will be called. This is where we can load the window state.

LoadWindowPosition ( ) : void

Load the top, left, width, and height of the window from the registry, use default application parameters if not present in registry. This should be called from OnLayout; it takes effect in the first call AFTER EndInit.

Persistence ( ) : System

Initializes a new instance of the Persistence class

Persistence ( Control parent, Settings loadFunct, Settings saveFunct ) : System

Initializes a new instance of the Persistence class

Persistence ( System container ) : System

Initializes a new instance of the Persistence class

Persistence ( System container, Control parent ) : System

Initializes a new instance of the Persistence class

SaveSettingsNow ( Control ctrl ) : void

Initiate saving all the settings for the specified control, and for all of the control's owned controls which implement ISettings.

Note: A parent's ISettings::SaveSettingsNow should call this method (Persistence::SaveSettingsNow).

SaveWindowPosition ( RegistryKey key ) : void

Save the top, left, width, and height of the window to the registry.

SerializeToBinary ( object obj ) : MemoryStream

Serializes to binary an object.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases the resources used by Persistence

비공개 메소드들

메소드 설명
OnLoadSettings ( object obj, System e ) : void

Tasks needing to be done when Window is being created: Load window position. Load settings.

OnMoveResize ( object sender, System e ) : void
OnSaveSettings ( object obj, System e ) : void

Tasks needing to be done when Window is being closed: Save window position. Save window state. Save settings.

SaveWindowState ( RegistryKey key ) : void

메소드 상세

BeginInit() 공개 메소드

Required to implement ISupportInitialize.
public BeginInit ( ) : void
리턴 void

CheckDisposed() 공개 메소드

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.
public CheckDisposed ( ) : void
리턴 void

DeserializeFromBinary() 공개 정적인 메소드

Deserializes an object from binary.
public static DeserializeFromBinary ( Stream stream ) : Object
stream Stream The stream from which to deserialize
리턴 Object

Dispose() 보호된 메소드

Releases the resources used by Persistence
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

EndInit() 공개 메소드

When all properties have been initialized, this will be called. This is where we can load the window state.
public EndInit ( ) : void
리턴 void

LoadWindowPosition() 공개 메소드

Load the top, left, width, and height of the window from the registry, use default application parameters if not present in registry. This should be called from OnLayout; it takes effect in the first call AFTER EndInit.
public LoadWindowPosition ( ) : void
리턴 void

Persistence() 공개 메소드

Initializes a new instance of the Persistence class
public Persistence ( ) : System
리턴 System

Persistence() 공개 메소드

Initializes a new instance of the Persistence class
public Persistence ( Control parent, Settings loadFunct, Settings saveFunct ) : System
parent System.Windows.Forms.Control
loadFunct Settings
saveFunct Settings
리턴 System

Persistence() 공개 메소드

Initializes a new instance of the Persistence class
public Persistence ( System container ) : System
container System
리턴 System

Persistence() 공개 메소드

Initializes a new instance of the Persistence class
public Persistence ( System container, Control parent ) : System
container System
parent System.Windows.Forms.Control
리턴 System

SaveSettingsNow() 공개 메소드

Initiate saving all the settings for the specified control, and for all of the control's owned controls which implement ISettings.
Note: A parent's ISettings::SaveSettingsNow should call this method (Persistence::SaveSettingsNow).
public SaveSettingsNow ( Control ctrl ) : void
ctrl System.Windows.Forms.Control Control or form whose settings should be saved.
리턴 void

SaveWindowPosition() 공개 메소드

Save the top, left, width, and height of the window to the registry.
public SaveWindowPosition ( RegistryKey key ) : void
key Microsoft.Win32.RegistryKey The Registry Key.
리턴 void

SerializeToBinary() 공개 정적인 메소드

Serializes to binary an object.
public static SerializeToBinary ( object obj ) : MemoryStream
obj object The object to be serialized.
리턴 System.IO.MemoryStream