Exemple #1
0
 public friend_list()
 {
     InitializeComponent();
     bbl_old     = new friend_item();
     bbl_old.Top = 0 - bbl_old.Height + 10;
     // while (1 + 1 == 2)
     addInMessage("Hello world", "00:00");
     addInMessage("Hell", "00:00");
 }
Exemple #2
0
        public friend_list(Form1 mainForm)
        {
            this.mainForm = mainForm;
            InitializeComponent();
            this.fItem  = new chat_list.friend_item(mainForm);
            bbl_old     = new friend_item(mainForm);
            bbl_old.Top = 0 - bbl_old.Height + 10;

            //addInMessage("user 1", "00:00", 0);

            //make sure the scroll works
            panel1.VerticalScroll.Value = panel1.VerticalScroll.Maximum;
        }
Exemple #3
0
        public void addInMessage(string message, string time)
        {
            friend_item bbl = new chat_list.friend_item(message, time, msgtype1.In);

            bbl.Location = fItem.Location;
            bbl.Size     = fItem.Size;
            bbl.Anchor   = fItem.Anchor;
            //if (bbl.Location != bubble1.Location)

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

            bbl_old = bbl;// safe the last added object
        }