| 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 | Protected Attributes | Properties | Events | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
IG.Forms.IndicatorLight Class Reference
Inheritance diagram for IG.Forms.IndicatorLight:
[legend]
Collaboration diagram for IG.Forms.IndicatorLight:
[legend]

## Public Member Functions
| IndicatorLight ()
void | SetProperties ()
bool | SetOff ()
| Sets indicator to off, returns true if successful and false if not (which can be vecause the indictor does not have this state). More...
bool | UnsetOff ()
| Unsets the Off state, if set. Switches to a suitable other state available. More...
bool | SetOk ()
| Sets indicator to OK, returns true if successful and false if not (which can be vecause the indictor does not have this state). More...
bool | UnsetOk ()
| Unsets the OK state, if set. Switches to a suitable other state available. More...
bool | SetBusy ()
| Sets indicator to Busy, returns true if successful and false if not (which can be vecause the indictor does not have this state). More...
bool | UnsetBusy ()
| Unsets the Busy state, if set. Switches to a suitable other state available. More...
bool | SetError ()
| Sets indicator to Error, returns true if successful and false if not (which can be vecause the indictor does not have this state). More...
bool | UnsetError ()
| Unsets the Error state, if set. Switches to a suitable other state available. More...
void | Blink (int numTimes=2)
| Blninks indicator light in the currently active color for the specified number of times. More...
void | BlinkSpecial (Color blinkColor, int numTimes=2)
| Blinks the indicator link in chosen color, for a specified number of times. More...
void | BlinkOk (int numTimes=2)
| Blinks the indicator light in the color indicating teh OK state, for the specified numberr of times. This is done independently of the current active color of the indicator light. More...
void | BlinkBusy (int numTimes=2)
| Blinks the indicator light in the color indicating teh Busy state, for the specified numberr of times. This is done independently of the current active color of the indicator light. More...
void | BlinkError (int numTimes=2)
| Blinks the indicator light in the color indicating teh Error state, for the specified numberr of times. This is done independently of the current active color of the indicator light. More...

## Protected Member Functions
void | ClearAll ()
| Auxiliary, clears all flags withoud side effects. More...
bool | IsAny ()
| Auxiliary, returns a flag indicating whether any mode is active. More...
void | SetFirstAvailable ()
| Switch on the first available indicator light if none is currently switched on. More...
void | StartBlinking ()
| Starts blinking the indicator light. More...
void | StopBlinking ()
| Stops blinking the indicator light. More...
void | OnStateChanged ()
| This method is executed when state changes. It fires the StateChanged event. More...
override void | Dispose (bool disposing)
| Clean up any resources being used. More...

## Protected Attributes
bool | _isOff = true
bool | _isOk = false
bool | _isBusy = false
bool | _isError = false
int | _numRemainingSpecialBlinks = 0
Color | _specialBlinkColor = Color.Yellow

