Ejemplo n.º 1
0
 public void ChallengeCanceled(int identity)
 {
     if (this._challenges.ContainsKey(identity))
     {
         ChallengeForm challenge = this._challenges[identity];
         this._challenges.Remove(identity);
         MethodInvoker methodInvokerDelegate = delegate() { challenge.Close(); };
         challenge.Invoke(methodInvokerDelegate);
     }
 }
Ejemplo n.º 2
0
 public void ChallengeAccepted()
 {
     this._roomClient.StartBattle(this._myChallenge.TargetInfo.Identity, this._myChallenge.ChallengeInfo);
     if (this._myChallenge != null)
     {
         ChallengeForm form = this._myChallenge;
         this._myChallenge = null;
         MethodInvoker methodInvokerDelegate = delegate() { form.Close(); };
         form.Invoke(methodInvokerDelegate);
     }
 }
Ejemplo n.º 3
0
 public void ChallengeRefused()
 {
     if (this._myChallenge != null)
     {
         ChallengeForm form = this._myChallenge;
         this._myChallenge = null;
         MethodInvoker methodInvokerDelegate = delegate() {
             form.Close();
             MessageBox.Show("对方拒绝了你的挑战", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
         };
         form.Invoke(methodInvokerDelegate);
     }
 }