Base:
property
Current
System.Windows.Forms.BindingManagerBase.Current
27 references to Current
System.Windows.Forms (10)
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (4)
1293
currentItem = CurrencyManager.
Current
;
1306
editableObject = CurrencyManager.
Current
as IEditableObject;
1370
if (CurrencyManager.
Current
is IEditableObject iEditObj)
1450
if (CurrencyManager!.
Current
is IEditableObject iEditObj)
System\Windows\Forms\DataBinding\BindingSource.cs (4)
189
public object? Current => _currencyManager.Count > 0 ? _currencyManager.
Current
: null;
908
currentValue = ListBindingHelper.GetList(dmProp.GetValue(cm.
Current
));
940
currentItemChanged = ((_lastCurrentItem is null) || (cm.Count == 0) || (_lastCurrentItem != cm.
Current
) || (Position >= Count));
943
_lastCurrentItem = cm.Count > 0 ? cm.
Current
: null;
System\Windows\Forms\DataBinding\ListBindingHelper.cs (1)
58
currentItem = currentKnown ? cm!.
Current
: null;
System\Windows\Forms\DataBinding\RelatedCurrencyManager.cs (1)
163
SetDataSource(_fieldInfo.GetValue(currencyManager.
Current
));
System.Windows.Forms.Tests (17)
System\Windows\Forms\BindingContextTests.cs (10)
421
Assert.Equal(1, manager.
Current
);
435
Assert.Equal(1, manager.
Current
);
454
Assert.Equal(1, manager.
Current
);
581
Assert.Equal(1, manager.
Current
);
618
Assert.Equal(1, manager.
Current
);
640
Assert.Equal(1, manager.
Current
);
824
Assert.Equal(1, manager.
Current
);
862
Assert.Equal(1, manager.
Current
);
919
Assert.Equal(1, manager1.
Current
);
926
Assert.Equal(1, manager2.
Current
);
System\Windows\Forms\BindingSourceTests.cs (7)
25
Assert.Throws<IndexOutOfRangeException>(() => source.CurrencyManager.
Current
);
84
Assert.Throws<IndexOutOfRangeException>(() => source.CurrencyManager.
Current
);
149
Assert.Throws<IndexOutOfRangeException>(() => source.CurrencyManager.
Current
);
235
Assert.Equal(expected[0], source.CurrencyManager.
Current
);
305
Assert.Equal(expected[0], source.CurrencyManager.
Current
);
414
Assert.Throws<IndexOutOfRangeException>(() => source.CurrencyManager.
Current
);
488
Assert.Throws<IndexOutOfRangeException>(() => source.CurrencyManager.
Current
);