Exemple #1
0
 //Kies een playroom waarbij je jezelf wil aanmelden
 private void lstPlayRooms_SelectionChanged_1(object sender, SelectionChangedEventArgs e)
 {
     //Als voorbeeld gaan we speler 2 laten aanmelden in de playroom
     ServiceCloud.OPlayer p2 = new ServiceCloud.OPlayer()
     {
         PlayerId = 2, PlayerName = "Tim"
     };
     ServiceCloud.OLobbyRoom o = (ServiceCloud.OLobbyRoom)((ListBox)(sender)).SelectedItem;
     client.SubscribeToLobbyRoomAsync(p2, o.theLobby.LobbyId, o.hostPlayer.PlayerId);
 }
Exemple #2
0
        /* void client_GetAllPlayersCompleted(object sender, ServiceCloud.GetAllPlayersCompletedEventArgs e)
         * {
         *   foreach (var item in e.Result)
         *   //ExistingPLayerList.Add(item.ToString());
         *   //foreach (var item in ExistingPLayerList)
         *   {
         *       if (item.Replace(" ", string.Empty) == exstplyrbox.Text)
         *       {
         *           MessageBox.Show("Logged In");
         *           btnCheckforlobies.IsEnabled = true;
         *           client.CurrentPlayerCompleted += client_CurrentPlayerCompleted;
         *
         *       }
         *   }
         * }*/

        void client_CurrentPlayerCompleted(object sender, ServiceCloud.CurrentPlayerCompletedEventArgs e)
        {
            me = (ServiceCloud.OPlayer)e.Result;
        }