void client_UpdateGameStateCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { //Get game state. ServiceReference1.Service1Client client = new ServiceReference1.Service1Client(); client.GetGameStateCompleted += client_GetGameStateCompleted; client.GetGameStateAsync(tellerLobbyID); }
void newTimer_Tick(object sender, EventArgs e) { ServiceReference1.Service1Client client = new ServiceReference1.Service1Client(); client.GetGameStateCompleted += client_GetGameStateCompleted; //Get game state. client.GetGameStateAsync(tellerLobbyID); if (aantalSpelers == 4 && tellerAantalPinguins == 8 || aantalSpelers == 3 && tellerAantalPinguins == 9 || aantalSpelers == 2 && tellerAantalPinguins == 8) { if (ChangeOpzetFaceFirstTime == false) //Zo weten we wanneer er de opzetface gedaan is. { //Verander opzet fase naar speel fase. //ServiceReference1.Service1Client client = new ServiceReference1.Service1Client(); client.ChanceOpzetFaseCompleted += new EventHandler <ServiceReference1.ChanceOpzetFaseCompletedEventArgs>(client_ChanceOpzetFaseCompleted); client.ChanceOpzetFaseAsync(); opZetFace = false; ChangeOpzetFaceFirstTime = true; } } if (kleurAanDeBeurt == kleurVanSpeler) { kanNogSpelen++; } else { kanNogSpelen = 0; } if (kanNogSpelen == 15 || kanNogSpelen == 5) { MessageBox.Show("You have " + Convert.ToInt32(30 - kanNogSpelen) + "sec to play!"); } }