Exemple #1
0
        public chatbox(Login loginForm, int chatID)
        {
            bbl_old        = new chatmesg();
            this.loginForm = loginForm;
            this.chatID    = chatID;
            InitializeComponent();

            bbl_old.Top = 0 - bbl_old.Height + 10;
            Message     = textBox1.Text;
        }
Exemple #2
0
        public chatbox(Login loginForm)
        {
            //if (!this.DesignMode)
            //{
            bbl_old        = new chatmesg();
            this.loginForm = loginForm;
            InitializeComponent();
            // }

            bbl_old.Top = 0 - bbl_old.Height + 10;
            Message     = textBox1.Text;
        }
Exemple #3
0
        public void addOutMessage(string message, string time)
        {
            chatmesg bbl = new chat_list.chatmesg(message, time, msgtype.Out);

            bbl.Location = bubble1.Location;
            bbl.Left    += 20;
            bbl.Size     = bubble1.Size;
            bbl.Anchor   = bubble1.Anchor;

            bbl.Top = bbl_old.Bottom + 10;
            //curtop = bbl.Bottom + 10;
            panel5.Controls.Add(bbl);
            panel5.VerticalScroll.Value = panel5.VerticalScroll.Maximum;
            bbl_old = bbl;
            // safe the last added object
        }
Exemple #4
0
        //------------------------------------------------------------------------------------------------------------------
        // display received picture/file
        public void addInPicture(string message)
        {
            chatmesg bbl = new chat_list.chatmesg(message, msgtype.In);

            //message = "https://www.w3schools.com/css/img_fjords.jpg";
            bbl.setimage(message);
            //while (bbl.p)
            bbl.Location = bubble1.Location;
            bbl.Size     = bubble1.Size;
            bbl.Anchor   = bubble1.Anchor;
            //if (bbl.Location != bubble1.Location)

            bbl.Top = bbl_old.Bottom + 10;
            //curtop = bbl.Bottom + 10;
            panel5.Controls.Add(bbl);
            panel5.VerticalScroll.Value = panel5.VerticalScroll.Maximum;

            bbl_old = bbl;// safe the last added object
        }
Exemple #5
0
 public void init()
 {
     bbl_old = new chatmesg();
     //this.loginForm = loginForm;
     InitializeComponent();
 }