public CalculateGraphMetricsDialog
(
IGraph graph,
Microsoft.Office.Interop.Excel.Workbook workbook
)
{
InitializeComponent();
// Instantiate an object that saves and retrieves the position of this
// dialog. Note that the object automatically saves the settings when
// the form closes.
m_oCalculateGraphMetricsDialogUserSettings =
new CalculateGraphMetricsDialogUserSettings(this);
m_oGraph = graph;
m_oWorkbook = workbook;
m_oGraphMetricCalculators = null;
m_bActivateRelevantWorksheetWhenDone = true;
m_oGraphMetricCalculationManager = new GraphMetricCalculationManager();
m_oGraphMetricCalculationManager.GraphMetricCalculationProgressChanged
+= new ProgressChangedEventHandler(
GraphMetricCalculationManager_GraphMetricCalculationProgressChanged);
m_oGraphMetricCalculationManager.GraphMetricCalculationCompleted +=
new RunWorkerCompletedEventHandler(
GraphMetricCalculationManager_GraphMetricCalculationCompleted);
DoDataExchange(false);
// Assume that calculations will not succeed.
this.DialogResult = DialogResult.Cancel;
AssertValid();
}