public AllCompetitorResults(RiderManager rm) { this.rm = rm; InitializeComponent(); richTextBox1.ReadOnly = true; richTextBox1.SelectionFont = new Font(richTextBox1.Font, FontStyle.Bold); //Set the font to bold richTextBox1.AppendText("Summary for all riders"); richTextBox1.SelectionFont = new Font(richTextBox1.Font, FontStyle.Regular); //Retrives all the riders results/summary richTextBox1.AppendText(rm.GetRidersSummary()); }
private void btnExport_Click(object sender, EventArgs e) { //AllCompetitorResults form closes and Export form appears when Export button is clicked StreamWriter sw = new StreamWriter("AllCompetitorResults.txt", true); sw.WriteLine("Summary for all riders" + "\n" + rm.GetRidersSummary()); sw.Close(); this.Hide(); Export window = new Export(rm); window.FormClosed += (s, args) => this.Close(); window.Show(); }