13 writes to listposition
System.Windows.Forms (13)
System\Windows\Forms\DataBinding\CurrencyManager.cs (11)
173listposition = 0; 177listposition = -1; 332listposition = -1; 372listposition = Math.Min(newPosition, Count - 1); 434listposition = _lastGoodKnownRow; 494listposition = i; 505listposition = i; 645listposition = -1; 944listposition = 0; 949listposition = -1; 972listposition = (_list is not null && _list.Count != 0) ? 0 : -1;
System\Windows\Forms\DataBinding\RelatedCurrencyManager.cs (2)
164listposition = (Count > 0 ? 0 : -1); 199listposition = (Count > 0 ? 0 : -1);
38 references to listposition
System.Windows.Forms (38)
System\Windows\Forms\DataBinding\CurrencyManager.cs (36)
221get => listposition; 224if (listposition == -1) 242validating: listposition != value, 330if (listposition != -1) 349int oldPosition = listposition; 379bool positionChanging = (oldPosition != listposition); 405int initialPosition = listposition; 422_lastGoodKnownRow = listposition; 438_lastGoodKnownRow = listposition; 441return initialPosition != listposition; 622Debug.Assert(_lastGoodKnownRow == -1 || _lastGoodKnownRow == listposition, "if we have a valid lastGoodKnownRow, then it should equal the position in the list"); 638int oldposition = listposition; 684if (listposition == -1 && _list.Count > 0) 690ChangeRecordState(Math.Min(listposition, _list.Count - 1), true, false, true, false); 697if (dbe.NewIndex <= listposition && listposition < _list.Count - 1) 701ChangeRecordState(listposition + 1, true, true, listposition != _list.Count - 2, false); 707if (listposition == _list.Count - 1) 714else if (dbe.NewIndex == listposition && listposition == _list.Count - 1 && listposition != -1) 723if (listposition == -1) 738if (dbe.NewIndex == listposition) 742ChangeRecordState(Math.Min(listposition, Count - 1), true, false, true, false); 749if (dbe.NewIndex < listposition) 753ChangeRecordState(listposition - 1, true, false, true, false); 764if (dbe.NewIndex == listposition) 772if (dbe.OldIndex == listposition) 778else if (dbe.NewIndex == listposition) 795if (listposition == -1 && _list.Count > 0) 799else if (listposition > _list.Count - 1) 819Debug.Assert(_lastGoodKnownRow == -1 || listposition == _lastGoodKnownRow, "how did they get out of sync?"); 891if ((e.Index == listposition || (e.Index == -1 && Position < Count)) && !_state.HasFlag(CurrencyManagerStates.InChangeRecordState)) 941if (listposition >= _list.Count) 1012bool newBound = _list is not null && _list.Count > 0 && ShouldBind && listposition != -1;
System\Windows\Forms\DataBinding\RelatedCurrencyManager.cs (2)
145int oldlistposition = listposition; 202if (oldlistposition != listposition)