public void SetMenberList(List <User> userList) { this.memberList = userList; for (int i = 0; i < userList.Count; i++) { var userItem = userList[i]; this.SP_MenberList.Children.Add(UserInfoItem.GotyeUserToUserInfoItem(userItem)); } }
private void SetFriendItemAction(object sender, System.Timers.ElapsedEventArgs e) { for (int i = 0; i < friendList.Count; i++) { Thread.Sleep(100); this.Dispatcher.Invoke(DispatcherPriority.Send, new Action( delegate { var item = UserInfoItem.GotyeUserToUserInfoItem(friendList[i]); this.SL_FriendList.AddItem(item); })); } }
public void ShowResult(bool result, Object resultUI) { this.SP_Result.Children.Clear(); if (result == false) { TextBlock textBlock = new TextBlock(); textBlock.Text = "未找到"; this.SP_Result.Children.Add(textBlock); } else { this.current = resultUI; if (resultUI.GetType() == typeof(User)) { this.SP_Result.Children.Add(UserInfoItem.GotyeUserToUserInfoItem(resultUI as User)); } else { this.SP_Result.Children.Add(GroupInfoItem.GroupToUserInfoItem(resultUI as Group)); } } }
public void AddNewFriend(User user) { var item = UserInfoItem.GotyeUserToUserInfoItem(user); this.SL_FriendList.AddItem(item); }