Ejemplo n.º 1
0
 private void OnMessageBoxAnswered(MessageBoxAnsweredEventArgs mba)
 {
     if (MessageBoxAnswered != null)
     {
         MessageBoxAnswered(this, mba);
     }
 }
Ejemplo n.º 2
0
        private void m_FormGame_MessageBoxAnswered(object sender, EventArgs e)
        {
            MessageBoxAnsweredEventArgs mba = e as MessageBoxAnsweredEventArgs;

            if (mba.IsAnsweredYes)
            {
                m_AmericanCheckers_NewGameStarted(sender, e);
            }
            else
            {
                m_FormGame.Close();
            }
        }
Ejemplo n.º 3
0
        public void CreateYesNoMessageBox(string i_MessageBoxString, string i_Caption)
        {
            DialogResult dialogResult = MessageBox.Show(i_MessageBoxString, i_Caption, MessageBoxButtons.YesNo);
            MessageBoxAnsweredEventArgs mba;
            bool isMessageBoxAnswerIsYes = false;

            if (dialogResult == DialogResult.Yes)
            {
                isMessageBoxAnswerIsYes = true;
            }
            else if (dialogResult == DialogResult.No)
            {
                isMessageBoxAnswerIsYes = false;
            }

            mba = new MessageBoxAnsweredEventArgs(isMessageBoxAnswerIsYes);
            OnMessageBoxAnswered(mba);
        }