Beispiel #1
0
 private void button5_Click(object sender, EventArgs e)
 {
     MonopolyDealServiceReference.PropertyCardSet pcs = null;
     MonopolyDealServiceReference.PropertyCard    pc  = null;
     if (playerIDNum == 0)
     {
         pc  = listBoxPlayer0Hand.SelectedValue as MonopolyDealServiceReference.PropertyCard;
         pcs = listBoxPSetsP0.SelectedValue as MonopolyDealServiceReference.PropertyCardSet;
     }
     else if (playerIDNum == 1)
     {
         pc  = listBoxPlayer1Hand.SelectedValue as MonopolyDealServiceReference.PropertyCard;
         pcs = listBoxPSetsP1.SelectedValue as MonopolyDealServiceReference.PropertyCardSet;
     }
     else if (playerIDNum == 2)
     {
         pc  = listBoxPlayer2Hand.SelectedValue as MonopolyDealServiceReference.PropertyCard;
         pcs = listBoxPSetsP2.SelectedValue as MonopolyDealServiceReference.PropertyCardSet;
     }
     else if (playerIDNum == 3)
     {
         pc  = listBoxPlayer3Hand.SelectedValue as MonopolyDealServiceReference.PropertyCard;
         pcs = listBoxPSetsP3.SelectedValue as MonopolyDealServiceReference.PropertyCardSet;
     }
     else if (playerIDNum == 4)
     {
         pc  = listBoxPlayer4Hand.SelectedValue as MonopolyDealServiceReference.PropertyCard;
         pcs = listBoxPSetsP4.SelectedValue as MonopolyDealServiceReference.PropertyCardSet;
     }
     if (pc != null && pcs != null)
     {
         requestHandlerMD.playPropertyToSelectedSet(pc, pcs);
     }
     //Update State
     buttonPollMD_Click(null, null);
 }