Smrf.NodeXL.ExcelTemplate.CalculateGraphMetricsDialog.CalculateGraphMetricsDialog C# (CSharp) Method

CalculateGraphMetricsDialog() public method

Initializes a new instance of the class with a default list of graph metric calculators.
public CalculateGraphMetricsDialog ( IGraph graph, Microsoft workbook ) : System
graph IGraph /// Graph to calculate the graph metrics for, or null. If null, the graph /// is read from . ///
workbook Microsoft /// Workbook where the graph metrics will get written. If is null, the graph is read from this workbook, too. ///
return System
    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();
    }

Same methods

CalculateGraphMetricsDialog::CalculateGraphMetricsDialog ( IGraph graph, Microsoft workbook, IGraphMetricCalculator2 graphMetricCalculators, String dialogTitle, Boolean activateRelevantWorksheetWhenDone ) : System