C# Class ScpDriverInstaller.Utilities.WPFThreadingExtensions

Mostrar archivo Open project: nefarius/ScpToolkit

Public Methods

Method Description
GetContentThreadSafe ( this cc ) : string

Gets the Content of a ContentControl in a thread safe way

GetIsCheckedThreadSafe ( this cb ) : bool

Gets the value of the IsChecked property of a CheckBox in a thread safe way

GetValueThreadSafe ( this pb ) : double

Gets the Value property of a ProgressBar in a thread safe way

GetVisibilityThreadSafe ( this uie ) : Visibility

Gets the Visibility of a UIElement in a thread safe way

InvokeIfRequired ( this control, System.Action methodcall, DispatcherPriority priorityForCall ) : void

Simple helper extension method to marshall to correct thread if its required

SetContentThreadSafe ( this cc, string s ) : void

Sets the Content of a ContentControl in a thread safe way

SetIsCheckedThreadSafe ( this rb, bool val ) : void

Sets the value of the IsChecked property of a RadioButton in a thread safe way

SetIsEnabledThreadSafe ( this uie, bool enabled ) : void

Sets the IsEnabled value in a thread safe way

SetTextThreadSafe ( this tb ) : string

Gets the Text of a TextBox in a thread safe way

SetTextThreadSafe ( this tb, string s ) : void

Sets the text of a TextBlock in a thread safe way

SetValueThreadSafe ( this pb, double val ) : void

Sets the Value property of a ProgressBar in a thread safe way

SetVisibilityThreadSafe ( this uie, Visibility vis ) : void

Sets the Visibility of a UIElement in a thread safe way

Method Details

GetContentThreadSafe() public static method

Gets the Content of a ContentControl in a thread safe way
public static GetContentThreadSafe ( this cc ) : string
cc this The ContentControl
return string

GetIsCheckedThreadSafe() public static method

Gets the value of the IsChecked property of a CheckBox in a thread safe way
public static GetIsCheckedThreadSafe ( this cb ) : bool
cb this The CheckBox
return bool

GetValueThreadSafe() public static method

Gets the Value property of a ProgressBar in a thread safe way
public static GetValueThreadSafe ( this pb ) : double
pb this The ProgressBar
return double

GetVisibilityThreadSafe() public static method

Gets the Visibility of a UIElement in a thread safe way
public static GetVisibilityThreadSafe ( this uie ) : Visibility
uie this The UIElement
return Visibility

InvokeIfRequired() public static method

Simple helper extension method to marshall to correct thread if its required
public static InvokeIfRequired ( this control, System.Action methodcall, DispatcherPriority priorityForCall ) : void
control this The source control
methodcall System.Action The method to call
priorityForCall DispatcherPriority The thread priority
return void

SetContentThreadSafe() public static method

Sets the Content of a ContentControl in a thread safe way
public static SetContentThreadSafe ( this cc, string s ) : void
cc this The ContentControl
s string The string to use as the Content of the ContentControl
return void

SetIsCheckedThreadSafe() public static method

Sets the value of the IsChecked property of a RadioButton in a thread safe way
public static SetIsCheckedThreadSafe ( this rb, bool val ) : void
rb this The RadioButton
val bool The value to set the IsChecked property to
return void

SetIsEnabledThreadSafe() public static method

Sets the IsEnabled value in a thread safe way
public static SetIsEnabledThreadSafe ( this uie, bool enabled ) : void
uie this Thr UIElement
enabled bool The value for the IsEnabled property
return void

SetTextThreadSafe() public static method

Gets the Text of a TextBox in a thread safe way
public static SetTextThreadSafe ( this tb ) : string
tb this The TextBox
return string

SetTextThreadSafe() public static method

Sets the text of a TextBlock in a thread safe way
public static SetTextThreadSafe ( this tb, string s ) : void
tb this The TextBlock
s string The string for the Text property
return void

SetValueThreadSafe() public static method

Sets the Value property of a ProgressBar in a thread safe way
public static SetValueThreadSafe ( this pb, double val ) : void
pb this the ProgressBar
val double The value to Set the Value property to
return void

SetVisibilityThreadSafe() public static method

Sets the Visibility of a UIElement in a thread safe way
public static SetVisibilityThreadSafe ( this uie, Visibility vis ) : void
uie this The UIElement
vis Visibility The required Visibility
return void