Esempio n. 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);
         }));
     }
 }
Esempio n. 2
0
        public GroupInfoItem GetParent(string id)
        {
            GroupInfoItem parent = null;

            GroupInfoItem item = Get(id);

            if (item != null)
            {
                var p = Items.FirstOrDefault(e => e.ParentID == item.GroupCode);
                if (p != null)
                {
                    parent = p;
                }
            }
            return(parent);
        }
Esempio n. 3
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));
         }
     }
 }
Esempio n. 4
0
        public void AddNewGroup(Group group)
        {
            var item = GroupInfoItem.GroupToUserInfoItem(group);

            this.SL_GroupList.AddItem(item);
        }