private void LoadSavedGame(object sender, RoutedEventArgs e) { Button btnEvent = (Button)sender; int iId = Convert.ToInt32(btnEvent.Uid); LoadSaveHandler loadHandler = new LoadSaveHandler(); loadHandler.LoadGame(filePaths[iId]); LoadGame loadGame = new LoadGame(); loadGame.Show(); this.Close(); }