//************************************************************************* // Constructor: GraphSummaryDialog() // /// <summary> /// Initializes a new instance of the <see cref="GraphSummaryDialog" /> /// class. /// </summary> /// /// <param name="workbook"> /// Workbook containing the graph data. /// </param> //************************************************************************* public GraphSummaryDialog ( Microsoft.Office.Interop.Excel.Workbook workbook ) { Debug.Assert(workbook != null); m_oWorkbook = workbook; InitializeComponent(); PerWorkbookSettings oPerWorkbookSettings = this.PerWorkbookSettings; m_oGraphHistory = oPerWorkbookSettings.GraphHistory; m_oAutoFillWorkbookResults = oPerWorkbookSettings.AutoFillWorkbookResults; (new OverallMetricsReader()).TryReadMetrics( m_oWorkbook, out m_oOverallMetrics); (new TopNByMetricsReader()).TryReadMetrics( m_oWorkbook, out m_sTopNByMetrics); (new TwitterSearchNetworkTopItemsReader()).TryReadMetrics( m_oWorkbook, out m_sTwitterSearchNetworkTopItems); // Instantiate an object that saves and retrieves the user settings for // this dialog. Note that the object automatically saves the settings // when the form closes. m_oGraphSummaryDialogUserSettings = new GraphSummaryDialogUserSettings(this); DoDataExchange(false); AssertValid(); }
//************************************************************************* // Constructor: GraphSummaryDialog() // /// <summary> /// Initializes a new instance of the <see cref="GraphSummaryDialog" /> /// class. /// </summary> /// /// <param name="workbook"> /// Workbook containing the graph data. /// </param> //************************************************************************* public GraphSummaryDialog ( Microsoft.Office.Interop.Excel.Workbook workbook ) { Debug.Assert(workbook != null); m_oWorkbook = workbook; InitializeComponent(); PerWorkbookSettings oPerWorkbookSettings = this.PerWorkbookSettings; m_oGraphHistory = oPerWorkbookSettings.GraphHistory; m_oAutoFillWorkbookResults = oPerWorkbookSettings.AutoFillWorkbookResults; ( new OverallMetricsReader() ).TryReadMetrics( m_oWorkbook, out m_oOverallMetrics); ( new TopNByMetricsReader() ).TryReadMetrics( m_oWorkbook, out m_sTopNByMetrics); ( new TwitterSearchNetworkTopItemsReader() ).TryReadMetrics( m_oWorkbook, out m_sTwitterSearchNetworkTopItems); // Instantiate an object that saves and retrieves the user settings for // this dialog. Note that the object automatically saves the settings // when the form closes. m_oGraphSummaryDialogUserSettings = new GraphSummaryDialogUserSettings(this); DoDataExchange(false); AssertValid(); }