Exemplo n.º 1
0
 public void Update(RealData item)
 {
     if (item.Name.Equals("error"))
     {
         throw new Exception("error happened");
     }
     UpdatedList.Add(item);
 }
Exemplo n.º 2
0
        protected override void OnListChanged(System.ComponentModel.ListChangedEventArgs e)
        {
            switch (e.ListChangedType)
            {
            case System.ComponentModel.ListChangedType.ItemAdded:

                AddedList.Add(this[e.NewIndex]);

                break;

            case System.ComponentModel.ListChangedType.ItemChanged:
                UpdatedList.Add(this[e.NewIndex]);
                break;

            case System.ComponentModel.ListChangedType.ItemDeleted:
                //   DeleteList.Add(this[e.NewIndex]);
                break;

            default:
                break;
            }
            base.OnListChanged(e);
        }