Exemplo n.º 1
0
 private void Listbox_BeforeDrawItem(object sender, ListBox.ObjectCollection items, DrawItemEventArgs e)
 {
     if (Items.Count != LastCount)
     {
         listbox.SetScrollInfo();
         LastCount = Items.Count;
         ItemsCountChange?.Invoke(this, null);
     }
 }
Exemplo n.º 2
0
 private void Timer_Tick(object sender, EventArgs e)
 {
     if (Items.Count == 0 && LastCount != 0)
     {
         LastCount = 0;
         timer.Stop();
         ItemsCountChange?.Invoke(sender, e);
         timer.Start();
     }
 }