private void button2_Click(object sender, EventArgs e) { var next = new explanation_examples(); next.Show(); this.Hide(); }
public Results(explanation_examples ex_form) { InitializeComponent(); full_explanation_form = ex_form; this.FormBorderStyle = FormBorderStyle.None; this.WindowState = FormWindowState.Maximized; full_explanation_form.FormBorderStyle = FormBorderStyle.FixedSingle; full_explanation_form.WindowState = FormWindowState.Normal; this.axWindowsMediaPlayer1.URL = System.IO.Path.Combine(Application.StartupPath, "ai_one.mp4"); this.axWindowsMediaPlayer2.URL = System.IO.Path.Combine(Application.StartupPath, "ai_two.mp4"); this.axWindowsMediaPlayer1.Ctlcontrols.stop(); this.axWindowsMediaPlayer2.Ctlcontrols.stop(); int good_ship = 0; int good_alien = 0; int good_barrier = 0; int good_bullet = 0; foreach (var ex in ex_form.good_explanations) { good_ship += Convert.ToInt32(ex.ship); good_alien += Convert.ToInt32(ex.alien); good_barrier += Convert.ToInt32(ex.barrier); good_bullet += Convert.ToInt32(ex.bullets); } this.lbl_ONE_ship.Text = good_ship.ToString(); this.lbl_ONE_aliens.Text = good_alien.ToString(); this.lbl_ONE_barrier.Text = good_barrier.ToString(); this.lbl_ONE_bullets.Text = good_bullet.ToString(); int bad_ship = 0; int bad_alien = 0; int bad_barrier = 0; int bad_bullet = 0; foreach (var ex in ex_form.bad_explanations) { bad_ship += Convert.ToInt32(ex.ship); bad_alien += Convert.ToInt32(ex.alien); bad_barrier += Convert.ToInt32(ex.barrier); bad_bullet += Convert.ToInt32(ex.bullets); } this.lbl_TWO_ship.Text = bad_ship.ToString(); this.lbl_TWO_aliens.Text = bad_alien.ToString(); this.lbl_TWO_barrier.Text = bad_barrier.ToString(); this.lbl_TWO_bullets.Text = bad_bullet.ToString(); string[] xData = new string[] { "alien", "bullet", "ship", "barrier" }; int[] yData = new int[] { good_alien, good_bullet, good_ship, good_barrier }; int[] yData2 = new int[] { bad_alien, bad_bullet, bad_ship, bad_barrier }; //Create a series using the data Series barSeries = new Series(); barSeries.Points.DataBindXY(xData, yData); barSeries.Name = "AI ONE"; barSeries.ChartType = SeriesChartType.Column; chart1.Series.Add(barSeries); Series barSeries2 = new Series(); barSeries2.Points.DataBindXY(xData, yData2); barSeries2.Name = "AI TWO"; barSeries2.ChartType = SeriesChartType.Column; chart1.Series.Add(barSeries2); chart1.Titles.Add("What AI ONE/TWO pays attention to:"); }