GraphMetricCalculationManager_GraphMetricCalculationProgressChanged
(
object sender,
ProgressChangedEventArgs e
)
{
Debug.Assert(e.UserState is GraphMetricProgress);
AssertValid();
GraphMetricProgress oGraphMetricProgress =
(GraphMetricProgress)e.UserState;
lblStatus.Text = oGraphMetricProgress.ProgressMessage;
pbProgress.Value = e.ProgressPercentage;
if (oGraphMetricProgress.AllGraphMetricsCalculated)
{
// Writing to the workbook will occur shortly within the
// GraphMetricCalculationCompleted handler. Writing can't be
// cancelled, so disable the cancel button.
btnCancel.Enabled = false;
}
}