public void onJoinRoomDone(RoomEvent eventObj) { if (eventObj.getResult() == WarpResponseResultCode.SUCCESS) { _page.showResult("joined room!"); //WarpClient.GetInstance().SubscribeRoom(eventObj.getData().getId()); } else { _page.showResult("failed to join room!"); } }
public void onGetAllRoomsDone(AllRoomsEvent eventObj) { int _length = eventObj.getRoomIds().Length; _page.showResult("rooms are " + _length); string[] Str = new string[_length]; //public byte eventObj.getResult(); //public String[] s = eventObj.getRoomIds(); for (int j = 0; j < _length; j++) { Str[j] = eventObj.getRoomIds()[j]; //Deployment.Current.Dispatcher.BeginInvoke(() => //{ // HyperlinkButton b = new HyperlinkButton(); // b.Content = Str[j]; // b.Click += new RoutedEventHandler(_page.b_Click); // _page.list.Add(b); //}); //HyperlinkButton b = new HyperlinkButton(); //b.Content = Str[j]; //b.Click += new RoutedEventHandler(_page.b_Click); //RoomsListPage.list.Add(b); } Deployment.Current.Dispatcher.BeginInvoke(() => { _page.createRoomsList(Str); //викликаємо процедуру створення списку кімеат }); //for (int i = 0; i < _length; i++) //{ // //Str[i] = eventObj.getRoomIds()[i]; // Deployment.Current.Dispatcher.BeginInvoke(() => // { // HyperlinkButton b = new HyperlinkButton(); // b.Content = Str[i]; // b.Click += new RoutedEventHandler(_page.b_Click); // list.Add(b); // }); // //event.getRoomIds()[i] //} //foreach (string s in Str) //{ // //WarpClient.GetInstance().GetLiveRoomInfo(s); // Deployment.Current.Dispatcher.BeginInvoke(() => // { // HyperlinkButton b = new HyperlinkButton(); // b.Content = s; // b.Click += new RoutedEventHandler(_page.b_Click); // list.Add(b); // }); //} //Deployment.Current.Dispatcher.BeginInvoke(() => //{ // _page.listBox1.ItemsSource = list; //}); }