IGLib
1.7.2
The IGLib base library for development of numerical, technical and business applications.
|
Stores properties of a specified control, and restores them to on arbitrary controls. More...
Public Member Functions | |
ControlPropertyStore (Control c, bool saveProperties=true) | |
Constructs a new storege object for control properties, and innitializes it with the specified control. More... | |
void | SetControl (Control control, bool saveProperties=true) |
Sets the control that is taken care of by this object, and immediately saves its main properties if this is specified by the saveProperties parameter. More... | |
virtual void | SaveProperties (Control c=null) |
Saves all main properties of the specified control. More... | |
virtual void | restoreProperties (Control c=null) |
Restores all main properties of the specified control. More... | |
virtual void | SaveAppearance (Control c=null) |
Saves main appearance related properties of the specified control. More... | |
virtual void | RestoreAppearance (Control c=null) |
Restores main appearance related properties of the specified control. More... | |
void | SavePosition (Control c=null) |
Saves main position related properties on the specified control (to the values stored in the current object). More... | |
void | RestorePosition (Control c=null) |
Restores main position related properties on the specified control (to the values stored in the current object). More... | |
Protected Member Functions | |
ControlPropertyStore () | |
Properties | |
Control | Control [get, set] |
Control that is manipulated. More... | |
Color | BackColor [get, set] |
Color | ForeColor [get, set] |
Font | Font [get, set] |
string | Text [get, set] |
Private Attributes | |
Control | _control |
Stores properties of a specified control, and restores them to on arbitrary controls.
Can be used to copy properties from one to several controls, or to temporary store control properties for some manipulation that is performed on controls (such as blinking of control background, temporary moving and size changes).
This class operates in two main modes.
In the first mode, desired properties of the control are stored (i.e., partial snapshot of the specified control state is made), and are later restored to either the same control or to any number of specified controls.
In the second mode, the control reference is stored in the class, and the class is then used for saving and restoring properties of this particular control. Mixted modes are also possible.
|
inline |
Constructs a new storege object for control properties, and innitializes it with the specified control.
Contol's main properties are saved immediately, if not specified differently by the saveProperties parameter.
c | Control whose properties are handled. If not null then properties are saved. |
saveProperties | Specifies whetherr control's properties are stored immediately. Default is true. |
|
inlineprotected |
References IG.Forms.UtilForms.DefaultFont.
|
inline |
Sets the control that is taken care of by this object, and immediately saves its main properties if this is specified by the saveProperties parameter.
control | Sontrol that is taken are of by this class. |
saveProperties | Indicates whether control's properties should also be saved immediately. |
|
inlinevirtual |
Saves all main properties of the specified control.
c | Control. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown. |
Referenced by IG.Forms.ControlManipulator.RestoreProperties(), and IG.Forms.ControlManipulator.SaveProperties().
|
inlinevirtual |
Restores all main properties of the specified control.
c | Control. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown. |
|
inlinevirtual |
Saves main appearance related properties of the specified control.
c | Control. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown. |
|
inlinevirtual |
Restores main appearance related properties of the specified control.
c | Control. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown. |
|
inline |
Saves main position related properties on the specified control (to the values stored in the current object).
c | Control. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown. |
|
inline |
Restores main position related properties on the specified control (to the values stored in the current object).
c | Control. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown. |
|
private |
|
getset |
Control that is manipulated.
Setter also saves control's properties immediately.
Referenced by IG.Forms.ControlManipulator.ApplyNormalColor().
|
getset |
Referenced by IG.Forms.ControlManipulator.ApplyNormalColor().
|
getset |
|
getset |
|
getset |