public void Refresh() { _root.GetChildren().ForEach(x => x.Dispose()); _root.Clear(); MenuItemImage loading = new MenuItemImage("loadingGif"); _root.AddChild(2, 2, 2, 5, loading); loading.SetGif(GetLoadingGif(), 12); _requests = _api.DefaultApps.Friends.GetFriendRequests().Wait(); _root.Clear(); loading.Dispose(); RenderPage(0); }
private List <Room> GetRoomList(string contains = "", bool notEmpty = false, bool notFull = false) { List <IMenuItem> items = _roomListGrid.Clear(); items.ForEach(x => x.Dispose()); CreateLoadinGif(); return(_api.Services.Room.RoomList(contains, notEmpty, notFull).Wait()); }
public void Refresh() { _root.GetChildren().ForEach(x => x.Dispose()); _root.Clear(); MenuItemImage loading = new MenuItemImage("loadingGif"); _root.AddChild(2, 2, 2, 5, loading); loading.SetGif(GetLoadingGif(), 12); _users = _api.User.CurrentRoomUsers().Wait().Users.ToList(); _users.Remove(_users.Find(x => x.UserId == _api.User.UserId)); _friends = _api.DefaultApps.Friends.ListFriends().Wait().Select(x => x.UserId).ToList(); _root.Clear(); loading.Dispose(); RenderPage(0); }