Esempio n. 1
0
        public void RefreshStudentsGroupList()
        {
            trvStudentGroup.Nodes.Clear();
            MessageController.ClearStudentList();
            if (Program.CurUser.Info == null || Program.CurUser.ParentGroup == null)
            {
                return;
            }
            var group = Program.CurUser.ParentGroup;

            foreach (var user in group.Users.Values)
            {
                var node = trvStudentGroup.Nodes.Add(new object[] { user.Name });
                node.Tag        = user;
                node.ImageIndex = node.SelectImageIndex = GetUserSmallImageIndex(user.Info.SexMale, user.Status >= LoginStatus.在线);
                if (user.AccountID != Program.CurUser.AccountID)
                {
                    MessageController.AddStudent(user.AccountID, user.Name);
                }
            }
        }