179 references to ListChangedType
PresentationFramework (10)
src\Framework\System\Windows\Data\BindingListCollectionView.cs (10)
1912
if (_ignoreInnerRefresh && (args.ListChangedType ==
ListChangedType
.Reset))
1922
case
ListChangedType
.ItemAdded:
1954
case
ListChangedType
.ItemDeleted:
1987
case
ListChangedType
.ItemMoved:
2018
case
ListChangedType
.ItemChanged:
2031
goto case
ListChangedType
.Reset;
2035
case
ListChangedType
.Reset:
2037
case
ListChangedType
.PropertyDescriptorAdded:
2038
case
ListChangedType
.PropertyDescriptorChanged:
2039
case
ListChangedType
.PropertyDescriptorDeleted:
System (26)
compmod\system\componentmodel\BindingList.cs (13)
114
FireListChanged(
ListChangedType
.Reset, -1);
121
FireListChanged(
ListChangedType
.Reset, -1);
187
FireListChanged(
ListChangedType
.Reset, -1);
194
FireListChanged(
ListChangedType
.ItemChanged, position);
198
private void FireListChanged(
ListChangedType
type, int index) {
221
FireListChanged(
ListChangedType
.Reset, -1);
232
FireListChanged(
ListChangedType
.ItemAdded, index);
248
FireListChanged(
ListChangedType
.ItemDeleted, index);
263
FireListChanged(
ListChangedType
.ItemChanged, index);
378
FireListChanged(
ListChangedType
.Reset, -1);
399
FireListChanged(
ListChangedType
.Reset, -1);
420
FireListChanged(
ListChangedType
.Reset, -1);
607
ListChangedEventArgs args = new ListChangedEventArgs(
ListChangedType
.ItemChanged, pos, pd);
compmod\system\componentmodel\ListChangedEventArgs.cs (13)
24
private
ListChangedType
listChangedType;
32
public ListChangedEventArgs(
ListChangedType
listChangedType, int newIndex) : this(listChangedType, newIndex, -1) {
38
public ListChangedEventArgs(
ListChangedType
listChangedType, int newIndex, PropertyDescriptor propDesc) : this(listChangedType, newIndex) {
46
public ListChangedEventArgs(
ListChangedType
listChangedType, PropertyDescriptor propDesc) {
47
Debug.Assert(listChangedType !=
ListChangedType
.Reset, "this constructor is used only for changes in the list MetaData");
48
Debug.Assert(listChangedType !=
ListChangedType
.ItemAdded, "this constructor is used only for changes in the list MetaData");
49
Debug.Assert(listChangedType !=
ListChangedType
.ItemDeleted, "this constructor is used only for changes in the list MetaData");
50
Debug.Assert(listChangedType !=
ListChangedType
.ItemChanged, "this constructor is used only for changes in the list MetaData");
59
public ListChangedEventArgs(
ListChangedType
listChangedType, int newIndex, int oldIndex) {
60
Debug.Assert(listChangedType !=
ListChangedType
.PropertyDescriptorAdded, "this constructor is used only for item changed in the list");
61
Debug.Assert(listChangedType !=
ListChangedType
.PropertyDescriptorDeleted, "this constructor is used only for item changed in the list");
62
Debug.Assert(listChangedType !=
ListChangedType
.PropertyDescriptorChanged, "this constructor is used only for item changed in the list");
71
public
ListChangedType
ListChangedType {
System.Data (62)
fx\src\data\System\Data\DataView.cs (36)
62
internal static ListChangedEventArgs ResetEventArgs = new ListChangedEventArgs(
ListChangedType
.Reset, -1);
569
OnListChanged(new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorChanged, new DataTablePropertyDescriptor(table)));
622
OnListChanged(new ListChangedEventArgs(
ListChangedType
.ItemAdded, IndexOf(drv)));
862
OnListChanged(new ListChangedEventArgs(
ListChangedType
.ItemDeleted, Count));
1294
if (
ListChangedType
.Reset != e.ListChangedType) {
1300
if (
ListChangedType
.Reset == e.ListChangedType) {
1308
if ((
ListChangedType
.ItemAdded == e.ListChangedType) && (null != addNewMoved)) {
1324
internal void MaintainDataView(
ListChangedType
changedType, DataRow row, bool trackAddRemove) {
1327
case
ListChangedType
.ItemAdded:
1342
addNewMoved = new ListChangedEventArgs(
ListChangedType
.ItemMoved, index, Count - 1);
1351
case
ListChangedType
.ItemDeleted:
1369
case
ListChangedType
.Reset:
1373
case
ListChangedType
.ItemChanged:
1374
case
ListChangedType
.ItemMoved:
1376
case
ListChangedType
.PropertyDescriptorAdded:
1377
case
ListChangedType
.PropertyDescriptorChanged:
1378
case
ListChangedType
.PropertyDescriptorDeleted:
1395
case
ListChangedType
.ItemChanged:
1400
case
ListChangedType
.ItemMoved:
1403
Debug.Assert(((
ListChangedType
.ItemChanged == e.ListChangedType) && ((e.NewIndex == e.OldIndex) || (-1 == e.OldIndex))) ||
1404
(
ListChangedType
.ItemMoved == e.ListChangedType && (e.NewIndex != e.OldIndex) && (0 <= e.OldIndex)),
1418
case
ListChangedType
.ItemAdded:
1419
case
ListChangedType
.ItemDeleted:
1420
case
ListChangedType
.PropertyDescriptorAdded:
1421
case
ListChangedType
.PropertyDescriptorChanged:
1422
case
ListChangedType
.PropertyDescriptorDeleted:
1423
case
ListChangedType
.Reset:
1636
e.Action == CollectionChangeAction.Add ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorAdded, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element)) :
1637
e.Action == CollectionChangeAction.Refresh ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorChanged, NullProp):
1638
e.Action == CollectionChangeAction.Remove ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorDeleted, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element)) :
1646
e.Action == CollectionChangeAction.Add ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorAdded, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element)) :
1647
e.Action == CollectionChangeAction.Refresh ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorChanged, NullProp):
1648
e.Action == CollectionChangeAction.Remove ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorDeleted, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element)) :
1656
e.Action == CollectionChangeAction.Add ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorAdded, new DataColumnPropertyDescriptor((System.Data.DataColumn)e.Element)) :
1657
e.Action == CollectionChangeAction.Refresh ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorChanged, NullProp):
1658
e.Action == CollectionChangeAction.Remove ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorDeleted, new DataColumnPropertyDescriptor((System.Data.DataColumn)e.Element)) :
fx\src\data\System\Data\DataViewListener.cs (1)
63
internal void MaintainDataView(
ListChangedType
changedType, DataRow row, bool trackAddRemove) {
fx\src\data\System\Data\DataViewManager.cs (6)
366
e.Action == CollectionChangeAction.Add ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorAdded, new DataTablePropertyDescriptor((System.Data.DataTable)e.Element)) :
367
e.Action == CollectionChangeAction.Refresh ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorChanged, NullProp) :
368
e.Action == CollectionChangeAction.Remove ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorDeleted, new DataTablePropertyDescriptor((System.Data.DataTable)e.Element)) :
376
e.Action == CollectionChangeAction.Add ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorAdded, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element)) :
377
e.Action == CollectionChangeAction.Refresh ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorChanged, NullProp):
378
e.Action == CollectionChangeAction.Remove ? new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorDeleted, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element)) :
fx\src\data\System\Data\Selection.cs (19)
419
MaintainDataView(
ListChangedType
.ItemDeleted, record, !fireEvent);
424
OnListChanged(
ListChangedType
.ItemDeleted, recordIndex);
763
MaintainDataView(
ListChangedType
.ItemAdded, record, !fireEvent);
767
OnListChanged(
ListChangedType
.ItemAdded, records.GetIndexByNode(nodeId));
797
private void OnListChanged(
ListChangedType
changedType, int newIndex, int oldIndex) {
803
private void OnListChanged(
ListChangedType
changedType, int index) {
820
private void MaintainDataView(
ListChangedType
changedType, int record, bool trackAddRemove) {
824
delegate(DataViewListener listener,
ListChangedType
type, DataRow row, bool track)
833
MaintainDataView(
ListChangedType
.Reset, -1, false); // SQLBU 360388
842
OnListChanged(
ListChangedType
.ItemChanged, index);
852
OnListChanged(
ListChangedType
.ItemChanged, newIndex, oldIndex);
855
OnListChanged(
ListChangedType
.ItemAdded, newIndex, oldIndex);
859
OnListChanged(
ListChangedType
.ItemDeleted, oldIndex);
862
OnListChanged(
ListChangedType
.ItemMoved, newIndex, oldIndex);
900
OnListChanged(
ListChangedType
.ItemChanged, commonIndexLocation, commonIndexLocation);
916
OnListChanged (
ListChangedType
.ItemChanged, newRecordIndex, oldRecordIndex); // be carefull remove oldrecord index if needed
920
MaintainDataView(
ListChangedType
.ItemAdded, newRecord, false);
921
OnListChanged(
ListChangedType
.ItemAdded, GetIndex(newRecord)); // oldLocation would be -1
924
OnListChanged (
ListChangedType
.ItemMoved, newRecordIndex, oldRecordIndex);
System.Data.Entity (11)
System\Data\Objects\ObjectView.cs (7)
131
OnListChanged(
ListChangedType
.ItemDeleted, oldIndex, -1);
184
OnListChanged(
ListChangedType
.ItemAdded, _addNewIndex /* newIndex*/, -1 /*oldIndex*/);
339
OnListChanged(
ListChangedType
.ItemAdded, index /*newIndex*/, -1/* oldIndex*/);
372
OnListChanged(
ListChangedType
.Reset, -1 /*newIndex*/, -1/* oldIndex*/); // Indexes not used for reset event.
437
OnListChanged(
ListChangedType
.ItemDeleted, index /* newIndex */, -1 /* oldIndex */);
477
private void OnListChanged(
ListChangedType
listchangedType, int newIndex, int oldIndex)
497
OnListChanged(
ListChangedType
.ItemChanged, index /*newIndex*/, index/*oldIndex*/);
System\Data\Objects\ObjectViewEntityCollectionData.cs (3)
202
changeArgs = new ListChangedEventArgs(
ListChangedType
.ItemDeleted, oldIndex /* newIndex*/, -1 /* oldIndex*/);
221
changeArgs = new ListChangedEventArgs(
ListChangedType
.ItemAdded, _bindingList.Count - 1 /* newIndex*/, -1 /* oldIndex*/);
241
changeArgs = new ListChangedEventArgs(
ListChangedType
.Reset, -1 /*newIndex*/, -1/*oldIndex*/);
System\Data\Objects\ObjectViewQueryResultData.cs (1)
241
changeArgs = new ListChangedEventArgs(
ListChangedType
.ItemDeleted, itemIndex /* newIndex*/, -1 /* oldIndex*/);
System.Data.Linq (10)
SortableBindingList.cs (1)
53
OnListChanged(new ListChangedEventArgs(
ListChangedType
.Reset, -1));
Types.cs (9)
207
OnListChanged(
ListChangedType
.ItemDeleted, index);
212
OnListChanged(
ListChangedType
.ItemAdded, index);
227
OnListChanged(
ListChangedType
.ItemAdded, entities.IndexOf(entity));
244
OnListChanged(
ListChangedType
.ItemAdded, entities.IndexOf(e));
279
OnListChanged(
ListChangedType
.Reset, 0);
329
OnListChanged(
ListChangedType
.ItemAdded, index);
442
OnListChanged(
ListChangedType
.ItemDeleted, index);
458
OnListChanged(
ListChangedType
.ItemDeleted, index);
627
void OnListChanged(
ListChangedType
type, int index) {
System.Windows.Forms (60)
winforms\Managed\System\WinForms\BindingSource.cs (14)
912
OnListChanged(new ListChangedEventArgs(
ListChangedType
.ItemChanged, index));
938
private void OnSimpleListChanged(
ListChangedType
listChangedType, int newIndex) {
1188
OnListChanged(new ListChangedEventArgs(
ListChangedType
.PropertyDescriptorChanged, null));
1191
OnListChanged(new ListChangedEventArgs(
ListChangedType
.Reset, -1));
1196
this.OnListChanged(new ListChangedEventArgs(
ListChangedType
.ItemChanged, this.Position));
1201
this.OnListChanged(new ListChangedEventArgs(
ListChangedType
.ItemChanged, itemIndex));
1658
OnSimpleListChanged(
ListChangedType
.ItemAdded, ret);
1666
OnSimpleListChanged(
ListChangedType
.Reset, -1);
1682
OnSimpleListChanged(
ListChangedType
.ItemAdded, index);
1690
OnSimpleListChanged(
ListChangedType
.ItemDeleted, index);
1698
OnSimpleListChanged(
ListChangedType
.ItemDeleted, index);
1712
OnSimpleListChanged(
ListChangedType
.ItemChanged, index);
1786
OnListChanged(new ListChangedEventArgs(
ListChangedType
.ItemAdded, saveAddNew));
1875
OnListChanged(new ListChangedEventArgs(
ListChangedType
.Reset, -1));
winforms\Managed\System\WinForms\CurrencyManager.cs (25)
207
OnListChanged(new ListChangedEventArgs(
ListChangedType
.Reset, -1, -1));
336
OnListChanged(new ListChangedEventArgs(
ListChangedType
.ItemChanged, this.Position));
607
if (e.ListChangedType ==
ListChangedType
.ItemMoved && e.OldIndex < 0) {
608
dbe = new ListChangedEventArgs(
ListChangedType
.ItemAdded, e.NewIndex, e.OldIndex);
609
} else if (e.ListChangedType ==
ListChangedType
.ItemMoved && e.NewIndex < 0) {
610
dbe = new ListChangedEventArgs(
ListChangedType
.ItemDeleted, e.OldIndex, e.NewIndex);
629
if (dbe.ListChangedType == System.ComponentModel.
ListChangedType
.Reset && e.NewIndex == -1) {
634
if (dbe.ListChangedType == System.ComponentModel.
ListChangedType
.ItemDeleted) {
640
if (e.ListChangedType == System.ComponentModel.
ListChangedType
.PropertyDescriptorAdded ||
641
e.ListChangedType == System.ComponentModel.
ListChangedType
.PropertyDescriptorDeleted ||
642
e.ListChangedType == System.ComponentModel.
ListChangedType
.PropertyDescriptorChanged)
655
case System.ComponentModel.
ListChangedType
.Reset:
664
case System.ComponentModel.
ListChangedType
.ItemAdded:
698
case System.ComponentModel.
ListChangedType
.ItemDeleted:
721
case System.ComponentModel.
ListChangedType
.ItemChanged:
730
case System.ComponentModel.
ListChangedType
.ItemMoved:
742
case System.ComponentModel.
ListChangedType
.PropertyDescriptorAdded:
743
case System.ComponentModel.
ListChangedType
.PropertyDescriptorDeleted:
744
case System.ComponentModel.
ListChangedType
.PropertyDescriptorChanged:
900
List_ListChanged(list, new System.ComponentModel.ListChangedEventArgs(System.ComponentModel.
ListChangedType
.Reset, -1));
983
case System.ComponentModel.
ListChangedType
.ItemDeleted:
987
case System.ComponentModel.
ListChangedType
.Reset:
990
case System.ComponentModel.
ListChangedType
.ItemAdded:
994
case System.ComponentModel.
ListChangedType
.ItemMoved:
998
case System.ComponentModel.
ListChangedType
.ItemChanged:
winforms\Managed\System\Winforms\DataGridViewBindingCompleteEventArgs.cs (3)
14
private
ListChangedType
listChangedType;
17
public DataGridViewBindingCompleteEventArgs(
ListChangedType
listChangedType)
23
public
ListChangedType
ListChangedType
winforms\Managed\System\WinForms\DataGridViewDataConnection.cs (14)
475
if (e.ListChangedType == System.ComponentModel.
ListChangedType
.PropertyDescriptorAdded ||
476
e.ListChangedType == System.ComponentModel.
ListChangedType
.PropertyDescriptorDeleted ||
477
e.ListChangedType == System.ComponentModel.
ListChangedType
.PropertyDescriptorChanged)
517
if (e.ListChangedType ==
ListChangedType
.ItemAdded)
550
else if (e.ListChangedType ==
ListChangedType
.ItemDeleted)
589
if (e.ListChangedType ==
ListChangedType
.ItemAdded &&
617
if (e.ListChangedType ==
ListChangedType
.ItemDeleted)
658
case
ListChangedType
.Reset:
684
case
ListChangedType
.ItemAdded:
697
case
ListChangedType
.ItemDeleted:
701
case
ListChangedType
.ItemMoved:
710
case
ListChangedType
.ItemChanged:
751
MatchCurrencyManagerPosition(false /*scrollIntoView*/, e.ListChangedType ==
ListChangedType
.Reset /*clearSelection*/);
887
this.owner.OnDataBindingComplete(
ListChangedType
.Reset);
winforms\Managed\System\WinForms\DataGridViewMethods.cs (4)
11685
OnDataBindingComplete(
ListChangedType
.Reset);
15071
internal void OnDataBindingComplete(
ListChangedType
listChangedType)
15376
OnDataBindingComplete(
ListChangedType
.Reset);
15394
OnDataBindingComplete(
ListChangedType
.Reset);