private void SoundButton_Click(object sender, RoutedEventArgs e) { if (sound == null) { sound = new SoundWindow { Owner = this }; sound.Closing += new CancelEventHandler((object s, CancelEventArgs e2) => { Focus(); sound = null; }); sound.Load(new SDAT(ROMUtils.GetFile("sound_data.sdat", LoadedROM.ToFileSystem()))); sound.Show(); } else { sound.Focus(); } }