| IGLib 1.7.2 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Protected Member Functions | Properties | Private Attributes | List of all members
IG.Forms.ControlPropertyStore Class Reference

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

## Detailed Description

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.

## Constructor & Destructor Documentation

IG.Forms.ControlPropertyStore.ControlPropertyStore | ( | Control | c,
|  | bool | saveProperties = `true`
| ) |  |
| 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.

Parameters

  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.

IG.Forms.ControlPropertyStore.ControlPropertyStore | ( |  | ) |
| inline protected

References IG.Forms.UtilForms.DefaultFont.

## Member Function Documentation

void IG.Forms.ControlPropertyStore.SetControl | ( | Control | control,
|  | bool | saveProperties = `true`
| ) |  |
| 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.

Parameters

  control | Sontrol that is taken are of by this class.
  saveProperties | Indicates whether control's properties should also be saved immediately.

virtual void IG.Forms.ControlPropertyStore.SaveProperties | ( | Control | c = `null` | ) |
| inline virtual

Saves all main properties of the specified control.

Parameters

  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().

virtual void IG.Forms.ControlPropertyStore.restoreProperties | ( | Control | c = `null` | ) |
| inline virtual

Restores all main properties of the specified control.

Parameters

  c | Control. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown.

virtual void IG.Forms.ControlPropertyStore.SaveAppearance | ( | Control | c = `null` | ) |
| inline virtual

Saves main appearance related properties of the specified control.

Parameters

  c | Control. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown.

virtual void IG.Forms.ControlPropertyStore.RestoreAppearance | ( | Control | c = `null` | ) |
| inline virtual

Restores main appearance related properties of the specified control.

Parameters

  c | Control. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown.

void IG.Forms.ControlPropertyStore.SavePosition | ( | Control | c = `null` | ) |
| inline

Saves main position related properties on the specified control (to the values stored in the current object).

Parameters

  c | Control. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown.

void IG.Forms.ControlPropertyStore.RestorePosition | ( | Control | c = `null` | ) |
| inline

Restores main position related properties on the specified control (to the values stored in the current object).

Parameters

  c | Control. If null then internally stored control is taken, if that is also null then InvalidOperationException is thrown.

## Member Data Documentation

Control IG.Forms.ControlPropertyStore._control
| private

## Property Documentation

Control IG.Forms.ControlPropertyStore.Control
| get set

Control that is manipulated.

Setter also saves control's properties immediately.

Referenced by IG.Forms.ControlManipulator.ApplyNormalColor().

Color IG.Forms.ControlPropertyStore.BackColor
| get set

Referenced by IG.Forms.ControlManipulator.ApplyNormalColor().

Color IG.Forms.ControlPropertyStore.ForeColor
| get set

Font IG.Forms.ControlPropertyStore.Font
| get set

string IG.Forms.ControlPropertyStore.Text
| get set

The documentation for this class was generated from the following file:

- igforms/Basic/ControlPropertyStore.cs