public Form1() { InitializeComponent(); for (int i = 1; File.Exists("zsrc\\yay" + i + ".wav"); i++) { SoundPlayer p = new SoundPlayer("zsrc\\yay" + i + ".wav"); yay.Add(p); } hs = new HighScore(); hs.FormClosed += new FormClosedEventHandler(hs_FormClosed); }
void hs_FormClosed(object sender, FormClosedEventArgs e) { checkHighScores(); hs.Dispose(); hs = new HighScore(); hs.FormClosed += new FormClosedEventHandler(hs_FormClosed); }