1 write to _control
System.Windows.Forms.Tests (1)
System\Windows\Forms\DomainUpDownTests.cs (1)
17
_control
= new();
137 references to _control
System.Windows.Forms.Tests (137)
System\Windows\Forms\DomainUpDownTests.cs (137)
23
_control
.Items.Clear();
24
_control
.Dispose();
190
_control
.Padding = value;
192
_control
.Padding.Should().Be(expected);
193
_control
.IsHandleCreated.Should().BeFalse();
195
_control
.Padding = value;
196
_control
.Padding.Should().Be(expected);
197
_control
.IsHandleCreated.Should().BeFalse();
204
_control
.Handle.Should().NotBe(IntPtr.Zero);
206
_control
.Invalidated += (sender, e) => invalidatedCallCount++;
208
_control
.StyleChanged += (sender, e) => styleChangedCallCount++;
210
_control
.HandleCreated += (sender, e) => createdCallCount++;
212
_control
.Padding = value;
213
_control
.Padding.Should().Be(expected);
214
_control
.IsHandleCreated.Should().BeTrue();
219
_control
.Padding = value;
220
_control
.Padding.Should().Be(expected);
221
_control
.IsHandleCreated.Should().BeTrue();
233
sender.Should().Be(
_control
);
237
_control
.PaddingChanged += handler;
241
_control
.Padding = padding1;
242
_control
.Padding.Should().Be(padding1);
246
_control
.Padding = padding1;
247
_control
.Padding.Should().Be(padding1);
252
_control
.Padding = padding2;
253
_control
.Padding.Should().Be(padding2);
257
_control
.PaddingChanged -= handler;
258
_control
.Padding = padding1;
259
_control
.Padding.Should().Be(padding1);
360
_control
.Items.Add("Item1");
361
_control
.Items.Add("Item2");
367
sender.Should().Be(
_control
);
373
sender.Should().Be(
_control
);
378
_control
.TextChanged += textChangedHandler;
379
_control
.SelectedItemChanged += handler;
382
_control
.SelectedIndex = 0;
383
_control
.SelectedIndex.Should().Be(0);
388
_control
.SelectedIndex = 0;
389
_control
.SelectedIndex.Should().Be(0);
394
_control
.SelectedIndex = 1;
395
_control
.SelectedIndex.Should().Be(1);
400
_control
.SelectedIndex = -1;
401
_control
.SelectedIndex.Should().Be(-1);
406
_control
.TextChanged -= textChangedHandler;
407
_control
.SelectedItemChanged -= handler;
408
_control
.SelectedIndex = 0;
409
_control
.SelectedIndex.Should().Be(0);
420
_control
.Invoking(c => c.SelectedIndex = value).Should().Throw<ArgumentOutOfRangeException>().And.ParamName.Should().Be("value");
429
_control
.Items.Add("Item");
430
_control
.Invoking(c => c.SelectedIndex = value).Should().Throw<ArgumentOutOfRangeException>().And.ParamName.Should().Be("value");
552
_control
.Items.Add("Item1");
553
_control
.Items.Add("Item2");
559
sender.Should().Be(
_control
);
565
sender.Should().Be(
_control
);
570
_control
.TextChanged += textChangedHandler;
571
_control
.SelectedItemChanged += handler;
574
_control
.SelectedItem = "Item1";
575
_control
.SelectedItem.Should().Be("Item1");
580
_control
.SelectedItem = "Item1";
581
_control
.SelectedItem.Should().Be("Item1");
586
_control
.SelectedItem = "Item2";
587
_control
.SelectedItem.Should().Be("Item2");
592
_control
.SelectedItem = null;
593
_control
.SelectedItem.Should().BeNull();
598
_control
.TextChanged -= textChangedHandler;
599
_control
.SelectedItemChanged -= handler;
600
_control
.SelectedItem = "Item1";
601
_control
.SelectedItem.Should().Be("Item1");
882
_control
.Wrap = value;
884
_control
.Wrap.Should().Be(value);
885
_control
.IsHandleCreated.Should().BeFalse();
888
_control
.Wrap = value;
889
_control
.Wrap.Should().Be(value);
890
_control
.IsHandleCreated.Should().BeFalse();
893
_control
.Wrap = !value;
894
_control
.Wrap.Should().Be(!value);
895
_control
.IsHandleCreated.Should().BeFalse();
902
_control
.Handle.Should().NotBe(IntPtr.Zero);
904
_control
.Invalidated += (sender, e) => invalidatedCallCount++;
906
_control
.StyleChanged += (sender, e) => styleChangedCallCount++;
908
_control
.HandleCreated += (sender, e) => createdCallCount++;
910
_control
.Wrap = value;
911
_control
.Wrap.Should().Be(value);
912
_control
.IsHandleCreated.Should().BeTrue();
918
_control
.Wrap = value;
919
_control
.Wrap.Should().Be(value);
920
_control
.IsHandleCreated.Should().BeTrue();
926
_control
.Wrap = !value;
927
_control
.Wrap.Should().Be(!value);
928
_control
.IsHandleCreated.Should().BeTrue();
1114
_control
.Items.Add("foo1");
1115
_control
.Items.Add("foo2");
1116
_control
.Items.Add("foo3");
1117
_control
.Items.Add("Cowman");
1118
_control
.Items.Add("foo4");
1119
_control
.MatchIndex(text, false, start).Should().Be(expected);
1125
_control
.Items.Add("item1");
1126
Action act = () =>
_control
.MatchIndex(null, false, 0);
1353
_control
.Items.AddRange(new string[] { "Item1", "Item2", "Item3" });
1355
_control
.SelectedIndex = initialIndex;
1356
_control
.Wrap = wrap;
1358
_control
.DownButton();
1360
_control
.SelectedIndex.Should().Be(expectedIndex);
1370
_control
.Items.AddRange(new string[] { "Item1", "Item2", "Item3" });
1372
_control
.SelectedIndex = initialIndex;
1373
_control
.Wrap = wrap;
1375
_control
.DownButton();
1376
_control
.DownButton();
1378
_control
.SelectedIndex.Should().Be(expectedIndex);
1386
_control
.Items.Clear();
1387
_control
.Items.AddRange(items);
1388
_control
.SelectedIndex = selectedIndex;
1390
string s =
_control
.ToString();
1401
_control
.Items.AddRange(new string[] { "Item1", "Item2", "Item3" });
1402
_control
.Text = text;
1403
_control
.UpButton();
1404
_control
.SelectedIndex.Should().Be(expectedIndex);
1410
_control
.Text = "NoSuchItem";
1411
_control
.UpButton();
1412
_control
.SelectedIndex.Should().Be(-1);
1418
_control
.Items.AddRange(new string[] { "Item1", "Item2", "Item3" });
1419
_control
.SelectedIndex = 2;
1420
_control
.UpButton();
1421
_control
.SelectedIndex.Should().Be(1);
1427
_control
.Items.AddRange(new string[] { "Item1", "Item2", "Item3" });
1428
_control
.SelectedIndex = 0;
1429
_control
.Wrap = false;
1430
_control
.UpButton();
1431
_control
.SelectedIndex.Should().Be(0);
1437
_control
.Items.AddRange(new string[] { "Item1", "Item2", "Item3" });
1438
_control
.SelectedIndex = 0;
1439
_control
.Wrap = true;
1440
_control
.UpButton();
1441
_control
.SelectedIndex.Should().Be(2);
1447
_control
.Items.Clear();
1448
_control
.UpButton();
1449
_control
.SelectedIndex.Should().Be(-1);