Gorgon
Show / Hide Table of Contents

Class GorgonProgressOverlay

Functionality to display a translucent (like plexi-glass) panel on top of a control or form with a progress meter.

Inheritance
object
GorgonProgressOverlay
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Gorgon.UI
Assembly: Gorgon.Windows.dll
Syntax
public class GorgonProgressOverlay

Properties

| Edit this page View Source

IsActive

Property to return whether the overlay is active or not.

Declaration
public bool IsActive { get; }
Property Value
Type Description
bool
| Edit this page View Source

OverlayColor

Property to set or return the color of the overlay.

Declaration
public GorgonColor OverlayColor { get; set; }
Property Value
Type Description
GorgonColor
| Edit this page View Source

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 Source

Hide()

Function to hide an active overlay.

Declaration
public void Hide()
| Edit this page View Source

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().

| Edit this page View Source

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.

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author