Example #1
0
        public void addIncomingMessage(string message, string auteur)
        {
            chat c = new chat(message, auteur, chat.msgtype.In);

            if (first == true)
            {
                c.Top  = curtop;
                curtop = c.Bottom + 10;
                first  = false;
            }
            else
            {
                c.Top = c_old.Bottom + 10;
            }
            c.Left = c.Left + 20;
            flowLayoutPanel1.Controls.Add(c);
            c_old = c;
            flowLayoutPanel1.VerticalScroll.Value = flowLayoutPanel1.VerticalScroll.Maximum;
        }
Example #2
0
        public void addOutMessage(string message, string auteur)
        {
            chat c = new chat(message, auteur, chat.msgtype.Out);

            if (first == true)
            {
                c.Top  = curtop;
                curtop = c.Bottom + 10;
                first  = false;
            }
            else
            {
                c.Top = c_old.Bottom + 10;
            }

            //  c.Location = chat1.Location;
            c.Left += 400;

            flowLayoutPanel1.Controls.Add(c);
            c_old = c;
            flowLayoutPanel1.VerticalScroll.Value = flowLayoutPanel1.VerticalScroll.Maximum;
        }