Esempio n. 1
0
        void ucg_MouseDoubleClick(object o, MouseEventArgs e)
        {
            UCGroup u = (UCGroup)o;

            if (u.IsChouse == false)
            {
                temp          = u;
                temp.IsChouse = true;
                temp.Top      = temp.Height * tempindex;
                tempindex++;
                this.panel2.Controls.Add(temp);
            }
            else
            {
                u.IsChouse = false;
                tempindex--;
                FreshChosed();
            }

            FreshnoChosed();
        }
Esempio n. 2
0
        private void FrmGroupTalk_Load(object sender, EventArgs e)
        {
            this.textBox2.Text = this._uc.Groupannouncement;
            FrmMain frm = new FrmMain();

            BLL.groupu          bll    = new BLL.groupu();
            List <Model.groupu> mylist = bll.GetModelList("groupID=" + this._uc.GroupID);
            int index = 0;

            foreach (Model.groupu mg in mylist)
            {
                BLL.userInfo   bu   = new BLL.userInfo();
                Model.userInfo mu   = bu.GetModel(mg.groupfriendID);
                UCGroup        ucg1 = new UCGroup();
                ucg1.Top       = ucg1.Height * index;
                ucg1.Id1       = mg.groupfriendID;
                ucg1.HeadImage = frm.imageList1.Images[Convert.ToInt32(mu.userHeadImage)];
                ucg1.Username  = mu.userName;
                luc.Add(ucg1);
                this.panel1.Controls.Add(ucg1);
                index++;
            }
        }
Esempio n. 3
0
        private void GetFriend()
        {
            int     i   = 0;
            FrmMain frm = new FrmMain();

            this.panel1.Controls.Clear();
            BLL.userInfo          bll   = new BLL.userInfo();
            List <Model.userInfo> muser = bll.GetModelList("userID like'%" + this.txtsearch.Text + "%'");
            int indext = 0;

            foreach (Model.userInfo m in muser)
            {
                foreach (Model.groupu mg in groupfriend)
                {
                    if (m.userID == mg.groupfriendID)
                    {
                        i++;
                    }
                }

                if (i != 0)
                {
                    UCGroup ucg = new UCGroup();
                    ucg.Top               = ucg.Height * indext;
                    ucg.Id1               = m.userID;
                    ucg.Username          = m.userName;
                    ucg.IsChouse          = false;
                    ucg.HeadImage         = frm.imageList1.Images[Convert.ToInt32(m.userHeadImage)];
                    ucg.Headimageindex    = Convert.ToInt32(m.userHeadImage);
                    ucg.MouseDoubleClick += new MouseEventHandler(ucg_MouseDoubleClick);
                    indext++;
                    uc.Add(ucg);
                    this.panel1.Controls.Add(ucg);
                }
                i = 0;
            }
        }