LayoutEventArgs.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. //
  2. // System.Windows.Forms.LayoutEventArgs.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. namespace System.Windows.Forms {
  12. // <summary>
  13. // This is only a template. Nothing is implemented yet.
  14. //
  15. // </summary>
  16. public sealed class LayoutEventArgs : EventArgs {
  17. #region Fields
  18. private Control affectedcontrol;
  19. private string affectedproperty;
  20. #endregion
  21. //
  22. // --- Constructor
  23. //
  24. public LayoutEventArgs (Control affectedControl, string affectedProperty)
  25. {
  26. affectedproperty = affectedProperty;
  27. affectedcontrol = affectedControl;
  28. }
  29. #region Public Properties
  30. public Control AffectedControl {
  31. get {
  32. return affectedcontrol;
  33. }
  34. }
  35. public string AffectedProperty {
  36. get {
  37. return affectedproperty;
  38. }
  39. }
  40. #endregion
  41. #region Public Methods
  42. /// <summary>
  43. /// Equality Operator
  44. /// </summary>
  45. ///
  46. /// <remarks>
  47. /// Compares two LayoutEventArgs objects.
  48. /// The return value is based on the equivalence of
  49. /// AffectedControl and AffectedProperty Property
  50. /// of the two LayoutEventArgs.
  51. /// </remarks>
  52. public static bool operator == (LayoutEventArgs LayoutEventArgsA, LayoutEventArgs LayoutEventArgsB)
  53. {
  54. return (LayoutEventArgsA.AffectedControl == LayoutEventArgsB.AffectedControl) && (LayoutEventArgsA.AffectedProperty == LayoutEventArgsB.AffectedProperty);
  55. }
  56. /// <summary>
  57. /// Inequality Operator
  58. /// </summary>
  59. ///
  60. /// <remarks>
  61. /// Compares two LayoutEventArgs objects.
  62. /// The return value is based on the equivalence of
  63. /// AffectedControl and AffectedProperty Property
  64. /// of the two LayoutEventArgs.
  65. /// </remarks>
  66. public static bool operator != (LayoutEventArgs LayoutEventArgsA, LayoutEventArgs LayoutEventArgsB)
  67. {
  68. return (LayoutEventArgsA.AffectedControl != LayoutEventArgsB.AffectedControl) || (LayoutEventArgsA.AffectedProperty != LayoutEventArgsB.AffectedProperty);
  69. }
  70. /// <summary>
  71. /// Equals Method
  72. /// </summary>
  73. ///
  74. /// <remarks>
  75. /// Checks equivalence of this
  76. /// LayoutEventArgs and another
  77. /// object.
  78. /// </remarks>
  79. public override bool Equals (object obj)
  80. {
  81. if (!(obj is LayoutEventArgs))return false;
  82. return (this == (LayoutEventArgs) obj);
  83. }
  84. /// <summary>
  85. /// GetHashCode Method
  86. /// </summary>
  87. ///
  88. /// <remarks>
  89. /// Calculates a hashing value.
  90. /// </remarks>
  91. [MonoTODO]
  92. public override int GetHashCode ()
  93. {
  94. //FIXME: add class specific stuff;
  95. return base.GetHashCode();
  96. }
  97. /// <summary>
  98. /// ToString Method
  99. /// </summary>
  100. ///
  101. /// <remarks>
  102. /// Formats the object as a string.
  103. /// </remarks>
  104. [MonoTODO]
  105. public override string ToString ()
  106. {
  107. //FIXME: add class specific stuff;
  108. return base.ToString() + " LayoutEventArgs";
  109. }
  110. #endregion
  111. }
  112. }