## Properties
Color | LightColor`[get, set]`
Color | ActiveColor`[get]`
| Gets current active color for the light indicator. More...
bool | IsOff`[get, protected set]`
| Flag indicating whether the indicator is off. More...
bool | IsOk`[get, protected set]`
| Flag indicating whether the indicator state is OK. More...
bool | IsBusy`[get, protected set]`
| Flag indicating whether the indicator state is Busy. More...
bool | IsError`[get, protected set]`
| Flag indicating whether the indicator state is Busy. More...
int | NumRemainingBlinks`[get, protected set]`
int | NumRemainingSpecialBlinks`[get, protected set]`
Color | SpecialBlinkColor`[get, protected set]`
bool | IsBlinkOn`[get, set]`
| Specifies, when the indicator light is blinking, whether the blinking color is currently on or it is off. This flag is toggled by the timer when blinking is on, and the consequence is that the light color changes. More...
bool | IsBlinking`[get, set]`
| Gets or sets the flag indicating whetherr the indicator light is continuously blinking in its active color. More...
int | BlinkIntervalMilliSeconds`[get, set]`
bool | ThrowOnInvalidSwitch`[get, set]`
| Gets or sets a flag indicating whether exception is thrown when an invalid switch is attempted (i.e. one that is not available). More...
bool | HasOff`[get, set]`
| Gets or sets a flag indicating whether the indicator light has an Off state. More...
bool | HasOk`[get, set]`
| Gets or sets a flag indicating whether the indicator light has an OK state. More...
bool | HasBusy`[get, set]`
| Gets or sets a flag indicating whether the indicator light has a Busy state. More...
bool | HasError`[get, set]`
| Gets or sets a flag indicating whether the indicator light has an Error state. More...
FlowDirection | FlowDirection`[get, set]`
| Directional arrangemnt of the contained light (a pannel) and label within the containing outer flow layout panel. More...
string | LabelText`[get, set]`
| Text on the label besid the light (can be null). More...
Font | LabelFont`[get, set]`
Color | ColorLabel`[get, set]`
Color | ColorOff`[get, protected set]`
Color | ColorOk`[get, protected set]`
Color | ColorError`[get, protected set]`
Color | ColorBusy`[get, protected set]`
bool | BorderOut`[get, set]`
| Whether there is a border around control (more precisely, around its outer panel). More...
bool | BorderLabel`[get, set]`
| Whether label has a border. More...
int | MarginOut`[get, set]`
| Margin of teh outer panel. More...
int | PaddingOut`[get, set]`
| Padding of the outer panel. More...
int | MarginLabel`[get, set]`
| Margin of the label. More...
int | PaddingLabel`[get, set]`
| Padding of the label. More...
static int | DefaultBlinkIntervalMilliSeconds`[get, set]`
static Color | DefaultColorLabel`[get, protected set]`
static Color | DefaultColorOff`[get, protected set]`
static Color | DefaultColorOk`[get, protected set]`
static Color | DefaultColorError`[get, protected set]`
static Color | DefaultColorBusy`[get, protected set]`
static bool | DefaultBorderOut`[get, set]`
static bool | DefaultBorderLabel`[get, set]`
static int | DefaultMarginOut`[get, set]`
static int | DefaultPaddingOut`[get, set]`
static int | DefaultMarginLabel`[get, set]`
static int | DefaultPaddingLabel`[get, set]`

## Events
EventHandler | StateChanged
| Event that is fired whenever the selected file changes. More...

## Private Member Functions
void | timer1_Tick (object sender, EventArgs e)
void | InitializeComponent ()
| Required method for Designer support - do not modify the contents of this method with the code editor. More...

## Private Attributes
Color | _lightColor = DefaultColorOff
int | _numRemainingBlinks = 0
bool | _blinkOn = false
bool | _isBlinking = false
int | _blinkIntervalMilliseconds = DefaultBlinkIntervalMilliSeconds
bool | _throwOnInvalidSwitch = false
bool | _hasOff = true
bool | _hasOk = true
bool | _hasBusy = true
bool | _hasError = true
FlowDirection | _direction = FlowDirection.LeftToRight
string | _labelText = null
Font | _labelFont = null
Color | _colorLabel = DefaultColorLabel
Color | _colorLightOff = DefaultColorOff
Color | _colorLightOk = DefaultColorOk
Color | _colorLightBusy = DefaultColorBusy
Color | _colorLightError = DefaultColorError
bool | _borderOut = DefaultBorderOut
bool | _borderLabel = DefaultBorderLabel
int | _marginOut = DefaultMarginOut
int | _paddingOut = DefaultPaddingOut
int | _marginLabel = DefaultMarginLabel
int | _paddingLabel = DefaultPaddingLabel
System.ComponentModel.IContainer | components = null
| Required designer variable. More...
System.Windows.Forms.FlowLayoutPanel | flowOuter
System.Windows.Forms.Panel | pnlLight
System.Windows.Forms.Label | lblText
System.Windows.Forms.Timer | timer1

## Static Private Attributes
static int | _defaultBlinkIntervalMilliseconds = 500
static Color | _defaultColorLabel = Color.Black
static Color | _defaultColorLightOff = Color.DarkSlateGray
static Color | _defaultColorLightOk = Color.LimeGreen
static Color | _defaultColorLightBusy = Color.DarkRed
static Color | _defaultColorLightError = Color.Red
static bool | _defaultBorderOut = false
static bool | _defaultBorderLabel = false
static int | _defaultMarginOut = 2
static int | _defaultPaddingOut = 2
static int | _defaultMarginLabel = 2
static int | _defaultPaddingLabel = 2

## Constructor & Destructor Documentation

IG.Forms.IndicatorLight.IndicatorLight | ( |  | ) |
| inline

## Member Function Documentation

void IG.Forms.IndicatorLight.SetProperties | ( |  | ) |
| inline

void IG.Forms.IndicatorLight.ClearAll | ( |  | ) |
| inline protected

Auxiliary, clears all flags withoud side effects.

