GraphMetricCalculationManager_GraphMetricCalculationCompleted
(
object sender,
RunWorkerCompletedEventArgs e
)
{
AssertValid();
Exception oException = e.Error;
if (oException != null)
{
if (oException is GraphMetricException)
{
// This is a known exception.
this.ShowWarning(oException.Message);
}
else
{
// The exception is unexpected.
ErrorUtil.OnException(oException);
}
}
else if (!e.Cancelled)
{
Debug.Assert( e.Result is GraphMetricColumn[] );
WriteGraphMetricColumnsToWorkbook(
( GraphMetricColumn[] )e.Result );
// Everything succeeded.
this.DialogResult = DialogResult.OK;
}
this.Close();
}