void l1_DoubleClick(object sender, EventArgs e)
        {
            Label ll1 = (Label)sender;

            Panel node = (Panel)ll1.Parent;

            if (node.Tag.GetType() == typeof(WkTUser))
            {
                WkTUser receuser = (WkTUser)node.Tag;

                if (!chatwindowsusers.Contains(receuser))
                {
                    Label ll = (Label)node.Controls[1];

                    ll.Text = "0";

                    this.chatwindowsusers.Add(receuser);
                    ChatWindows chat = new ChatWindows();
                    chat.ReceiveUser     = receuser;
                    chat.SendUser        = this.user;
                    chat.Chatwindwosuser = chatwindowsusers;
                    chat.Show();
                }
                else
                {
                }
            }
        }
        /// <summary>
        /// 弹出聊天窗口 创建临时的聊天快捷label
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            TreeNode node = e.Node;

            if (node.Tag.GetType() == typeof(WkTUser))
            {
                WkTUser receuser = (WkTUser)node.Tag;

                if (!chatwindowsusers.Contains(receuser))
                {
                    Panel pp = IsInFlowPanel2(receuser);
                    if (pp == null)
                    {
                        CreateWktuserInPanel(receuser);
                    }

                    this.chatwindowsusers.Add(receuser);
                    ChatWindows chat = new ChatWindows();
                    chat.ReceiveUser     = receuser;
                    chat.SendUser        = this.user;
                    chat.Chatwindwosuser = chatwindowsusers;
                    chat.Show();
                }
                else
                {
                }
            }
        }
Example #3
0
        void label_Click(object sender, EventArgs e)
        {
            WkTUser w = (WkTUser)(((Label)sender).Tag);

            ChatListSubItem cha = main.GetTheUserById(int.Parse(w.Id.ToString()));

            if (cha.IsTwinkle)
            {
                cha.IsTwinkle = !cha.IsTwinkle;
                main.RemoveFromChaterList(cha.userid);
                main.meaaageCountLabelOfXiaoXI.MessageCount = 0;
            }

            if (main.chatwindowsusers == null)
            {
                main.chatwindowsusers = new List <WkTUser>();
            }
            if (!main.chatwindowsusers.Contains(w))
            {
                ChatWindows chat = new ChatWindows();
                chat.ReceiveUser     = w;
                chat.SendUser        = main.user;
                chat.Chatwindwosuser = main.chatwindowsusers;
                chat.Show();
            }
            else
            {
            }
            Label l = (Label)sender;

            this.flowLayoutPanel1.Controls.Remove(l);
            l.Dispose();
            if (this.flowLayoutPanel1.Controls.Count == 0)
            {
                this.Close();
            }
        }
Example #4
0
        private void chatListBox1_DoubleClickSubItem(object sender, ChatListEventArgs e)
        {
            ChatListSubItem cha = e.SelectSubItem;
            if (cha.IsTwinkle)
            {
                cha.IsTwinkle = !cha.IsTwinkle;
                RemoveFromChaterList(cha.userid);
                this.meaaageCountLabelOfXiaoXI.MessageCount = 0;
            }

            WkTUser w = new WkTUser();
            w = (WkTUser)baseService.loadEntity(w, cha.userid);

            if (chatwindowsusers == null)
            {
                chatwindowsusers = new List<WkTUser>();
            }
            if (!chatwindowsusers.Contains(w))
            {

                ChatWindows chat = new ChatWindows();
                chat.ReceiveUser = w;
                chat.SendUser = this.user;
                chat.Chatwindwosuser = chatwindowsusers;
                chat.Show();
            }
            else
            {

            }
        }
Example #5
0
        void label_Click(object sender, EventArgs e)
        {
            WkTUser w = (WkTUser)(((Label)sender).Tag);

            ChatListSubItem cha = main.GetTheUserById(int.Parse(w.Id.ToString()));
            if (cha.IsTwinkle)
            {
                cha.IsTwinkle = !cha.IsTwinkle;
                main.RemoveFromChaterList(cha.userid);
                main.meaaageCountLabelOfXiaoXI.MessageCount = 0;
            }

            if (main.chatwindowsusers == null)
            {
                main.chatwindowsusers = new List<WkTUser>();
            }
            if (!main.chatwindowsusers.Contains(w))
            {
                ChatWindows chat = new ChatWindows();
                chat.ReceiveUser = w;
                chat.SendUser = main.user;
                chat.Chatwindwosuser = main.chatwindowsusers;
                chat.Show();
            }
            else
            {

            }
            Label l = (Label)sender;
            this.flowLayoutPanel1.Controls.Remove(l);
            l.Dispose();
            if (this.flowLayoutPanel1.Controls.Count == 0)
            {
                this.Close();
            }
        }
        /// <summary>
        /// 弹出聊天窗口 创建临时的聊天快捷label
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            TreeNode node = e.Node;
            if(node.Tag.GetType() == typeof(WkTUser))
            {
                WkTUser receuser = (WkTUser)node.Tag;

                if (!chatwindowsusers.Contains(receuser))
                {
                    Panel pp = IsInFlowPanel2(receuser);
                    if (pp == null)
                    {
                        CreateWktuserInPanel(receuser);
                    }

                    this.chatwindowsusers.Add(receuser);
                    ChatWindows chat = new ChatWindows();
                    chat.ReceiveUser = receuser;
                    chat.SendUser = this.user;
                    chat.Chatwindwosuser = chatwindowsusers;
                    chat.Show();
                }
                else
                {

                }

            }
        }
        void l1_DoubleClick(object sender, EventArgs e)
        {
            Label ll1 = (Label)sender;

            Panel node = (Panel)ll1.Parent;

            if (node.Tag.GetType() == typeof(WkTUser))
            {
                WkTUser receuser = (WkTUser)node.Tag;

                if (!chatwindowsusers.Contains(receuser))
                {
                    Label ll = (Label)node.Controls[1];

                    ll.Text = "0";

                    this.chatwindowsusers.Add(receuser);
                    ChatWindows chat = new ChatWindows();
                    chat.ReceiveUser = receuser;
                    chat.SendUser = this.user;
                    chat.Chatwindwosuser = chatwindowsusers;
                    chat.Show();
                }
                else
                {

                }

            }
        }