Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/uzitech/progressdialog

C# Multi-threaded background worker with dialog to show progress
https://github.com/uzitech/progressdialog

Last synced: 16 days ago
JSON representation

C# Multi-threaded background worker with dialog to show progress

Awesome Lists containing this project

README

        

ProgressDialog
==============

C# Multi-threaded background worker with dialog to show progress

Usage
=====
```c#
ProgressDialog pDialog = new ProgressDialog();
pDialog.Title = "Progress Title";
pDialog.DoWork += delegate(object dialog, DoWorkEventArgs dwe)
{
for (int i = 0; i < (int)dwe.Argument; i++)
{
pDialog.ReportProgress(i);
Thread.Sleep(100);
}
};
pDialog.ProgressChanged += delegate(object dialog, ProgressChangedEventArgs pce) {
pDialog.Message = pce.ProgressPercentage + "/100";
pDialog.Progress = pce.ProgressPercentage % 100;
};
pDialog.Completed += delegate(object dialog, RunWorkerCompletedEventArgs e) {
MessageBox.Show("Completed");
};
pDialog.Run(100);
```