bool IG.Forms.IndicatorLight.IsAny | ( |  | ) |
| inline protected

Auxiliary, returns a flag indicating whether any mode is active.

void IG.Forms.IndicatorLight.SetFirstAvailable | ( |  | ) |
| inline protected

Switch on the first available indicator light if none is currently switched on.

This helps ensure that at least one indicator is on when availability of different types of lights changes (and the indicator that was on becomes unavailable).

bool IG.Forms.IndicatorLight.SetOff | ( |  | ) |
| inline

Sets indicator to off, returns true if successful and false if not (which can be vecause the indictor does not have this state).

bool IG.Forms.IndicatorLight.UnsetOff | ( |  | ) |
| inline

Unsets the Off state, if set. Switches to a suitable other state available.

Returns
  True if successful and some other state was activated, false if not successful or if this state was not set when called.

bool IG.Forms.IndicatorLight.SetOk | ( |  | ) |
| inline

Sets indicator to OK, returns true if successful and false if not (which can be vecause the indictor does not have this state).

bool IG.Forms.IndicatorLight.UnsetOk | ( |  | ) |
| inline

Unsets the OK state, if set. Switches to a suitable other state available.

Returns
  True if successful and some other state was activated, false if not successful or if this state was not set when called.

bool IG.Forms.IndicatorLight.SetBusy | ( |  | ) |
| inline

Sets indicator to Busy, returns true if successful and false if not (which can be vecause the indictor does not have this state).

bool IG.Forms.IndicatorLight.UnsetBusy | ( |  | ) |
| inline

Unsets the Busy state, if set. Switches to a suitable other state available.

Returns
  True if successful and some other state was activated, false if not successful or if this state was not set when called.

bool IG.Forms.IndicatorLight.SetError | ( |  | ) |
| inline

Sets indicator to Error, returns true if successful and false if not (which can be vecause the indictor does not have this state).

bool IG.Forms.IndicatorLight.UnsetError | ( |  | ) |
| inline

Unsets the Error state, if set. Switches to a suitable other state available.

Returns
  True if successful and some other state was activated, false if not successful or if this state was not set when called.

void IG.Forms.IndicatorLight.StartBlinking | ( |  | ) |
| inline protected

Starts blinking the indicator light.

void IG.Forms.IndicatorLight.StopBlinking | ( |  | ) |
| inline protected

Stops blinking the indicator light.

void IG.Forms.IndicatorLight.Blink | ( | int | numTimes = `2` | ) |
| inline

Blninks indicator light in the currently active color for the specified number of times.

Parameters

  numTimes | The number of times indicator blinks, default is 2.

void IG.Forms.IndicatorLight.BlinkSpecial | ( | Color | blinkColor,
|  | int | numTimes = `2`
| ) |  |
| inline

Blinks the indicator link in chosen color, for a specified number of times.

Parameters

  blinkColor | Color in which light blinks.
  numTimes | Number of times the indictor blinks. Default is 2.

void IG.Forms.IndicatorLight.BlinkOk | ( | int | numTimes = `2` | ) |
| inline

Blinks the indicator light in the color indicating teh OK state, for the specified numberr of times. This is done independently of the current active color of the indicator light.

Parameters

  numTimes | Number of time the light blinks. Default is 2.

void IG.Forms.IndicatorLight.BlinkBusy | ( | int | numTimes = `2` | ) |
| inline

Blinks the indicator light in the color indicating teh Busy state, for the specified numberr of times. This is done independently of the current active color of the indicator light.

Parameters

  numTimes | Number of time the light blinks. Default is 2.

void IG.Forms.IndicatorLight.BlinkError | ( | int | numTimes = `2` | ) |
| inline

Blinks the indicator light in the color indicating teh Error state, for the specified numberr of times. This is done independently of the current active color of the indicator light.

Parameters

  numTimes | Number of time the light blinks. Default is 2.

void IG.Forms.IndicatorLight.OnStateChanged | ( |  | ) |
| inline protected

This method is executed when state changes. It fires the StateChanged event.

void IG.Forms.IndicatorLight.timer1_Tick | ( | object | sender,
|  | EventArgs | e
| ) |  |
| inline private

override void IG.Forms.IndicatorLight.Dispose | ( | bool | disposing | ) |
| inline protected

Clean up any resources being used.

Parameters

  disposing | true if managed resources should be disposed; otherwise, false.

void IG.Forms.IndicatorLight.InitializeComponent | ( |  | ) |
| inline private

