コード例 #1
0
 protected override void OnCancel()
 {
     const string message = "Exit";
     MessageBoxScreen confirmExitMessageBox = new MessageBoxScreen(message);
     confirmExitMessageBox.Accepted += ConfirmExitMessageBoxAccepted;
     ScreenManager.AddScreen(confirmExitMessageBox);
 }
コード例 #2
0
 void AnswerSelected(object sender, SelectedIndexEventArgs e)
 {
     MenuEntry menuEntry = (MenuEntry)sender;
     if (menuEntry.Text == Table.Rows[RowIndex].ItemArray[2].ToString())
     {
         MessageBoxScreen passMsgBoxScreen = new MessageBoxScreen("Congratz!", false);
         Level.Score += 100;
         passMsgBoxScreen.Accepted += ConfirmMessageBox;
         ScreenManager.AddScreen(passMsgBoxScreen);
     }
     else
     {
         MessageBoxScreen failMsgBoxScreen = new MessageBoxScreen("Sorry, the correct answer was: \n" + Table.Rows[RowIndex].ItemArray[2].ToString(), false);
         failMsgBoxScreen.Accepted += ConfirmMessageBox;
         ScreenManager.AddScreen(failMsgBoxScreen);
     }
     ExitScreen();
 }