Exemple #1
0
 public MainChat()
 {
     InitializeComponent();
     label.Text = "Name";
     Icon       = Properties.Resources.chat;
     //Mac dinh ngon ngu Tieng Viet
     this.ml.SetLanguage((int)eLanguage.TiengViet);
     this.ml.ChangeLanguage(this);
     gChat = new GroupChat(this);
 }
Exemple #2
0
        //Yeu cau chat nhom
        void JoinGroup(string name)
        {
            var value = listgChat.SingleOrDefault(r => r.getName() == name);

            if (value == null)
            {
                SendData("JOINGROUP|" + name + "|" + user);
                this.Invoke(() =>
                {
                    gChat = new GroupChat(this);

                    gChat.setFrom(user);
                    gChat.setName(name);
                    gChat.label1.Text = "Group " + name;
                    gChat.From.Text   = user;
                    gChat.Show();
                    gChat.gchatBox.Text += user + " vừa vào phòng chat " + name + "\r\n";
                    listgChat.Add(gChat);
                });
            }
        }
Exemple #3
0
 //Remove khoi list form GroupChat
 public void RemoveGroup(GroupChat g)
 {
     listgChat.Remove(g);
 }