コード例 #1
0
 public async Task ReloadUsers()
 {
     var chatStatus = await _chatServiceProxy.GetOnlineUsers(new GetOnlineUsersRequest());
     OnlineUsers.Clear();
     if (chatStatus.Users != null)
     {
         OnlineUsers.AddRange(chatStatus.Users);
     }
コード例 #2
0
ファイル: ChatManager.cs プロジェクト: jvasquez230/CrossChat
        /// <summary>
        /// Reloads only online players
        /// </summary>
        public async Task ReloadUsers()
        {
            var chatStatus = await _chatServiceProxy.GetOnlineUsers(new GetOnlineUsersRequest());

            OnlineUsers.Clear();
            if (chatStatus.Users != null)
            {
                OnlineUsers.AddRange(chatStatus.Users);
            }

            //for screenshots ;)

            /*OnlineUsers.Add(new UserDto { Name = "Tim Cook", Country = "United States", Platform = "iOS" });
             * OnlineUsers.Add(new UserDto { Name = "Eric Schmidt", Country = "United States", Platform = "Android" });
             * OnlineUsers.Add(new UserDto { Name = "Satya Nadella", Country = "United States", Platform = "WP8" });
             * OnlineUsers.Add(new UserDto { Name = "Miguel de Icaza", Country = "United States", Platform = "iOS" });
             * OnlineUsers.Add(new UserDto { Name = "Egor Bogatov", Country = "Belarus", Platform = "Nokia 3310" });*/
        }
コード例 #3
0
        private void ShowOnlineUsers()
        {
            IEnumerable <User> users = UserProcessor.GetOnlineUsers();

            OnlineUsers.AddRange(users);
        }