[This is preliminary documentation and is subject to change.]
Applies value passed to UserState
Namespace: Tools.WindowsT.FormsTAssembly: Tools.Windows (in Tools.Windows.dll) Version: 1.5.3.38916 (1.5.3.38916)
Syntax
| C# |
|---|
protected virtual void ApplyUserState( Object userState ) |
| Visual Basic |
|---|
Protected Overridable Sub ApplyUserState ( _ userState As Object _ ) |
| Visual C++ |
|---|
protected: virtual void ApplyUserState( Object^ userState ) |
| F# |
|---|
abstract ApplyUserState : userState:Object -> unit override ApplyUserState : userState:Object -> unit |
| JScript |
|---|
protected function ApplyUserState( userState : Object ) |
Parameters
- userState
- Type: System..::..Object
Value to apply
Remarks
This implementation treats values of some types in a special way:
Null values and values of unsupported types are ignored.
| Type | Action taken |
|---|---|
| ProgressBarStyle or ProgressBarStyle | The value is passedto the ProgressBarStyle property. |
| String | The value is passed to the Information property. |
| Boolean | The value is passed to the CanCancel property. |
| BackgroundWorker (same instance as BackgroundWorker) | The Reset()()()() method is called. |
| Int32 (only when form range 0÷100) | The value is passed to the Progress property (same as passing value greater than or equal to zero to ProgressPercentage). |
| Array (any type) | Individual items of the array are passed to the ApplyUserState(Object) method. |
See Also
Version History
1.5.3
- This method is new in version 1.5.3 (it extracts user state application logic from OnProgressChanged(BackgroundWorker, ProgressChangedEventArgs).