71 writes to Value
System.Windows.Forms (10)
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (8)
188
Value
= Constrain(_currentValue);
215
Value
= Constrain(_currentValue);
407
Value
= newValue;
416
Value
= Constrain(_currentValue);
541
Value
= Constrain(Convert.ToDecimal(Convert.ToInt32(Text, 16)));
545
Value
= Constrain(decimal.Parse(Text, CultureInfo.CurrentCulture));
599
Value
= DefaultValue;
696
Value
= newValue;
System\Windows\Forms\Printing\PrintPreviewDialog.cs (2)
1066
_pageCounter.
Value
= _previewControl.StartPage + 1;
1195
_pageCounter.
Value
= _previewControl.StartPage + 1;
System.Windows.Forms.Design (23)
System\Windows\Forms\Design\FormatControl.cs (1)
232
decimalPlacesUpDown.
Value
= 2;
System\Windows\Forms\Design\FormatControl.CurrencyFormatType.cs (7)
78
_owner.decimalPlacesUpDown.
Value
= 0;
82
_owner.decimalPlacesUpDown.
Value
= 1;
86
_owner.decimalPlacesUpDown.
Value
= 2;
90
_owner.decimalPlacesUpDown.
Value
= 3;
94
_owner.decimalPlacesUpDown.
Value
= 4;
98
_owner.decimalPlacesUpDown.
Value
= 5;
102
_owner.decimalPlacesUpDown.
Value
= 6;
System\Windows\Forms\Design\FormatControl.Designer.cs (1)
141
decimalPlacesUpDown.
Value
= new decimal(new int[] {
System\Windows\Forms\Design\FormatControl.NumericFormatType.cs (7)
77
_owner.decimalPlacesUpDown.
Value
= 0;
81
_owner.decimalPlacesUpDown.
Value
= 1;
85
_owner.decimalPlacesUpDown.
Value
= 2;
89
_owner.decimalPlacesUpDown.
Value
= 3;
93
_owner.decimalPlacesUpDown.
Value
= 4;
97
_owner.decimalPlacesUpDown.
Value
= 5;
101
_owner.decimalPlacesUpDown.
Value
= 6;
System\Windows\Forms\Design\FormatControl.ScientificFormatType.cs (7)
78
_owner.decimalPlacesUpDown.
Value
= 0;
82
_owner.decimalPlacesUpDown.
Value
= 1;
86
_owner.decimalPlacesUpDown.
Value
= 2;
90
_owner.decimalPlacesUpDown.
Value
= 3;
94
_owner.decimalPlacesUpDown.
Value
= 4;
98
_owner.decimalPlacesUpDown.
Value
= 5;
102
_owner.decimalPlacesUpDown.
Value
= 6;
System.Windows.Forms.Tests (24)
NumericUpDownTests.cs (22)
520
subUpDown.
Value
= 10;
531
subUpDown.
Value
= 10;
541
subUpDown.
Value
= 10;
563
upDown.
Value
= 50;
627
subUpDown.
Value
= 10;
632
subUpDown.
Value
= 20;
648
using NumericUpDown upDown = new() {
Value
= 0, Minimum = 0, Increment = 1 };
656
using NumericUpDown upDown = new() {
Value
= 10, Increment = 1, Text = "Not a number" };
664
using NumericUpDown upDown = new() {
Value
= 10, Minimum = 0, Maximum = 20, Increment = 1, Text = "30" };
675
Value
= 10
689
Value
= 15,
704
Value
= 11
718
Value
= 11,
741
using NumericUpDown upDown = new() {
Value
= 100, Maximum = 100, Increment = 1 };
749
using NumericUpDown upDown = new() {
Value
= 10, Increment = 1, Text = "Not a number" };
757
using NumericUpDown upDown = new() {
Value
= 10, Minimum = 0, Maximum = 20, Increment = 1, Text = "30" };
765
using NumericUpDown upDown = new() {
Value
= 100, Maximum = 100 };
773
using NumericUpDown upDown = new() {
Value
= 99, Maximum = 100 };
781
using NumericUpDown upDown = new() {
Value
= 100, Maximum = 100 };
789
using SubNumericUpDown upDown = new() {
Value
= 100, Maximum = 100, PublicUserEdit = true };
799
upDown.
Value
= decimal.MaxValue;
809
upDown.
Value
= decimal.MaxValue - 1;
System\Windows\Forms\AccessibleObjects\DirectionButtonAccessibleObjectTests.cs (2)
54
numericUpDown.
Value
= testValue;
71
numericUpDown.
Value
= testValue;
WinFormsControlsTest (14)
ComboBoxesWithScrollBars.cs (6)
26
changeDDH_UpDown1.
Value
= comboBox1.DropDownHeight;
27
changeCBHeight_UpDown2.
Value
= comboBox2.Size.Height;
28
changeDDH_UpDown3.
Value
= comboBox3.DropDownHeight;
31
maxDropDownItemsUpDown1.
Value
= comboBox1.MaxDropDownItems;
32
maxDropDownItemsUpDown2.
Value
= comboBox2.MaxDropDownItems;
33
maxDropDownItemsUpDown3.
Value
= comboBox3.MaxDropDownItems;
DataGridViewTest.Designer.cs (1)
175
this.numericUpDown1.
Value
= new decimal(new int[] {
ScrollBars.Designer.cs (1)
79
this.numericMaximum.
Value
= new decimal(new int[] {
TrackBars.cs (3)
15
numericMinimum.
Value
= trackBar1.Minimum;
16
numericMaximum.
Value
= trackBar1.Maximum;
17
numericFrequency.
Value
= trackBar1.TickFrequency;
TrackBars.Designer.cs (3)
155
this.numericMinimum.
Value
= new decimal(new int[] {
174
this.numericMaximum.
Value
= new decimal(new int[] {
193
this.numericFrequency.
Value
= new decimal(new int[] {
48 references to Value
System.Windows.Forms (7)
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (6)
13
[DefaultProperty(nameof(
Value
))]
15
[DefaultBindingProperty(nameof(
Value
))]
320
throw new ArgumentOutOfRangeException(nameof(value), value, string.Format(SR.InvalidBoundArgument, nameof(
Value
), value, $"'{nameof(Minimum)}'", $"'{nameof(Maximum)}'"));
335
/// Occurs when the <see cref="
Value
"/> property has been changed in some way.
628
/// Indicates whether the <see cref="
Value
"/> property should be persisted.
632
return !
Value
.Equals(DefaultValue);
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
1184
int pageNum = ((int)_pageCounter.
Value
) - 1;
System.Windows.Forms.Design (3)
System\Windows\Forms\Design\FormatControl.CurrencyFormatType.cs (1)
35
switch ((int)_owner.decimalPlacesUpDown.
Value
)
System\Windows\Forms\Design\FormatControl.NumericFormatType.cs (1)
35
switch ((int)_owner.decimalPlacesUpDown.
Value
)
System\Windows\Forms\Design\FormatControl.ScientificFormatType.cs (1)
35
switch ((int)_owner.decimalPlacesUpDown.
Value
)
System.Windows.Forms.Tests (18)
NumericUpDownTests.cs (16)
550
upDown.
Value
.Should().Be(0);
564
upDown.
Value
.Should().Be(50);
650
upDown.
Value
.Should().Be(0);
658
upDown.
Value
.Should().Be(9);
666
upDown.
Value
.Should().Be(19);
680
upDown.
Value
.Should().Be(10);
695
subUpDown.
Value
.Should().Be(subUpDown.Minimum);
709
upDown.
Value
.Should().Be(10);
743
upDown.
Value
.Should().Be(100);
751
upDown.
Value
.Should().Be(11);
759
upDown.
Value
.Should().Be(20);
767
upDown.
Value
.Should().Be(100);
775
upDown.
Value
.Should().Be(100);
783
upDown.
Value
.Should().Be(100);
801
upDown.
Value
.Should().Be(decimal.MaxValue);
812
upDown.
Value
.Should().Be(decimal.MaxValue);
System\Windows\Forms\AccessibleObjects\DirectionButtonAccessibleObjectTests.cs (2)
61
Assert.Equal(testValue, numericUpDown.
Value
);
78
Assert.Equal(expected, numericUpDown.
Value
);
WinFormsControlsTest (20)
ComboBoxesWithScrollBars.cs (6)
51
comboBox1.DropDownHeight = (int)changeDDH_UpDown1.
Value
;
54
changeCBHeight_UpDown2.ValueChanged += (s, e) => comboBox2.Size = new Size(comboBox2.Size.Width, (int)changeCBHeight_UpDown2.
Value
);
57
comboBox3.DropDownHeight = (int)changeDDH_UpDown3.
Value
;
60
maxDropDownItemsUpDown1.ValueChanged += (s, e) => comboBox1.MaxDropDownItems = (int)maxDropDownItemsUpDown1.
Value
;
61
maxDropDownItemsUpDown2.ValueChanged += (s, e) => comboBox2.MaxDropDownItems = (int)maxDropDownItemsUpDown2.
Value
;
62
maxDropDownItemsUpDown3.ValueChanged += (s, e) => comboBox3.MaxDropDownItems = (int)maxDropDownItemsUpDown3.
Value
;
DataGridViewTest.cs (1)
93
Font = new Font("Tahoma", (float)numericUpDown1.
Value
, FontStyle.Regular);
ScrollBars.cs (6)
17
hScrollBar.Maximum = Decimal.ToInt32(numericMaximum.
Value
);
18
vScrollBar.Maximum = Decimal.ToInt32(numericMaximum.
Value
);
19
numericMinimum.Maximum = numericMaximum.
Value
;
25
hScrollBar.Minimum = Decimal.ToInt32(numericMinimum.
Value
);
26
vScrollBar.Minimum = Decimal.ToInt32(numericMinimum.
Value
);
27
numericMaximum.Minimum = numericMinimum.
Value
;
TrackBars.cs (7)
73
trackBar1.Minimum = (int)Math.Max(numericMinimum.
Value
, int.MinValue);
74
numericMaximum.Minimum = numericMinimum.
Value
;
75
numericFrequency.Maximum = (int)Math.Min(numericMaximum.
Value
- numericMaximum.Minimum, int.MaxValue);
86
trackBar1.Maximum = (int)Math.Min(numericMaximum.
Value
, int.MaxValue);
87
numericMinimum.Maximum = numericMaximum.
Value
;
88
numericFrequency.Maximum = (int)Math.Min(numericMaximum.
Value
- numericMaximum.Minimum, int.MaxValue);
99
trackBar1.TickFrequency = (int)numericFrequency.
Value
;