Exemple #1
0
 private void run()
 {
     lock (this)
     {
         int Y = H - panel1.VerticalScroll.Value;
         if (!panel1.HasChildren || (Y - panel1.Height) < 300)
         {
             if (als.Count != 0)
             {
                 BQlabel bq = new BQlabel(piv, als[0]);
                 bq.Width    = this.Width;
                 bq.Location = new Point(0, Y);
                 panel1.Controls.Add(bq);
                 H = H + bq.Height;
                 als.RemoveAt(0);
             }
             else if ((Y - panel1.Height) == 0)
             {
                 int ind = flowLayoutPanel1.Controls.IndexOf(selectpot) + 1;
                 if (ind < flowLayoutPanel1.Controls.Count)
                 {
                     ((point)flowLayoutPanel1.Controls[ind]).point_Click(null, null);
                 }
             }
         }
         else if (panel1.AutoScrollPosition.Y == 0 && H > panel1.Height)
         {
             if (value < -360)
             {
                 value = 0;
                 int ind = flowLayoutPanel1.Controls.IndexOf(selectpot) - 1;
                 if (ind >= 0)
                 {
                     ((point)flowLayoutPanel1.Controls[ind]).point_Click(null, null);
                 }
             }
             else if (th == null || !th.IsAlive)
             {
                 th = new Thread(remv);
                 th.IsBackground = true;
                 th.Start();
             }
         }
     }
 }
Exemple #2
0
 public BQDrugs(BQlabel bqs, DataRow drs)
 {
     bq = bqs;
     dr = drs;
     InitializeComponent();
 }