Re: ProgressBar incremented from outside of Form
- From: "Thomas T. Veldhouse" <veldy71@xxxxxxxxx>
- Date: Thu, 30 Nov 2006 19:02:41 GMT
mamin@xxxxx wrote:
I have, the following question:
I have a WindowsForm with ProgressBar progressBar1 and Button button1.
After onClick event on button the following method executes:
button_Click(object sender, EventArgs e)
{
DatabaseOperations.ClearDatabase();
}
where ClearDatabase() is static method which should increment my
progress bar. How can I increment my progress bar without giving
ProgressBar object as parameter( I mean without using
ClearDatabase(progressBar1); - it doesn't seem to be a good way)
I think the issue is that ClearDatabase() should probably NOT be static. You
could create a database "engine" and then have an event on it to indicate
status, completion, what have you. Then subscribe to them from your UI and
have the event handler post to the progress bar.
--
Thomas T. Veldhouse
Key Fingerprint: D281 77A5 63EE 82C5 5E68 00E4 7868 0ADC 4EFB 39F0
.
- Follow-Ups:
- Re: ProgressBar incremented from outside of Form
- From: Jon Skeet [C# MVP]
- Re: ProgressBar incremented from outside of Form
- References:
- ProgressBar incremented from outside of Form
- From: mamin
- ProgressBar incremented from outside of Form
- Prev by Date: Re: ProgressBar incremented from outside of Form
- Next by Date: Re: TinyInt or Char(1)?
- Previous by thread: Re: ProgressBar incremented from outside of Form
- Next by thread: Re: ProgressBar incremented from outside of Form
- Index(es):