コード例 #1
0
        private void buttonJustSayNo_Click(object sender, EventArgs e)
        {
            int cardIDOfCardToUse = -1;

            if (listBox1.Items.Count != 0)
            {
                MonopolyDealServiceReference.ActionCard card = listBox1.SelectedValue as MonopolyDealServiceReference.ActionCard;
                if (card != null)
                {
                    cardIDOfCardToUse = card.cardID;
                    if (card.actionType.CompareTo(MonopolyDealServiceReference.ActionCardAction.JustSayNo) == 0)
                    {
                        requestHandlerMD.justSayNo(cardIDOfCardToUse);
                    }
                }
            }
            else
            {
                buttonJustSayNo.Enabled = false;
            }
            //Update State
            buttonPollMD_Click(null, null);
        }