Class GorgonProgressOverlay
Functionality to display a translucent (like plexi-glass) panel on top of a control or form with a progress meter.
Inherited Members
Namespace: Gorgon.UI
Assembly: Gorgon.Windows.dll
Syntax
public class GorgonProgressOverlay
Properties
| Edit this page View SourceIsActive
Property to return whether the overlay is active or not.
Declaration
public bool IsActive { get; }
Property Value
Type | Description |
---|---|
bool |
OverlayColor
Property to set or return the color of the overlay.
Declaration
public GorgonColor OverlayColor { get; set; }
Property Value
Type | Description |
---|---|
GorgonColor |
TransparencyPercent
Property to set or return the amount of transparency.
Declaration
public int TransparencyPercent { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceHide()
Function to hide an active overlay.
Declaration
public void Hide()
Show(IWin32Window, string, string, Action, ProgressBarStyle, float)
Function to show the overlay on top of a control/form.
Declaration
public IWin32Window Show(IWin32Window parentWindow, string title, string message = null, Action cancelAction = null, ProgressBarStyle meterStyle = ProgressBarStyle.Marquee, float initialValue = 0)
Parameters
Type | Name | Description |
---|---|---|
IWin32Window | parentWindow | The control or form to use as the parent. |
string | title | The title for the progress meter. |
string | message | [Optional] A message to display above the progress bar. |
Action | cancelAction | [Optional] The action to perform when cancelling. |
ProgressBarStyle | meterStyle | [Optional] The type of bar to draw in the progress meter. |
float | initialValue | [Optional] The initial value for the progress meter. |
Returns
Type | Description |
---|---|
IWin32Window | The handle to the progress panel window. |
Remarks
This will only show a single overlay at a time, and multiple overlays are not supported.
If the cancelAction
parameter is supplied, a cancel button will appear on the progress window, otherwise it will be hidden.
Passing null to the parentWindow
parameter is the same as calling Hide().
UpdateProgress(float?, string)
Function to update the progress percentage, and optionally, the message for the progress bar.
Declaration
public void UpdateProgress(float? value, string message = null)
Parameters
Type | Name | Description |
---|---|---|
float? | value | The value to assign to the progress meter. |
string | message | [Optional] The message to display above the progress bar. |
Remarks
When the value
parameter is set to null, then the progress value will not update. This is useful when only the message should be updated.
important
This method is completely thread safe and can be called within a running thread.