SIL.FieldWorks.Common.Controls.ProgressDialogWithTask.m_progressDialog_Canceling C# (CSharp) Method

m_progressDialog_Canceling() protected method

Calls subscribers to the cancel event.
protected m_progressDialog_Canceling ( object sender, System.CancelEventArgs e ) : void
sender object The sender.
e System.CancelEventArgs The instance containing the event data.
return void
		protected virtual void m_progressDialog_Canceling(object sender, CancelEventArgs e)
		{
			bool cancel = true;
			if (Canceling != null)
			{
				var cea = new CancelEventArgs();
				Canceling(this, cea);
				e.Cancel = cea.Cancel;
				cancel = !cea.Cancel;
			}
			if (cancel)
				m_worker.CancelAsync();
		}