PaintEventArgs.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. //
  2. // System.Windows.Forms.PaintEventArgs.cs
  3. //
  4. // Author:
  5. // stubbed out by Paul Osman ([email protected])
  6. // 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 PaintEventArgs : EventArgs, IDisposable {
  18. #region Fields
  19. private Graphics mgraphics;
  20. private Rectangle mclipRect;
  21. #endregion
  22. public PaintEventArgs(Graphics graphics, Rectangle clipRect )
  23. {
  24. this.mgraphics = graphics;
  25. this.mclipRect = clipRect;
  26. }
  27. #region Public Properties
  28. public Rectangle ClipRectangle
  29. {
  30. get {
  31. return mclipRect;
  32. }
  33. }
  34. public Graphics Graphics {
  35. get {
  36. return mgraphics;
  37. }
  38. }
  39. #endregion
  40. #region Public Methods
  41. [MonoTODO]
  42. public void Dispose()
  43. {
  44. throw new NotImplementedException ();
  45. }
  46. /// <summary>
  47. /// Equality Operator
  48. /// </summary>
  49. ///
  50. /// <remarks>
  51. /// Compares two PaintEventArgs objects.
  52. /// The return value is based on the equivalence of
  53. /// Graphics and ClipRectangle Property
  54. /// of the two PaintEventArgs.
  55. /// </remarks>
  56. public static bool operator == (PaintEventArgs PaintEventArgsA, PaintEventArgs PaintEventArgsB)
  57. {
  58. return (PaintEventArgsA.Graphics == PaintEventArgsB.Graphics) && (PaintEventArgsA.ClipRectangle == PaintEventArgsB.ClipRectangle);
  59. }
  60. /// <summary>
  61. /// Inequality Operator
  62. /// </summary>
  63. ///
  64. /// <remarks>
  65. /// Compares two PaintEventArgs objects.
  66. /// The return value is based on the equivalence of
  67. /// Graphics and ClipRectangle Property
  68. /// of the two PaintEventArgs.
  69. /// </remarks>
  70. public static bool operator != (PaintEventArgs PaintEventArgsA, PaintEventArgs PaintEventArgsB)
  71. {
  72. return (PaintEventArgsA.Graphics != PaintEventArgsB.Graphics) || (PaintEventArgsA.ClipRectangle != PaintEventArgsB.ClipRectangle);
  73. }
  74. /// <summary>
  75. /// Equals Method
  76. /// </summary>
  77. ///
  78. /// <remarks>
  79. /// Checks equivalence of this
  80. /// PaintEventArgs and another
  81. /// object.
  82. /// </remarks>
  83. public override bool Equals (object obj)
  84. {
  85. if (!(obj is PaintEventArgs))return false;
  86. return (this == (PaintEventArgs) obj);
  87. }
  88. /// <summary>
  89. /// GetHashCode Method
  90. /// </summary>
  91. ///
  92. /// <remarks>
  93. /// Calculates a hashing value.
  94. /// </remarks>
  95. [MonoTODO]
  96. public override int GetHashCode ()
  97. {
  98. //FIXME: add class specific stuff;
  99. return base.GetHashCode();
  100. }
  101. /// <summary>
  102. /// ToString Method
  103. /// </summary>
  104. ///
  105. /// <remarks>
  106. /// Formats the object as a string.
  107. /// </remarks>
  108. [MonoTODO]
  109. public override string ToString ()
  110. {
  111. //FIXME: add class specific stuff;
  112. return base.ToString();
  113. }
  114. #endregion
  115. #region Protected Methods
  116. [MonoTODO]
  117. protected virtual void Dispose(bool disposing)
  118. {
  119. throw new NotImplementedException ();
  120. }
  121. #endregion
  122. }
  123. }