private void button3_Click(object sender, EventArgs e) { highscores high = new highscores(); save(high); if (easy.Checked) { high.update(chart1, high.easy); } else if (medium.Checked) { high.update(chart1, high.easy); } else { high.update(chart1, high.easy); } obj = high; }
private void button1_Click(object sender, EventArgs e) { if (easy.Checked) { Form2 form2 = new Form2("easy"); form2.ShowDialog(); obj.easy.Add(form2.score); obj.update(chart1, obj.easy); } else if (medium.Checked) { Form2 form2 = new Form2("medium"); form2.ShowDialog(); obj.medium.Add(form2.score); obj.update(chart1, obj.medium); } else { Form2 form2 = new Form2("hard"); form2.ShowDialog(); obj.hard.Add(form2.score); obj.update(chart1, obj.hard); } save(obj); }
private void Form1_Load(object sender, EventArgs e) { obj = load(); obj.update(chart1, obj.easy); }