private void OnCommand_Error(object sender, ErrorEventArgs e)
		{
			if (e.Exception == null)
			{
				if (NeedInvoke())
				{
					_parentForm.BeginInvoke(new MethodInvoker(FinishWithUnspecifiedError));
				}
				else
				{
					FinishWithUnspecifiedError();
				}
			}
			else
			{
				if (_parentForm != null && NeedInvoke())
				{
					_parentForm.BeginInvoke(new ExceptionMethodInvoker(Finish), new object[] {e.Exception});
				}
				else
				{
					Finish(e.Exception);
				}
			}
		}
Пример #2
0
		/// <summary>
		/// Raises the Error event
		/// </summary>
		/// <param name="e">Event data</param>
		protected void OnError( ErrorEventArgs e )
		{
			ErrorEventHandler error = Error;
			if( error != null )
			{
				error( this, e );
			}
		}