Required method for Designer support - do not modify the contents of this method with the code editor.

## Member Data Documentation

Color IG.Forms.IndicatorLight._lightColor = DefaultColorOff
| private

bool IG.Forms.IndicatorLight._isOff = true
| protected

bool IG.Forms.IndicatorLight._isOk = false
| protected

bool IG.Forms.IndicatorLight._isBusy = false
| protected

bool IG.Forms.IndicatorLight._isError = false
| protected

int IG.Forms.IndicatorLight._numRemainingBlinks = 0
| private

int IG.Forms.IndicatorLight._numRemainingSpecialBlinks = 0
| protected

Color IG.Forms.IndicatorLight._specialBlinkColor = Color.Yellow
| protected

bool IG.Forms.IndicatorLight._blinkOn = false
| private

bool IG.Forms.IndicatorLight._isBlinking = false
| private

int IG.Forms.IndicatorLight._blinkIntervalMilliseconds = DefaultBlinkIntervalMilliSeconds
| private

bool IG.Forms.IndicatorLight._throwOnInvalidSwitch = false
| private

bool IG.Forms.IndicatorLight._hasOff = true
| private

bool IG.Forms.IndicatorLight._hasOk = true
| private

bool IG.Forms.IndicatorLight._hasBusy = true
| private

bool IG.Forms.IndicatorLight._hasError = true
| private

FlowDirection IG.Forms.IndicatorLight._direction = FlowDirection.LeftToRight
| private

string IG.Forms.IndicatorLight._labelText = null
| private

Font IG.Forms.IndicatorLight._labelFont = null
| private

Color IG.Forms.IndicatorLight._colorLabel = DefaultColorLabel
| private

Color IG.Forms.IndicatorLight._colorLightOff = DefaultColorOff
| private

Color IG.Forms.IndicatorLight._colorLightOk = DefaultColorOk
| private

Color IG.Forms.IndicatorLight._colorLightBusy = DefaultColorBusy
| private

Color IG.Forms.IndicatorLight._colorLightError = DefaultColorError
| private

bool IG.Forms.IndicatorLight._borderOut = DefaultBorderOut
| private

bool IG.Forms.IndicatorLight._borderLabel = DefaultBorderLabel
| private

int IG.Forms.IndicatorLight._marginOut = DefaultMarginOut
| private

int IG.Forms.IndicatorLight._paddingOut = DefaultPaddingOut
| private

int IG.Forms.IndicatorLight._marginLabel = DefaultMarginLabel
| private

int IG.Forms.IndicatorLight._paddingLabel = DefaultPaddingLabel
| private

int IG.Forms.IndicatorLight._defaultBlinkIntervalMilliseconds = 500
| static private

Color IG.Forms.IndicatorLight._defaultColorLabel = Color.Black
| static private

Color IG.Forms.IndicatorLight._defaultColorLightOff = Color.DarkSlateGray
| static private

Color IG.Forms.IndicatorLight._defaultColorLightOk = Color.LimeGreen
| static private

Color IG.Forms.IndicatorLight._defaultColorLightBusy = Color.DarkRed
| static private

Color IG.Forms.IndicatorLight._defaultColorLightError = Color.Red
| static private

bool IG.Forms.IndicatorLight._defaultBorderOut = false
| static private

bool IG.Forms.IndicatorLight._defaultBorderLabel = false
| static private

int IG.Forms.IndicatorLight._defaultMarginOut = 2
| static private

int IG.Forms.IndicatorLight._defaultPaddingOut = 2
| static private

int IG.Forms.IndicatorLight._defaultMarginLabel = 2
| static private

int IG.Forms.IndicatorLight._defaultPaddingLabel = 2
| static private

System.ComponentModel.IContainer IG.Forms.IndicatorLight.components = null
| private

Required designer variable.

System.Windows.Forms.FlowLayoutPanel IG.Forms.IndicatorLight.flowOuter
| private

System.Windows.Forms.Panel IG.Forms.IndicatorLight.pnlLight
| private

System.Windows.Forms.Label IG.Forms.IndicatorLight.lblText
| private

System.Windows.Forms.Timer IG.Forms.IndicatorLight.timer1
| private

## Property Documentation

Color IG.Forms.IndicatorLight.LightColor
| get set protected

Color IG.Forms.IndicatorLight.ActiveColor
| get protected

Gets current active color for the light indicator.

bool IG.Forms.IndicatorLight.IsOff
| get protected set

