コード例 #1
0
 /// <summary>
 /// Event handler for when the user selects ok on the "are you sure
 /// you want to exit" message box.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="PlayerIndexEventArgs" /> instance containing the event data.</param>
 private void ConfirmExitMessageBoxAccepted(object sender, PlayerIndexEventArgs e)
 {
     this.ScreenManager.Game.Exit();
 }
コード例 #2
0
 /// <summary>
 /// Helper overload makes it easy to use OnCancel as a MenuEntry event handler.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="PlayerIndexEventArgs"/> instance containing the event data.</param>
 protected void OnCancel(object sender, PlayerIndexEventArgs e)
 {
     this.OnCancel(e.PlayerIndex);
 }
コード例 #3
0
 /// <summary>
 /// Event handler for when the Play Game menu entry is selected.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="PlayerIndexEventArgs" /> instance containing the event data.</param>
 private void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 {
     this.ScreenManager.AddScreen(new PlayerSelectScreen(), e.PlayerIndex);
 }