//Generate Combined Result button######################################### private void button9_Click(object sender, EventArgs e) { GroupingResults GR = new GroupingResults(); List<ResultsGroup>[] results = new List<ResultsGroup>[oFDResults.FileNames.Count()]; for (int i = 0; i < oFDResults.FileNames.Count(); i++) { results[i] = GR.ReadResultsFromFile(oFDResults.FileNames[i]); } List<ResultsGroup> Answer = new List<ResultsGroup>(); Answer = GR.CombineResults(results); List<ResultsGroup>[] Ans = { Answer }; DataTable DT = toDataTable(Ans, 0); dataGridView3.DataSource = DT; }
private void oFDResults_FileOk(object sender, CancelEventArgs e) { String fileInfo = ""; Stream mystream = null; try { if ((mystream = oFDResults.OpenFile()) != null) { foreach (String file in oFDResults.FileNames) { fileInfo += String.Format("{0}\n", file); } } } catch (Exception ex) { MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message); } mystream.Close(); richTextBox2.Font = new Font("Times New Roman", 12); richTextBox2.Text = fileInfo; button9.Enabled = true; button2.Enabled = true; GroupingResults GR = new GroupingResults(); List<ResultsGroup>[] ResultStore = new List<ResultsGroup>[oFDResults.FileNames.Count()]; for (int i = 0; i < oFDResults.FileNames.Count(); i++) { ResultStore[i] = GR.ReadResultsFromFile(oFDResults.FileNames[i]); } AllFinalResults = ResultStore; }