private void StopProgressOnCancel(SynchronizationContext sync, SendingProgressForm form) { SendOrPostCallback c = (state) => { MessageBox.Show("Cancelled"); form.Close(); }; sync.Post(c, null); }
private void CompleteProgress(SynchronizationContext sync, SendingProgressForm form) { SendOrPostCallback c = (state) => { form.To100(); MessageBox.Show("Completed"); form.Close(); }; sync.Post(c, null); }