private void OnOtherPlayerNamesReceived(object sender, ClientStateEventArgs e) { string data = e.clientState.otherPlayerNames[0]; Debug.WriteLine("Setting name!"); uiUpdater.SetText(data); }
private void Client_CurrentCardReceived(object sender, ClientStateEventArgs e) { Debug.WriteLine("CurrentCard received"); UNOCard currentCard = e.currentCard; backgroundWorker2.RunWorkerAsync(currentCard); }
private void OnCurrentCardReceived(object sender, ClientStateEventArgs e) { UNOCard card = e.clientState.currentCard; string text = GetImageName(card); uiUpdater.SetCard(text); }
public ClientNew(IPAddress IPAddress, int _port, string username, ClientState client) { ipAddress = IPAddress; port = _port; clientState = client; clientArgs = new ClientStateEventArgs(); }
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); }
private void Client_UserCardsReceived(object sender, ClientStateEventArgs e) { List <UNOCard> userCards = e.userCards; backgroundWorker1.RunWorkerAsync(userCards); }
private void Client_OtherPlayerCardsReceived(object sender, ClientStateEventArgs e) { Debug.WriteLine("OtherPlayerCards Received"); }
private void OnCurrentCardReceived(object sender, ClientStateEventArgs e) { //string text = GetImageName(card); //uiUpdater.SetCard(text); }