IGLib  1.7.2
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Forms.ControlManipulator Class Reference

Performs various operations on the specified controls: More...

+ Collaboration diagram for IG.Forms.ControlManipulator:

Public Member Functions

 ControlManipulator ()
 
 ControlManipulator (params Control[] controls)
 Constructs control manipulators, initialized with the specified controls to be manipulated. More...
 
void RemoveAllControls ()
 Removes all manipulated controls from the object. More...
 
void RemoveControl (Control control)
 Removes the specified control from this object, if it contains it. More...
 
void AddControl (Control control)
 
void AddControls (params Control[] controls)
 
void SaveProperties ()
 
void RestoreProperties ()
 
void Blink (int numBlinks=2, double blinkIntervalSeconds=0.2, params Control[] controls)
 
void Blink (Color blinkBackground, int numBlinks=2, double blinkIntervalSeconds=0.2, params Control[] controls)
 
void StartBlinking ()
 Starts blinking the control. More...
 
void StopBlinking ()
 Interrups blinking process, if it is currently happening. It is ensured that controls' normal background will be reset before timer is actually shut off. More...
 

Protected Member Functions

void ApplyBlinkColor ()
 
void ApplyNormalColor ()
 

Static Protected Attributes

static Color DefaultBlinkColor = Color.Orange
 

Properties

Dictionary< Control,
ControlPropertyStore
Controls [get]
 Dictionary that contains controls, and for each control it contains a storage object that saves and restores control's state when necessary. More...
 
System.Windows.Forms.Timer BlinkTimer [get]
 Timer used for blinking, has pre-installed event handler. Created as necessary (azy evaluation). More...
 
Color BlinkBackColor [get, set]
 Background color used for blinking. More...
 
double BlinkIntervalSeconds [get, set]
 Interval between color switches, in seconds. More...
 
int BlinkIntervalMs [get, set]
 Interval between successive blinks, in milliseconds. Bound to BlinkIntervalSeconds, so these properties can be used interchangeably, dependent on which time unit you prefer to use. More...
 
int NumBlinks [get, set]
 Number of blinks. More...
 
bool IssBlinkOn [get, set]
 Indicates whether blinking is currently switched on. More...
 
int NumPerformedBlinks [get, set]
 
bool DoBlink [get, set]
 

Private Member Functions

void BlinkTimer_Tick (object sender, EventArgs e)
 Timer event handler that performes blining of control in the specified color. More...
 

Private Attributes

Dictionary< Control,
ControlPropertyStore
_controls = new Dictionary<Control, ControlPropertyStore>()
 
System.Windows.Forms.Timer _timer
 
Color _blinkBackColor = Color.Orange
 
double _blinkIntervalSeconds = 0.2
 
int _numBlinks = 2
 
bool _isBlinkOn = false
 
bool _doBlink1 = false
 

Detailed Description

Performs various operations on the specified controls:

- Blinks the control.

Constructor & Destructor Documentation

IG.Forms.ControlManipulator.ControlManipulator ( )
inline
IG.Forms.ControlManipulator.ControlManipulator ( params Control[]  controls)
inline

Constructs control manipulators, initialized with the specified controls to be manipulated.

Parameters
controls

Member Function Documentation

void IG.Forms.ControlManipulator.RemoveAllControls ( )
inline

Removes all manipulated controls from the object.

void IG.Forms.ControlManipulator.RemoveControl ( Control  control)
inline

Removes the specified control from this object, if it contains it.

Parameters
control
void IG.Forms.ControlManipulator.AddControl ( Control  control)
inline
void IG.Forms.ControlManipulator.AddControls ( params Control[]  controls)
inline
void IG.Forms.ControlManipulator.SaveProperties ( )
inline
void IG.Forms.ControlManipulator.RestoreProperties ( )
inline
void IG.Forms.ControlManipulator.Blink ( int  numBlinks = 2,
double  blinkIntervalSeconds = 0.2,
params Control[]  controls 
)
inline
void IG.Forms.ControlManipulator.Blink ( Color  blinkBackground,
int  numBlinks = 2,
double  blinkIntervalSeconds = 0.2,
params Control[]  controls 
)
inline
void IG.Forms.ControlManipulator.StartBlinking ( )
inline

Starts blinking the control.

void IG.Forms.ControlManipulator.StopBlinking ( )
inline

Interrups blinking process, if it is currently happening. It is ensured that controls' normal background will be reset before timer is actually shut off.

void IG.Forms.ControlManipulator.ApplyBlinkColor ( )
inlineprotected
void IG.Forms.ControlManipulator.ApplyNormalColor ( )
inlineprotected
void IG.Forms.ControlManipulator.BlinkTimer_Tick ( object  sender,
EventArgs  e 
)
inlineprivate

Timer event handler that performes blining of control in the specified color.

Member Data Documentation

Dictionary<Control, ControlPropertyStore> IG.Forms.ControlManipulator._controls = new Dictionary<Control, ControlPropertyStore>()
private
System.Windows.Forms.Timer IG.Forms.ControlManipulator._timer
private
Color IG.Forms.ControlManipulator.DefaultBlinkColor = Color.Orange
staticprotected
Color IG.Forms.ControlManipulator._blinkBackColor = Color.Orange
private
double IG.Forms.ControlManipulator._blinkIntervalSeconds = 0.2
private
int IG.Forms.ControlManipulator._numBlinks = 2
private
bool IG.Forms.ControlManipulator._isBlinkOn = false
private
bool IG.Forms.ControlManipulator._doBlink1 = false
private

Property Documentation

Dictionary<Control, ControlPropertyStore> IG.Forms.ControlManipulator.Controls
getprotected

Dictionary that contains controls, and for each control it contains a storage object that saves and restores control's state when necessary.

System.Windows.Forms.Timer IG.Forms.ControlManipulator.BlinkTimer
getprotected

Timer used for blinking, has pre-installed event handler. Created as necessary (azy evaluation).

Color IG.Forms.ControlManipulator.BlinkBackColor
getset

Background color used for blinking.

double IG.Forms.ControlManipulator.BlinkIntervalSeconds
getset

Interval between color switches, in seconds.

This is actually the time of half of a blink (the time interval in which one of two colors is displayed.)

int IG.Forms.ControlManipulator.BlinkIntervalMs
getset

Interval between successive blinks, in milliseconds. Bound to BlinkIntervalSeconds, so these properties can be used interchangeably, dependent on which time unit you prefer to use.

int IG.Forms.ControlManipulator.NumBlinks
getset

Number of blinks.

bool IG.Forms.ControlManipulator.IssBlinkOn
getsetprotected

Indicates whether blinking is currently switched on.

When true, the BlinkTimer tick handlers will alternately switch background colors of controls and cause blinking in this way.

int IG.Forms.ControlManipulator.NumPerformedBlinks
getsetprotected
bool IG.Forms.ControlManipulator.DoBlink
getsetprotected

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