Ejemplo n.º 1
0
 public void ResumeBinding()
 {
     bindingItems1.RaiseListChangedEvents    = true;
     selectableItems1.RaiseListChangedEvents = true;
     bindingItems2.RaiseListChangedEvents    = true;
     selectableItems2.RaiseListChangedEvents = true;
     bindingItems3.RaiseListChangedEvents    = true;
     selectableItems3.RaiseListChangedEvents = true;
     bindingItems4.RaiseListChangedEvents    = true;
     selectableItems4.RaiseListChangedEvents = true;
     bindingItems5.RaiseListChangedEvents    = true;
     selectableItems5.RaiseListChangedEvents = true;
     bindingItems6.RaiseListChangedEvents    = true;
     selectableItems6.RaiseListChangedEvents = true;
     bindingItems7.RaiseListChangedEvents    = true;
     selectableItems7.RaiseListChangedEvents = true;
     bindingItems1.ResetBindings();
     selectableItems1.ResetBindings();
     bindingItems2.ResetBindings();
     selectableItems2.ResetBindings();
     bindingItems3.ResetBindings();
     selectableItems3.ResetBindings();
     bindingItems4.ResetBindings();
     selectableItems4.ResetBindings();
     bindingItems5.ResetBindings();
     selectableItems5.ResetBindings();
     bindingItems6.ResetBindings();
     selectableItems6.ResetBindings();
     bindingItems7.ResetBindings();
     selectableItems7.ResetBindings();
 }
Ejemplo n.º 2
0
        public void UpdateSelectable(BaseBindingList <TChildType> bindingList, BaseBindingList <TChildType> selectable)
        {
            var nbOldSelectable = selectable.Count;
            var nbNewSelectable = bindingList.Count + ((NullSelectable) ? 1 : 0);

            for (var i = 1; i < nbNewSelectable; ++i)
            {
                if (i < nbOldSelectable)
                {
                    selectable[i] = bindingList[i - ((NullSelectable) ? 1 : 0)];
                }
                else
                {
                    selectable.Add(bindingList[i - ((NullSelectable) ? 1 : 0)]);
                }
            }
            for (var i = nbNewSelectable; i < nbOldSelectable; ++i)
            {
                selectable.RemoveAt(nbNewSelectable);
            }
            selectable.ResetBindings();
        }