Skip to content

Instantly share code, notes, and snippets.

@johnkchow
Created February 1, 2011 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnkchow/806968 to your computer and use it in GitHub Desktop.
Save johnkchow/806968 to your computer and use it in GitHub Desktop.
private delegate void MyEventHandler();
private void DownloadUpdates(MyEventHandler OnUpdate, MyEventHandler OnFinish)
{
try
{
SetProgress(5);
MessageLabel.Do(ctl => ctl.Text = AvailableUpdate.DownloadingUpdateLabelText);
//software updates always take precedence over data updates
SetProgress(50);
OnUpdate();
SetProgress(100);
OnFinish();
}
catch (Exception e)
{
// error handler code here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment