Exemplo n.º 1
0
        private void OnOtherPlayerNamesReceived(object sender, ClientStateEventArgs e)
        {
            string data = e.clientState.otherPlayerNames[0];

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

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

            uiUpdater.SetCard(text);
        }
Exemplo n.º 4
0
 public ClientNew(IPAddress IPAddress, int _port, string username, ClientState client)
 {
     ipAddress   = IPAddress;
     port        = _port;
     clientState = client;
     clientArgs  = new ClientStateEventArgs();
 }
Exemplo n.º 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);
        }
Exemplo n.º 6
0
        private void Client_UserCardsReceived(object sender, ClientStateEventArgs e)
        {
            List <UNOCard> userCards = e.userCards;

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