public void Search(object sender, EventArgs e)
        {
            if (!IsInt(searchText.Text))
            {
                MessageBox.Show("请输入正确的用户ID!");
                return;
            }
            var groupInfo = UserHome.QueryGroupInfo(Convert.ToInt32(searchText.Text));

            if (groupInfo == null)
            {
                MessageBox.Show("该群不存在");
                return;
            }
            searchInfo.Visible    = true;
            groupNumber.Text      = groupInfo.groupId.ToString();
            groupNumber.Visible   = true;
            groupName.Text        = groupInfo.groupName;
            groupName.Visible     = true;
            groupAdmin.Text       = groupInfo.master.ToString();
            groupAdmin.Visible    = true;
            groupMember.Text      = groupInfo.groupMember.Count.ToString();
            groupMember.Visible   = true;
            groupSynopsis.Text    = groupInfo.groupSynopsis;
            groupSynopsis.Visible = true;
        }
        public void InitGroupApply()
        {
            var groupInfo = UserHome.QueryGroupInfo(_groupId);

            if (groupInfo.apply == null)
            {
                groupInfo.apply = new List <int>();
            }
            for (int i = 0; i < groupInfo.apply.Count; i++)
            {
                applyListBox.Font = new Font(this.Font.FontFamily, 18);
                applyListBox.Items.Add("ID:" + groupInfo.apply[i] + " 申请加入群聊");
            }
        }
Exemple #3
0
        public void InitGroupInfo()
        {
            var groupInfo = UserHome.QueryGroupInfo(_groupId);

            mineGroup        = groupInfo;
            GroupName.Text   = groupInfo.groupName;
            groupNotice.Text = "群简介:" + groupInfo.groupSynopsis;
            groupNumber.Text = "(" + groupInfo.groupMember.Count + ")";
            for (int i = 0; i < groupInfo.groupMember.Count; i++)
            {
                var user = UserHome.QueryUserInfo(groupInfo.groupMember[i]);
                groupMemberList.Items.Add(user.name);
            }
        }