ScrollEventArgs.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. //
  2. // System.Windows.Forms.ScrollEventArgs.cs
  3. //
  4. // Author:
  5. // stubbed out by Daniel Carrera ([email protected])
  6. // Dennis Hayes ([email protected])
  7. // Gianandrea Terzi ([email protected])
  8. //
  9. // (C) 2002 Ximian, Inc
  10. //
  11. using System.Runtime.InteropServices;
  12. namespace System.Windows.Forms {
  13. // <summary>
  14. // This is only a template. Nothing is implemented yet.
  15. // </summary>
  16. public class ScrollEventArgs : EventArgs {
  17. #region Fields
  18. private int newvalue;
  19. private ScrollEventType type;
  20. #endregion
  21. //
  22. // --- Constructor
  23. //
  24. [MonoTODO]
  25. public ScrollEventArgs(ScrollEventType type, int newVal)
  26. {
  27. throw new NotImplementedException ();
  28. }
  29. #region Public Properties
  30. [ComVisible(true)]
  31. public int NewValue
  32. {
  33. get {
  34. return newvalue;
  35. }
  36. set {
  37. newvalue = value;
  38. }
  39. }
  40. [ComVisible(true)]
  41. public ScrollEventType Type {
  42. get {
  43. return type;
  44. }
  45. }
  46. #endregion
  47. #region Public Methods
  48. /// <summary>
  49. /// Equality Operator
  50. /// </summary>
  51. ///
  52. /// <remarks>
  53. /// Compares two ScrollEventArgs objects.
  54. /// The return value is based on the equivalence of
  55. /// newvalue and type Property
  56. /// of the two ScrollEventArgs.
  57. /// </remarks>
  58. public static bool operator == (ScrollEventArgs ScrollEventArgsA, ScrollEventArgs ScrollEventArgsB)
  59. {
  60. return ((ScrollEventArgsA.NewValue == ScrollEventArgsB.NewValue) && (ScrollEventArgsA.Type == ScrollEventArgsB.Type));
  61. }
  62. /// <summary>
  63. /// Inequality Operator
  64. /// </summary>
  65. ///
  66. /// <remarks>
  67. /// Compares two ScrollEventArgs objects.
  68. /// The return value is based on the equivalence of
  69. /// newvalue and type Property
  70. /// of the two ScrollEventArgs.
  71. /// </remarks>
  72. public static bool operator != (ScrollEventArgs ScrollEventArgsA, ScrollEventArgs ScrollEventArgsB)
  73. {
  74. return ((ScrollEventArgsA.NewValue != ScrollEventArgsB.NewValue) || (ScrollEventArgsA.Type != ScrollEventArgsB.Type));
  75. }
  76. /// <summary>
  77. /// Equals Method
  78. /// </summary>
  79. ///
  80. /// <remarks>
  81. /// Checks equivalence of this
  82. /// UICuesEventArgs and another
  83. /// object.
  84. /// </remarks>
  85. public override bool Equals (object obj)
  86. {
  87. if (!(obj is ScrollEventArgs))return false;
  88. return (this == (ScrollEventArgs) obj);
  89. }
  90. /// <summary>
  91. /// GetHashCode Method
  92. /// </summary>
  93. ///
  94. /// <remarks>
  95. /// Calculates a hashing value.
  96. /// </remarks>
  97. [MonoTODO]
  98. public override int GetHashCode ()
  99. {
  100. //FIXME: add class specific stuff;
  101. return base.GetHashCode();
  102. }
  103. /// <summary>
  104. /// ToString Method
  105. /// </summary>
  106. ///
  107. /// <remarks>
  108. /// Formats the object as a string.
  109. /// </remarks>
  110. [MonoTODO]
  111. public override string ToString ()
  112. {
  113. //FIXME: add class specific stuff;
  114. return base.ToString();
  115. }
  116. #endregion
  117. }
  118. }