public
Created

  • Download Gist
myeventhandler.cs
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
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
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.