393 references to ScrollEventType
System.Windows.Forms (78)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (9)
2582
ScrollRowsByCount(rowsToScroll, rowsToScroll > 1 ?
ScrollEventType
.LargeIncrement :
ScrollEventType
.SmallIncrement);
2686
ScrollEventType
scrollEventType;
2748
scrollEventType = change > 0 ?
ScrollEventType
.SmallIncrement :
ScrollEventType
.SmallDecrement;
2752
scrollEventType = Columns.GetColumnCount(DataGridViewElementStates.Visible, oldFirstVisibleScrollingCol, DisplayedBandsInfo.FirstDisplayedScrollingCol) > 1 ?
ScrollEventType
.LargeIncrement :
ScrollEventType
.SmallIncrement;
2757
scrollEventType = Columns.GetColumnCount(DataGridViewElementStates.Visible, DisplayedBandsInfo.FirstDisplayedScrollingCol, oldFirstVisibleScrollingCol) > 1 ?
ScrollEventType
.LargeDecrement :
ScrollEventType
.SmallDecrement;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (34)
16573
ScrollRowsByCount(-1,
ScrollEventType
.SmallDecrement);
16595
ScrollRowsByCount(1,
ScrollEventType
.SmallIncrement);
18850
private void OnScroll(
ScrollEventType
scrollEventType, int oldValue, int newValue, ScrollOrientation orientation)
26290
ScrollRowsByCount(-rowsToScroll, rowsToScroll > 1 ?
ScrollEventType
.LargeDecrement :
ScrollEventType
.SmallDecrement);
26318
ScrollRowsByCount(rowsToScroll, rowsToScroll > 1 ?
ScrollEventType
.LargeIncrement :
ScrollEventType
.SmallIncrement);
26326
private unsafe void ScrollRows(int rowCount, int deltaY,
ScrollEventType
scrollEventType)
26398
private void ScrollRowsByCount(int rows,
ScrollEventType
scrollEventType)
26401
Debug.Assert((rows > 0 && (scrollEventType ==
ScrollEventType
.SmallIncrement || scrollEventType ==
ScrollEventType
.LargeIncrement))
26402
|| (rows < 0 && (scrollEventType ==
ScrollEventType
.SmallDecrement || scrollEventType ==
ScrollEventType
.LargeDecrement)));
26523
ScrollEventType
scrollEventType =
ScrollEventType
.EndScroll;
26530
scrollEventType = rowCount > 1 ?
ScrollEventType
.LargeIncrement :
ScrollEventType
.SmallIncrement;
26536
scrollEventType = rowCount < -1 ?
ScrollEventType
.LargeDecrement :
ScrollEventType
.SmallDecrement;
28410
if (se.Type is
ScrollEventType
.SmallIncrement or
ScrollEventType
.SmallDecrement)
28412
int dCols = (se.Type ==
ScrollEventType
.SmallIncrement) ? 1 : -1;
28416
else if (se.Type !=
ScrollEventType
.EndScroll)
28436
case
ScrollEventType
.SmallIncrement:
28443
ScrollRowsByCount(1,
ScrollEventType
.SmallIncrement);
28450
case
ScrollEventType
.SmallDecrement:
28454
ScrollRowsByCount(-1,
ScrollEventType
.SmallDecrement);
28461
case
ScrollEventType
.LargeIncrement:
28470
case
ScrollEventType
.LargeDecrement:
28477
case
ScrollEventType
.ThumbTrack:
28478
case
ScrollEventType
.First:
28479
case
ScrollEventType
.Last:
29884
ScrollRowsByCount(normOffset, normOffset < 0 ?
ScrollEventType
.SmallDecrement :
ScrollEventType
.SmallIncrement);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
3687
if (se.Type !=
ScrollEventType
.ThumbTrack && se.NewValue != se.OldValue)
System\Windows\Forms\Scrolling\ScrollableControl.cs (3)
1445
ScrollEventType
type = (
ScrollEventType
)m.WParamInternal.LOWORD;
1446
if (type !=
ScrollEventType
.EndScroll)
System\Windows\Forms\Scrolling\ScrollBar.cs (26)
546
DoScroll(
ScrollEventType
.SmallDecrement);
552
DoScroll(
ScrollEventType
.SmallIncrement);
559
DoScroll(
ScrollEventType
.EndScroll);
629
ScrollEventType
type = (
ScrollEventType
)m.WParamInternal.LOWORD;
633
private unsafe void DoScroll(
ScrollEventType
type)
640
case
ScrollEventType
.First:
641
type =
ScrollEventType
.Last;
644
case
ScrollEventType
.Last:
645
type =
ScrollEventType
.First;
648
case
ScrollEventType
.SmallDecrement:
649
type =
ScrollEventType
.SmallIncrement;
652
case
ScrollEventType
.SmallIncrement:
653
type =
ScrollEventType
.SmallDecrement;
656
case
ScrollEventType
.LargeDecrement:
657
type =
ScrollEventType
.LargeIncrement;
660
case
ScrollEventType
.LargeIncrement:
661
type =
ScrollEventType
.LargeDecrement;
674
case
ScrollEventType
.First:
678
case
ScrollEventType
.Last:
682
case
ScrollEventType
.SmallDecrement:
686
case
ScrollEventType
.SmallIncrement:
690
case
ScrollEventType
.LargeDecrement:
694
case
ScrollEventType
.LargeIncrement:
698
case
ScrollEventType
.ThumbPosition:
699
case
ScrollEventType
.ThumbTrack:
System\Windows\Forms\Scrolling\ScrollEventArgs.cs (5)
15
public ScrollEventArgs(
ScrollEventType
type, int newValue)
25
public ScrollEventArgs(
ScrollEventType
type, int newValue, ScrollOrientation scroll)
33
public ScrollEventArgs(
ScrollEventType
type, int oldValue, int newValue)
40
public ScrollEventArgs(
ScrollEventType
type, int oldValue, int newValue, ScrollOrientation scroll)
51
public
ScrollEventType
Type { get; }
System.Windows.Forms.Tests (315)
System\Windows\Forms\ScrollableControlTests.cs (2)
1982
foreach (
ScrollEventType
eventType in Enum.GetValues(typeof(
ScrollEventType
)))
System\Windows\Forms\ScrollBarTests.cs (273)
2242
new(
ScrollEventType
.SmallDecrement, 10, 9),
2243
new(
ScrollEventType
.EndScroll, 9, 9),
2251
new(
ScrollEventType
.SmallDecrement, 10, 9),
2252
new(
ScrollEventType
.EndScroll, 9, 9),
2260
new(
ScrollEventType
.SmallDecrement, 10, 9),
2261
new(
ScrollEventType
.SmallDecrement, 9, 8),
2262
new(
ScrollEventType
.EndScroll, 8, 8),
2270
new(
ScrollEventType
.SmallDecrement, 1, 0),
2271
new(
ScrollEventType
.EndScroll, 0, 0),
2279
new(
ScrollEventType
.SmallDecrement, 1, 0),
2280
new(
ScrollEventType
.SmallDecrement, 0, 0),
2281
new(
ScrollEventType
.EndScroll, 0, 0),
2289
new(
ScrollEventType
.SmallDecrement, 100, 99),
2290
new(
ScrollEventType
.SmallDecrement, 99, 98),
2291
new(
ScrollEventType
.EndScroll, 98, 98),
2300
new(
ScrollEventType
.SmallDecrement, 10, 9),
2301
new(
ScrollEventType
.EndScroll, 9, 9),
2309
new(
ScrollEventType
.SmallDecrement, 10, 9),
2310
new(
ScrollEventType
.EndScroll, 9, 9),
2318
new(
ScrollEventType
.SmallDecrement, 10, 9),
2319
new(
ScrollEventType
.SmallDecrement, 9, 8),
2320
new(
ScrollEventType
.EndScroll, 8, 8),
2328
new(
ScrollEventType
.SmallDecrement, 1, 0),
2329
new(
ScrollEventType
.EndScroll, 0, 0),
2337
new(
ScrollEventType
.SmallDecrement, 1, 0),
2338
new(
ScrollEventType
.SmallDecrement, 0, 0),
2339
new(
ScrollEventType
.EndScroll, 0, 0),
2347
new(
ScrollEventType
.SmallDecrement, 100, 99),
2348
new(
ScrollEventType
.SmallDecrement, 99, 98),
2349
new(
ScrollEventType
.EndScroll, 98, 98),
2359
new(
ScrollEventType
.SmallIncrement, 10, 11),
2360
new(
ScrollEventType
.EndScroll, 11, 11),
2368
new(
ScrollEventType
.SmallIncrement, 10, 11),
2369
new(
ScrollEventType
.EndScroll, 11, 11),
2377
new(
ScrollEventType
.SmallIncrement, 10, 11),
2378
new(
ScrollEventType
.SmallIncrement, 11, 12),
2379
new(
ScrollEventType
.EndScroll, 12, 12),
2387
new(
ScrollEventType
.SmallIncrement, 90, 91),
2388
new(
ScrollEventType
.EndScroll, 91, 91),
2396
new(
ScrollEventType
.SmallIncrement, 99, 91),
2397
new(
ScrollEventType
.EndScroll, 91, 91),
2405
new(
ScrollEventType
.SmallIncrement, 99, 91),
2406
new(
ScrollEventType
.SmallIncrement, 91, 91),
2407
new(
ScrollEventType
.EndScroll, 91, 91),
2416
new(
ScrollEventType
.SmallIncrement, 10, 11),
2417
new(
ScrollEventType
.EndScroll, 11, 11),
2425
new(
ScrollEventType
.SmallIncrement, 10, 11),
2426
new(
ScrollEventType
.EndScroll, 11, 11),
2434
new(
ScrollEventType
.SmallIncrement, 10, 11),
2435
new(
ScrollEventType
.SmallIncrement, 11, 12),
2436
new(
ScrollEventType
.EndScroll, 12, 12),
2444
new(
ScrollEventType
.SmallIncrement, 90, 91),
2445
new(
ScrollEventType
.EndScroll, 91, 91),
2453
new(
ScrollEventType
.SmallIncrement, 99, 91),
2454
new(
ScrollEventType
.EndScroll, 91, 91),
2462
new(
ScrollEventType
.SmallIncrement, 99, 91),
2463
new(
ScrollEventType
.SmallIncrement, 91, 91),
2464
new(
ScrollEventType
.EndScroll, 91, 91),
2523
yield return new object[] { new ScrollEventArgs(
ScrollEventType
.SmallDecrement, 2) };
2710
yield return new object[] { msg, RightToLeft.No, 100,
ScrollEventType
.SmallIncrement, 91,
ScrollEventType
.SmallIncrement };
2711
yield return new object[] { msg, RightToLeft.No, 99,
ScrollEventType
.SmallIncrement, 91,
ScrollEventType
.SmallIncrement };
2712
yield return new object[] { msg, RightToLeft.No, 91,
ScrollEventType
.SmallIncrement, 91,
ScrollEventType
.SmallIncrement };
2713
yield return new object[] { msg, RightToLeft.No, 85,
ScrollEventType
.SmallIncrement, 86,
ScrollEventType
.SmallIncrement };
2714
yield return new object[] { msg, RightToLeft.No, 15,
ScrollEventType
.SmallIncrement, 16,
ScrollEventType
.SmallIncrement };
2715
yield return new object[] { msg, RightToLeft.No, 10,
ScrollEventType
.SmallIncrement, 11,
ScrollEventType
.SmallIncrement };
2716
yield return new object[] { msg, RightToLeft.No, 1,
ScrollEventType
.SmallIncrement, 2,
ScrollEventType
.SmallIncrement };
2717
yield return new object[] { msg, RightToLeft.No, 0,
ScrollEventType
.SmallIncrement, 1,
ScrollEventType
.SmallIncrement };
2718
yield return new object[] { msg, RightToLeft.Yes, 100,
ScrollEventType
.SmallDecrement, 91,
ScrollEventType
.SmallIncrement };
2719
yield return new object[] { msg, RightToLeft.Yes, 99,
ScrollEventType
.SmallDecrement, 91,
ScrollEventType
.SmallIncrement };
2720
yield return new object[] { msg, RightToLeft.Yes, 91,
ScrollEventType
.SmallDecrement, 91,
ScrollEventType
.SmallIncrement };
2721
yield return new object[] { msg, RightToLeft.Yes, 85,
ScrollEventType
.SmallDecrement, 86,
ScrollEventType
.SmallIncrement };
2722
yield return new object[] { msg, RightToLeft.Yes, 15,
ScrollEventType
.SmallDecrement, 16,
ScrollEventType
.SmallIncrement };
2723
yield return new object[] { msg, RightToLeft.Yes, 10,
ScrollEventType
.SmallDecrement, 11,
ScrollEventType
.SmallIncrement };
2724
yield return new object[] { msg, RightToLeft.Yes, 1,
ScrollEventType
.SmallDecrement, 2,
ScrollEventType
.SmallIncrement };
2725
yield return new object[] { msg, RightToLeft.Yes, 0,
ScrollEventType
.SmallDecrement, 1,
ScrollEventType
.SmallIncrement };
2727
yield return new object[] { msg, RightToLeft.No, 100,
ScrollEventType
.LargeIncrement, 91,
ScrollEventType
.LargeIncrement };
2728
yield return new object[] { msg, RightToLeft.No, 99,
ScrollEventType
.LargeIncrement, 91,
ScrollEventType
.LargeIncrement };
2729
yield return new object[] { msg, RightToLeft.No, 91,
ScrollEventType
.LargeIncrement, 91,
ScrollEventType
.LargeIncrement };
2730
yield return new object[] { msg, RightToLeft.No, 85,
ScrollEventType
.LargeIncrement, 91,
ScrollEventType
.LargeIncrement };
2731
yield return new object[] { msg, RightToLeft.No, 15,
ScrollEventType
.LargeIncrement, 25,
ScrollEventType
.LargeIncrement };
2732
yield return new object[] { msg, RightToLeft.No, 10,
ScrollEventType
.LargeIncrement, 20,
ScrollEventType
.LargeIncrement };
2733
yield return new object[] { msg, RightToLeft.No, 1,
ScrollEventType
.LargeIncrement, 11,
ScrollEventType
.LargeIncrement };
2734
yield return new object[] { msg, RightToLeft.No, 0,
ScrollEventType
.LargeIncrement, 10,
ScrollEventType
.LargeIncrement };
2735
yield return new object[] { msg, RightToLeft.Yes, 100,
ScrollEventType
.LargeDecrement, 91,
ScrollEventType
.LargeIncrement };
2736
yield return new object[] { msg, RightToLeft.Yes, 99,
ScrollEventType
.LargeDecrement, 91,
ScrollEventType
.LargeIncrement };
2737
yield return new object[] { msg, RightToLeft.Yes, 91,
ScrollEventType
.LargeDecrement, 91,
ScrollEventType
.LargeIncrement };
2738
yield return new object[] { msg, RightToLeft.Yes, 85,
ScrollEventType
.LargeDecrement, 91,
ScrollEventType
.LargeIncrement };
2739
yield return new object[] { msg, RightToLeft.Yes, 15,
ScrollEventType
.LargeDecrement, 25,
ScrollEventType
.LargeIncrement };
2740
yield return new object[] { msg, RightToLeft.Yes, 10,
ScrollEventType
.LargeDecrement, 20,
ScrollEventType
.LargeIncrement };
2741
yield return new object[] { msg, RightToLeft.Yes, 1,
ScrollEventType
.LargeDecrement, 11,
ScrollEventType
.LargeIncrement };
2742
yield return new object[] { msg, RightToLeft.Yes, 0,
ScrollEventType
.LargeDecrement, 10,
ScrollEventType
.LargeIncrement };
2744
yield return new object[] { msg, RightToLeft.No, 100,
ScrollEventType
.SmallDecrement, 99,
ScrollEventType
.SmallDecrement };
2745
yield return new object[] { msg, RightToLeft.No, 99,
ScrollEventType
.SmallDecrement, 98,
ScrollEventType
.SmallDecrement };
2746
yield return new object[] { msg, RightToLeft.No, 91,
ScrollEventType
.SmallDecrement, 90,
ScrollEventType
.SmallDecrement };
2747
yield return new object[] { msg, RightToLeft.No, 85,
ScrollEventType
.SmallDecrement, 84,
ScrollEventType
.SmallDecrement };
2748
yield return new object[] { msg, RightToLeft.No, 15,
ScrollEventType
.SmallDecrement, 14,
ScrollEventType
.SmallDecrement };
2749
yield return new object[] { msg, RightToLeft.No, 10,
ScrollEventType
.SmallDecrement, 9,
ScrollEventType
.SmallDecrement };
2750
yield return new object[] { msg, RightToLeft.No, 1,
ScrollEventType
.SmallDecrement, 0,
ScrollEventType
.SmallDecrement };
2751
yield return new object[] { msg, RightToLeft.No, 0,
ScrollEventType
.SmallDecrement, 0,
ScrollEventType
.SmallDecrement };
2752
yield return new object[] { msg, RightToLeft.Yes, 100,
ScrollEventType
.SmallIncrement, 99,
ScrollEventType
.SmallDecrement };
2753
yield return new object[] { msg, RightToLeft.Yes, 99,
ScrollEventType
.SmallIncrement, 98,
ScrollEventType
.SmallDecrement };
2754
yield return new object[] { msg, RightToLeft.Yes, 91,
ScrollEventType
.SmallIncrement, 90,
ScrollEventType
.SmallDecrement };
2755
yield return new object[] { msg, RightToLeft.Yes, 85,
ScrollEventType
.SmallIncrement, 84,
ScrollEventType
.SmallDecrement };
2756
yield return new object[] { msg, RightToLeft.Yes, 15,
ScrollEventType
.SmallIncrement, 14,
ScrollEventType
.SmallDecrement };
2757
yield return new object[] { msg, RightToLeft.Yes, 10,
ScrollEventType
.SmallIncrement, 9,
ScrollEventType
.SmallDecrement };
2758
yield return new object[] { msg, RightToLeft.Yes, 1,
ScrollEventType
.SmallIncrement, 0,
ScrollEventType
.SmallDecrement };
2759
yield return new object[] { msg, RightToLeft.Yes, 0,
ScrollEventType
.SmallIncrement, 0,
ScrollEventType
.SmallDecrement };
2761
yield return new object[] { msg, RightToLeft.No, 100,
ScrollEventType
.LargeDecrement, 90,
ScrollEventType
.LargeDecrement };
2762
yield return new object[] { msg, RightToLeft.No, 99,
ScrollEventType
.LargeDecrement, 89,
ScrollEventType
.LargeDecrement };
2763
yield return new object[] { msg, RightToLeft.No, 91,
ScrollEventType
.LargeDecrement, 81,
ScrollEventType
.LargeDecrement };
2764
yield return new object[] { msg, RightToLeft.No, 85,
ScrollEventType
.LargeDecrement, 75,
ScrollEventType
.LargeDecrement };
2765
yield return new object[] { msg, RightToLeft.No, 15,
ScrollEventType
.LargeDecrement, 5,
ScrollEventType
.LargeDecrement };
2766
yield return new object[] { msg, RightToLeft.No, 10,
ScrollEventType
.LargeDecrement, 0,
ScrollEventType
.LargeDecrement };
2767
yield return new object[] { msg, RightToLeft.No, 1,
ScrollEventType
.LargeDecrement, 0,
ScrollEventType
.LargeDecrement };
2768
yield return new object[] { msg, RightToLeft.No, 0,
ScrollEventType
.LargeDecrement, 0,
ScrollEventType
.LargeDecrement };
2769
yield return new object[] { msg, RightToLeft.Yes, 100,
ScrollEventType
.LargeIncrement, 90,
ScrollEventType
.LargeDecrement };
2770
yield return new object[] { msg, RightToLeft.Yes, 99,
ScrollEventType
.LargeIncrement, 89,
ScrollEventType
.LargeDecrement };
2771
yield return new object[] { msg, RightToLeft.Yes, 91,
ScrollEventType
.LargeIncrement, 81,
ScrollEventType
.LargeDecrement };
2772
yield return new object[] { msg, RightToLeft.Yes, 85,
ScrollEventType
.LargeIncrement, 75,
ScrollEventType
.LargeDecrement };
2773
yield return new object[] { msg, RightToLeft.Yes, 15,
ScrollEventType
.LargeIncrement, 5,
ScrollEventType
.LargeDecrement };
2774
yield return new object[] { msg, RightToLeft.Yes, 10,
ScrollEventType
.LargeIncrement, 0,
ScrollEventType
.LargeDecrement };
2775
yield return new object[] { msg, RightToLeft.Yes, 1,
ScrollEventType
.LargeIncrement, 0,
ScrollEventType
.LargeDecrement };
2776
yield return new object[] { msg, RightToLeft.Yes, 0,
ScrollEventType
.LargeIncrement, 0,
ScrollEventType
.LargeDecrement };
2778
yield return new object[] { msg, RightToLeft.No, 100,
ScrollEventType
.First, 0,
ScrollEventType
.First };
2779
yield return new object[] { msg, RightToLeft.No, 99,
ScrollEventType
.First, 0,
ScrollEventType
.First };
2780
yield return new object[] { msg, RightToLeft.No, 91,
ScrollEventType
.First, 0,
ScrollEventType
.First };
2781
yield return new object[] { msg, RightToLeft.No, 85,
ScrollEventType
.First, 0,
ScrollEventType
.First };
2782
yield return new object[] { msg, RightToLeft.No, 15,
ScrollEventType
.First, 0,
ScrollEventType
.First };
2783
yield return new object[] { msg, RightToLeft.No, 10,
ScrollEventType
.First, 0,
ScrollEventType
.First };
2784
yield return new object[] { msg, RightToLeft.No, 1,
ScrollEventType
.First, 0,
ScrollEventType
.First };
2785
yield return new object[] { msg, RightToLeft.No, 0,
ScrollEventType
.First, 0,
ScrollEventType
.First };
2786
yield return new object[] { msg, RightToLeft.Yes, 100,
ScrollEventType
.Last, 0,
ScrollEventType
.First };
2787
yield return new object[] { msg, RightToLeft.Yes, 99,
ScrollEventType
.Last, 0,
ScrollEventType
.First };
2788
yield return new object[] { msg, RightToLeft.Yes, 91,
ScrollEventType
.Last, 0,
ScrollEventType
.First };
2789
yield return new object[] { msg, RightToLeft.Yes, 85,
ScrollEventType
.Last, 0,
ScrollEventType
.First };
2790
yield return new object[] { msg, RightToLeft.Yes, 15,
ScrollEventType
.Last, 0,
ScrollEventType
.First };
2791
yield return new object[] { msg, RightToLeft.Yes, 10,
ScrollEventType
.Last, 0,
ScrollEventType
.First };
2792
yield return new object[] { msg, RightToLeft.Yes, 1,
ScrollEventType
.Last, 0,
ScrollEventType
.First };
2793
yield return new object[] { msg, RightToLeft.Yes, 0,
ScrollEventType
.Last, 0,
ScrollEventType
.First };
2795
yield return new object[] { msg, RightToLeft.No, 100,
ScrollEventType
.Last, 91,
ScrollEventType
.Last };
2796
yield return new object[] { msg, RightToLeft.No, 99,
ScrollEventType
.Last, 91,
ScrollEventType
.Last };
2797
yield return new object[] { msg, RightToLeft.No, 91,
ScrollEventType
.Last, 91,
ScrollEventType
.Last };
2798
yield return new object[] { msg, RightToLeft.No, 85,
ScrollEventType
.Last, 91,
ScrollEventType
.Last };
2799
yield return new object[] { msg, RightToLeft.No, 15,
ScrollEventType
.Last, 91,
ScrollEventType
.Last };
2800
yield return new object[] { msg, RightToLeft.No, 10,
ScrollEventType
.Last, 91,
ScrollEventType
.Last };
2801
yield return new object[] { msg, RightToLeft.No, 1,
ScrollEventType
.Last, 91,
ScrollEventType
.Last };
2802
yield return new object[] { msg, RightToLeft.No, 0,
ScrollEventType
.Last, 91,
ScrollEventType
.Last };
2803
yield return new object[] { msg, RightToLeft.Yes, 100,
ScrollEventType
.First, 91,
ScrollEventType
.Last };
2804
yield return new object[] { msg, RightToLeft.Yes, 99,
ScrollEventType
.First, 91,
ScrollEventType
.Last };
2805
yield return new object[] { msg, RightToLeft.Yes, 91,
ScrollEventType
.First, 91,
ScrollEventType
.Last };
2806
yield return new object[] { msg, RightToLeft.Yes, 85,
ScrollEventType
.First, 91,
ScrollEventType
.Last };
2807
yield return new object[] { msg, RightToLeft.Yes, 15,
ScrollEventType
.First, 91,
ScrollEventType
.Last };
2808
yield return new object[] { msg, RightToLeft.Yes, 10,
ScrollEventType
.First, 91,
ScrollEventType
.Last };
2809
yield return new object[] { msg, RightToLeft.Yes, 1,
ScrollEventType
.First, 91,
ScrollEventType
.Last };
2810
yield return new object[] { msg, RightToLeft.Yes, 0,
ScrollEventType
.First, 91,
ScrollEventType
.Last };
2812
yield return new object[] { msg, RightToLeft.No, 10,
ScrollEventType
.EndScroll, 10,
ScrollEventType
.EndScroll };
2813
yield return new object[] { msg, RightToLeft.Yes, 10,
ScrollEventType
.EndScroll, 10,
ScrollEventType
.EndScroll };
2814
yield return new object[] { msg, RightToLeft.No, 10,
ScrollEventType
.ThumbPosition, 10,
ScrollEventType
.ThumbPosition };
2815
yield return new object[] { msg, RightToLeft.Yes, 10,
ScrollEventType
.ThumbPosition, 10,
ScrollEventType
.ThumbPosition };
2816
yield return new object[] { msg, RightToLeft.No, 10,
ScrollEventType
.ThumbTrack, 10,
ScrollEventType
.ThumbTrack };
2817
yield return new object[] { msg, RightToLeft.Yes, 10,
ScrollEventType
.ThumbTrack, 10,
ScrollEventType
.ThumbTrack };
2818
yield return new object[] { msg, RightToLeft.No, 10,
ScrollEventType
.SmallDecrement - 1, 10, (
ScrollEventType
)ushort.MaxValue };
2819
yield return new object[] { msg, RightToLeft.Yes, 10,
ScrollEventType
.SmallDecrement - 1, 10, (
ScrollEventType
)ushort.MaxValue };
2820
yield return new object[] { msg, RightToLeft.No, 10,
ScrollEventType
.EndScroll + 1, 10,
ScrollEventType
.EndScroll + 1 };
2821
yield return new object[] { msg, RightToLeft.Yes, 10,
ScrollEventType
.EndScroll + 1, 10,
ScrollEventType
.EndScroll + 1 };
2827
public void ScrollBar_WndProc_InvokeScroll_Success(int msg, RightToLeft rightToLeft, int originalValue,
ScrollEventType
eventType, int expectedValue,
ScrollEventType
expectedEventType)
System\Windows\Forms\ScrollEventArgsTests.cs (21)
10
[InlineData((
ScrollEventType
.EndScroll + 1), -2)]
11
[InlineData(
ScrollEventType
.LargeIncrement, -1)]
12
[InlineData(
ScrollEventType
.EndScroll, 0)]
13
[InlineData(
ScrollEventType
.LargeIncrement, 1)]
14
public void Ctor_ScrollEventType_Int(
ScrollEventType
type, int newValue)
24
[InlineData((
ScrollEventType
.EndScroll + 1), -2, -2)]
25
[InlineData(
ScrollEventType
.LargeIncrement, -1, -1)]
26
[InlineData(
ScrollEventType
.EndScroll, 0, 0)]
27
[InlineData(
ScrollEventType
.LargeIncrement, 1, 2)]
28
public void Ctor_ScrollEventType_Int_Int(
ScrollEventType
type, int oldValue, int newValue)
38
[InlineData((
ScrollEventType
.EndScroll + 1), -2, (ScrollOrientation.HorizontalScroll - 1))]
39
[InlineData(
ScrollEventType
.LargeIncrement, -1, ScrollOrientation.HorizontalScroll)]
40
[InlineData(
ScrollEventType
.EndScroll, 0, ScrollOrientation.VerticalScroll)]
41
[InlineData(
ScrollEventType
.LargeIncrement, 1, ScrollOrientation.VerticalScroll)]
42
public void Ctor_ScrollEventType_Int_ScrollOrientation(
ScrollEventType
type, int newValue, ScrollOrientation scroll)
52
[InlineData((
ScrollEventType
.EndScroll + 1), -2, -2, (ScrollOrientation.HorizontalScroll - 1))]
53
[InlineData(
ScrollEventType
.LargeIncrement, -1, -1, ScrollOrientation.HorizontalScroll)]
54
[InlineData(
ScrollEventType
.EndScroll, 0, 0, ScrollOrientation.VerticalScroll)]
55
[InlineData(
ScrollEventType
.LargeIncrement, 1, 2, ScrollOrientation.VerticalScroll)]
56
public void Ctor_ScrollEventType_Int_Int_ScrollOrientation(
ScrollEventType
type, int oldValue, int newValue, ScrollOrientation scroll)
72
ScrollEventArgs e = new(
ScrollEventType
.LargeIncrement, 2)
System\Windows\Forms\ToolStripDropDownTests.cs (2)
4721
foreach (
ScrollEventType
eventType in Enum.GetValues(typeof(
ScrollEventType
)))
System\Windows\Forms\ToolStripTests.cs (17)
6570
foreach (
ScrollEventType
eventType in Enum.GetValues(typeof(
ScrollEventType
)))
6612
foreach (
ScrollEventType
eventType in Enum.GetValues(typeof(
ScrollEventType
)))
6616
int expected = eventType !=
ScrollEventType
.ThumbTrack ? 1 : 0;
6670
foreach (
ScrollEventType
scrollEventType in Enum.GetValues(typeof(
ScrollEventType
)))
6672
if (scrollEventType ==
ScrollEventType
.ThumbTrack)
6682
yield return new object[] { new ScrollEventArgs(
ScrollEventType
.ThumbTrack, 100, 200), new Point(x, 1), new Point(0, 0) };
6683
yield return new object[] { new ScrollEventArgs(
ScrollEventType
.ThumbTrack, 200, 100), new Point(x, 1), new Point(0, 0) };
6684
yield return new object[] { new ScrollEventArgs(
ScrollEventType
.ThumbTrack, 0, 0), new Point(x, 1), new Point(0, 0) };
6715
foreach (
ScrollEventType
scrollEventType in Enum.GetValues(typeof(
ScrollEventType
)))
6717
if (scrollEventType ==
ScrollEventType
.ThumbTrack)
6727
yield return new object[] { new ScrollEventArgs(
ScrollEventType
.ThumbTrack, 100, 200), new Point(x, 1), new Point(0, 0), 0 };
6728
yield return new object[] { new ScrollEventArgs(
ScrollEventType
.ThumbTrack, 200, 100), new Point(x, 1), new Point(0, 0), 0 };
6729
yield return new object[] { new ScrollEventArgs(
ScrollEventType
.ThumbTrack, 0, 0), new Point(x, 1), new Point(0, 0), 0 };