ScrollEventArgs.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. namespace System.Windows.Forms
  2. {
  3. public class ScrollEventArgs : EventArgs
  4. {
  5. public ScrollOrientation ScrollOrientation { get; }
  6. public ScrollEventType Type { get; }
  7. public int NewValue { get; set; }
  8. public int OldValue { get; } = -1;
  9. public ScrollEventArgs(ScrollEventType type, int newValue)
  10. {
  11. Type = type;
  12. NewValue = newValue;
  13. }
  14. public ScrollEventArgs(ScrollEventType type, int newValue, ScrollOrientation scroll)
  15. {
  16. Type = type;
  17. NewValue = newValue;
  18. ScrollOrientation = scroll;
  19. }
  20. public ScrollEventArgs(ScrollEventType type, int oldValue, int newValue)
  21. {
  22. Type = type;
  23. NewValue = newValue;
  24. OldValue = oldValue;
  25. }
  26. public ScrollEventArgs(ScrollEventType type, int oldValue, int newValue, ScrollOrientation scroll)
  27. {
  28. Type = type;
  29. NewValue = newValue;
  30. ScrollOrientation = scroll;
  31. OldValue = oldValue;
  32. }
  33. }
  34. public delegate void ScrollEventHandler(object sender, ScrollEventArgs e);
  35. }