Flag indicating whether the indicator is off.

bool IG.Forms.IndicatorLight.IsOk
| get protected set

Flag indicating whether the indicator state is OK.

bool IG.Forms.IndicatorLight.IsBusy
| get protected set

Flag indicating whether the indicator state is Busy.

bool IG.Forms.IndicatorLight.IsError
| get protected set

Flag indicating whether the indicator state is Busy.

int IG.Forms.IndicatorLight.NumRemainingBlinks
| get protected set

int IG.Forms.IndicatorLight.NumRemainingSpecialBlinks
| get protected set

Color IG.Forms.IndicatorLight.SpecialBlinkColor
| get protected set

bool IG.Forms.IndicatorLight.IsBlinkOn
| get set protected

Specifies, when the indicator light is blinking, whether the blinking color is currently on or it is off. This flag is toggled by the timer when blinking is on, and the consequence is that the light color changes.

bool IG.Forms.IndicatorLight.IsBlinking
| get set

Gets or sets the flag indicating whetherr the indicator light is continuously blinking in its active color.

int IG.Forms.IndicatorLight.BlinkIntervalMilliSeconds
| get set

bool IG.Forms.IndicatorLight.ThrowOnInvalidSwitch
| get set

Gets or sets a flag indicating whether exception is thrown when an invalid switch is attempted (i.e. one that is not available).

bool IG.Forms.IndicatorLight.HasOff
| get set

Gets or sets a flag indicating whether the indicator light has an Off state.

bool IG.Forms.IndicatorLight.HasOk
| get set

Gets or sets a flag indicating whether the indicator light has an OK state.

bool IG.Forms.IndicatorLight.HasBusy
| get set

Gets or sets a flag indicating whether the indicator light has a Busy state.

bool IG.Forms.IndicatorLight.HasError
| get set

Gets or sets a flag indicating whether the indicator light has an Error state.

FlowDirection IG.Forms.IndicatorLight.FlowDirection
| get set

Directional arrangemnt of the contained light (a pannel) and label within the containing outer flow layout panel.

string IG.Forms.IndicatorLight.LabelText
| get set

Text on the label besid the light (can be null).

Font IG.Forms.IndicatorLight.LabelFont
| get set

Color IG.Forms.IndicatorLight.ColorLabel
| get set

Color IG.Forms.IndicatorLight.ColorOff
| get protected set

Color IG.Forms.IndicatorLight.ColorOk
| get protected set

Color IG.Forms.IndicatorLight.ColorError
| get protected set

Color IG.Forms.IndicatorLight.ColorBusy
| get protected set

bool IG.Forms.IndicatorLight.BorderOut
| get set

Whether there is a border around control (more precisely, around its outer panel).

bool IG.Forms.IndicatorLight.BorderLabel
| get set

Whether label has a border.

int IG.Forms.IndicatorLight.MarginOut
| get set

Margin of teh outer panel.

int IG.Forms.IndicatorLight.PaddingOut
| get set

Padding of the outer panel.

int IG.Forms.IndicatorLight.MarginLabel
| get set

Margin of the label.

int IG.Forms.IndicatorLight.PaddingLabel
| get set

Padding of the label.

int IG.Forms.IndicatorLight.DefaultBlinkIntervalMilliSeconds
| static get set

Color IG.Forms.IndicatorLight.DefaultColorLabel
| static get protected set

Color IG.Forms.IndicatorLight.DefaultColorOff
| static get protected set

Color IG.Forms.IndicatorLight.DefaultColorOk
| static get protected set

Color IG.Forms.IndicatorLight.DefaultColorError
| static get protected set

Color IG.Forms.IndicatorLight.DefaultColorBusy
| static get protected set

bool IG.Forms.IndicatorLight.DefaultBorderOut
| static get set

bool IG.Forms.IndicatorLight.DefaultBorderLabel
| static get set

int IG.Forms.IndicatorLight.DefaultMarginOut
| static get set

int IG.Forms.IndicatorLight.DefaultPaddingOut
| static get set

int IG.Forms.IndicatorLight.DefaultMarginLabel
| static get set

int IG.Forms.IndicatorLight.DefaultPaddingLabel
| static get set

## Event Documentation

EventHandler IG.Forms.IndicatorLight.StateChanged

Event that is fired whenever the selected file changes.

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

- igforms/Utilities/BasicControls/IndicatorLight.cs
- igforms/Utilities/BasicControls/IndicatorLight.Designer.cs