Class SharpProgressDialog
A progress dialog.
Implements
Inherited Members
Namespace: SharpDialogs
Assembly: SharpDialogs.dll
Syntax
public class SharpProgressDialog : IDisposable
Constructors
| Edit this page View SourceSharpProgressDialog(nint, string?, string?, bool, bool)
Creates a progress dialog.
Declaration
public SharpProgressDialog(nint hwndParent, string? title, string? cancelMessage = null, bool allowCancel = true, bool showTime = true)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | hwndParent | The handle of the owner window. |
| string | title | The title of the dialog. |
| string | cancelMessage | The cancel message of the dialog. |
| bool | allowCancel | Shows a cancel button. |
| bool | showTime | Shows the progress time. |
Methods
| Edit this page View SourceDispose()
Disposes the dialog.
Declaration
public void Dispose()
HasUserCancelled()
Tests whether the user has cancelled the dialog.
Declaration
public bool HasUserCancelled()
Returns
| Type | Description |
|---|---|
| bool | Returns whether the user has cancelled the dialog. |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException |
PauseTimer()
Pauses the progress timer.
Declaration
public void PauseTimer()
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException |
ResetTimer()
Resets the progress timer.
Declaration
public void ResetTimer()
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException |
ResumeTimer()
Resumes the progress timer.
Declaration
public void ResumeTimer()
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException |
SetLine1(string, bool)
Sets the text of the first line of the dialog.
Declaration
public void SetLine1(string text, bool compactPath = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The text. |
| bool | compactPath | A value indicating whether the line is a path to compact. |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException |
SetLine2(string, bool)
Sets the text of the second line of the dialog.
Declaration
public void SetLine2(string text, bool compactPath = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The text. |
| bool | compactPath | A value indicating whether the line is a path to compact. |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException |
SetProgress(ulong, ulong)
Sets the progress of the dialog.
Declaration
public void SetProgress(ulong completed, ulong total)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | completed | The completed value. |
| ulong | total | The total value. |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException |