예제 #1
0
        public void Add(ListItemUserControl control)
        {
            if (IsDisposed)
            {
                return;
            }

            if (InvokeRequired)
            {
                Invoke(new AddControlDelegate(Add), control);
            }
            else
            {
                Controls.Add(control);

                // registers list item's children's click event handlers
                // so that they will all call the same callback method
                control.ItemClick += Control_ItemClick;

                OnDataSetChanged();
            }
        }
예제 #2
0
 public void Remove(ListItemUserControl control)
 {
     Controls.Remove(control);
     OnDataSetChanged();
 }