InvalidateEventArgs.cs 2.7 KB

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