Пример #1
0
 private void SetGroupItemAction(object sender, System.Timers.ElapsedEventArgs e)
 {
     for (int i = 0; i < groupList.Count; i++)
     {
         Thread.Sleep(100);
         this.Dispatcher.Invoke(DispatcherPriority.Send, new Action(
                                    delegate
         {
             var item = GroupInfoItem.GroupToUserInfoItem(groupList[i]);
             this.SL_GroupList.AddItem(item);
         }));
     }
 }
Пример #2
0
 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));
         }
     }
 }
Пример #3
0
        public void AddNewGroup(Group group)
        {
            var item = GroupInfoItem.GroupToUserInfoItem(group);

            this.SL_GroupList.AddItem(item);
        }