ContentsResizedEventArgs.cs 2.8 KB

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