示例#1
0
        private void OnOtherPlayerNamesReceived(object sender, ClientStateEventArgs e)
        {
            string data = e.clientState.otherPlayerNames[0];

            Debug.WriteLine("Setting name!");
            uiUpdater.SetText(data);
        }
示例#2
0
        private void Client_CurrentCardReceived(object sender, ClientStateEventArgs e)
        {
            Debug.WriteLine("CurrentCard received");
            UNOCard currentCard = e.currentCard;

            backgroundWorker2.RunWorkerAsync(currentCard);
        }
示例#3
0
        private void OnCurrentCardReceived(object sender, ClientStateEventArgs e)
        {
            UNOCard card = e.clientState.currentCard;
            string  text = GetImageName(card);

            uiUpdater.SetCard(text);
        }
示例#4
0
 public ClientNew(IPAddress IPAddress, int _port, string username, ClientState client)
 {
     ipAddress   = IPAddress;
     port        = _port;
     clientState = client;
     clientArgs  = new ClientStateEventArgs();
 }
示例#5
0
        private void OnUserCardsReceived(object sender, ClientStateEventArgs e)
        {
            StringBuilder stringBuilder = new StringBuilder();

            foreach (UNOCard card in e.clientState.userCards)
            {
                int data = card.GetColor();
                Constants.Colors colors = (Constants.Colors)data;
                stringBuilder.Append(colors.ToString());
            }
            uiUpdater.SetText(stringBuilder.ToString());
            UNOCard _card = e.clientState.userCards[0];
            string  text  = GetImageName(_card);

            //uiUpdater.SetCard(text);
            backgroundWorker1.RunWorkerAsync(text);
        }
示例#6
0
        private void Client_UserCardsReceived(object sender, ClientStateEventArgs e)
        {
            List <UNOCard> userCards = e.userCards;

            backgroundWorker1.RunWorkerAsync(userCards);
        }
示例#7
0
 private void Client_OtherPlayerCardsReceived(object sender, ClientStateEventArgs e)
 {
     Debug.WriteLine("OtherPlayerCards Received");
 }
示例#8
0
 private void OnCurrentCardReceived(object sender, ClientStateEventArgs e)
 {
     //string text = GetImageName(card);
     //uiUpdater.SetCard(text);
 }