/// <summary> /// Main for quick report. /// </summary> /// <param name="xlApp">Excel Application</param> public static void QuickReportMain(Excel.Application xlApp) { // Get Data to show in form string openXlFileName = xlApp.ActiveWorkbook.FullName; DataTable dataTable = DataTableCreation.CreateDataTable(openXlFileName); BreastFeedingData breastFeedingData = new BreastFeedingData(dataTable); // Create and open form QuickReportWindow reportWindow = new QuickReportWindow(breastFeedingData); reportWindow.Show(); }
/// <summary> /// Initializes a new instance of the <see cref="QuickReportWindow"/> class. /// </summary> /// <param name="breastFeedingData">One month's worth of data</param> public QuickReportWindow(BreastFeedingData breastFeedingData) { this.InitializeComponent(); this.breastFeedingData = breastFeedingData ?? throw new ArgumentNullException(nameof(breastFeedingData)); }