C# Class KFreonLib.GUI.Gooey

Allows some control over changing the state (enabled/visible) of a set of controls. Features: Exclude controls from state changes. Switch state changes between enabling and changing visibility. A function can replace state changes. e.g. Instead of enabling, set some text or whatever.
Afficher le fichier Open project: ME3Explorer/ME3Explorer Class Usage Examples

Méthodes publiques

Méthode Description
AddControl ( object control, string key, object stateChangeEffect, bool affectedByStateChange = true, bool trueIsEnabledProperty = true ) : bool

Adds given control to list of controls to be maintained by this class.

ChangeState ( bool state ) : void

Changes state of all listed controls.

GetControlAffectedState ( string key ) : bool

Gets whether control specified by key is affected by state changes.

Gooey ( Control baseControl ) : System
ModifyControl ( string key, bool AffectedByStateChange ) : void

Modifies control specified by key, changes whether control is affected by state changes.

Private Methods

Méthode Description
ControlChange ( string type, string key, bool state, Control item ) : void
ControlChange ( string type, string key, bool state, ToolStripItem item ) : void
PerformStateChange ( bool state ) : void

Method Details

AddControl() public méthode

Adds given control to list of controls to be maintained by this class.
public AddControl ( object control, string key, object stateChangeEffect, bool affectedByStateChange = true, bool trueIsEnabledProperty = true ) : bool
control object Control to be added (ToolStripItem or Form Control)
key string Key to identify control. MUST be a unique part of the Control name.
stateChangeEffect object Effect to be run on state change. Bool or Action.
affectedByStateChange bool Optional. If true, this control is affected by state changes.
trueIsEnabledProperty bool Optional. If true, property affected by state changes is the Enabled property, otherwise uses the visible property.
Résultat bool

ChangeState() public méthode

Changes state of all listed controls.
public ChangeState ( bool state ) : void
state bool If true, enables/makes visible. Functions run regardless and take state as parameter.
Résultat void

GetControlAffectedState() public méthode

Gets whether control specified by key is affected by state changes.
public GetControlAffectedState ( string key ) : bool
key string Key of control to look for.
Résultat bool

Gooey() public méthode

public Gooey ( Control baseControl ) : System
baseControl System.Windows.Forms.Control
Résultat System

ModifyControl() public méthode

Modifies control specified by key, changes whether control is affected by state changes.
public ModifyControl ( string key, bool AffectedByStateChange ) : void
key string Key of control to change.
AffectedByStateChange bool If true, control is affected by state changes.
Résultat void