//************************************************************************* // Constructor: GraphMetricsDialog() // /// <summary> /// Initializes a new instance of the <see cref="GraphMetricsDialog" /> /// class. /// </summary> /// /// <param name="mode"> /// Indicates the mode in which the dialog is being used. /// </param> /// /// <param name="workbook"> /// Workbook containing the graph contents. /// </param> //************************************************************************* public GraphMetricsDialog ( DialogMode mode, Microsoft.Office.Interop.Excel.Workbook workbook ) { InitializeComponent(); m_eMode = mode; m_oWorkbook = workbook; m_oGraphMetricUserSettings = new GraphMetricUserSettings(); // 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_oGraphMetricsDialogUserSettings = new GraphMetricsDialogUserSettings(this); if (m_eMode == DialogMode.EditOnly) { this.Text += " Options"; btnOK.Text = "OK"; } clbGraphMetrics.Items.AddRange( GraphMetricInformation.GetAllGraphMetricInformation()); clbGraphMetrics.SetSelected(0, true); DoDataExchange(false); AssertValid(); }
//************************************************************************* // Constructor: GraphMetricsDialog() // /// <summary> /// Initializes a new instance of the <see cref="GraphMetricsDialog" /> /// class. /// </summary> /// /// <param name="mode"> /// Indicates the mode in which the dialog is being used. /// </param> /// /// <param name="workbook"> /// Workbook containing the graph contents. /// </param> //************************************************************************* public GraphMetricsDialog ( DialogMode mode, Microsoft.Office.Interop.Excel.Workbook workbook ) { InitializeComponent(); m_eMode = mode; m_oWorkbook = workbook; m_oGraphMetricUserSettings = new GraphMetricUserSettings(); // 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_oGraphMetricsDialogUserSettings = new GraphMetricsDialogUserSettings(this); if (m_eMode == DialogMode.EditOnly) { this.Text += " Options"; btnOK.Text = "OK"; } clbGraphMetrics.Items.AddRange( GraphMetricInformation.GetAllGraphMetricInformation() ); clbGraphMetrics.SetSelected(0, true); DoDataExchange(false); AssertValid(); }