ToolBarButtonClickEventArgs.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. //
  2. // System.Windows.Forms.ToolBarButtonClickEventArgs
  3. //
  4. // Author:
  5. // stubbed out by Dennis Hayes([email protected])
  6. // stub ammended by Jaak Simm ([email protected])
  7. // Gianandrea Terzi ([email protected])
  8. //
  9. // (C) Ximian, Inc., 2002
  10. //
  11. using System;
  12. namespace System.Windows.Forms {
  13. /// <summary>
  14. /// Summary description for ToolBarButtonClickEventArgs.
  15. /// </summary>
  16. [MonoTODO]
  17. public class ToolBarButtonClickEventArgs : EventArgs {
  18. #region Field
  19. ToolBarButton button;
  20. #endregion
  21. #region Constructor
  22. public ToolBarButtonClickEventArgs(ToolBarButton button)
  23. {
  24. this.button=button;
  25. }
  26. #endregion
  27. #region Properties
  28. public ToolBarButton Button {
  29. get { return button; }
  30. set { button=value; }
  31. }
  32. #endregion
  33. #region Public Methods
  34. /// <summary>
  35. /// Equality Operator
  36. /// </summary>
  37. ///
  38. /// <remarks>
  39. /// Compares two ToolBarButtonClickEventArgs objects.
  40. /// The return value is based on the equivalence of
  41. /// Button Property
  42. /// of the two ToolBarButtonClickEventArgs.
  43. /// </remarks>
  44. public static bool operator == (ToolBarButtonClickEventArgs ToolBarButtonClickEventArgsA, ToolBarButtonClickEventArgs ToolBarButtonClickEventArgsB)
  45. {
  46. return (ToolBarButtonClickEventArgsA.Button == ToolBarButtonClickEventArgsB.Button);
  47. }
  48. /// <summary>
  49. /// Inequality Operator
  50. /// </summary>
  51. ///
  52. /// <remarks>
  53. /// Compares two ToolBarButtonClickEventArgs objects.
  54. /// The return value is based on the equivalence of
  55. /// Button Property
  56. /// of the two ToolBarButtonClickEventArgs.
  57. /// </remarks>
  58. public static bool operator != (ToolBarButtonClickEventArgs ToolBarButtonClickEventArgsA, ToolBarButtonClickEventArgs ToolBarButtonClickEventArgsB)
  59. {
  60. return (ToolBarButtonClickEventArgsA.Button != ToolBarButtonClickEventArgsB.Button);
  61. }
  62. /// <summary>
  63. /// Equals Method
  64. /// </summary>
  65. ///
  66. /// <remarks>
  67. /// Checks equivalence of this
  68. /// ToolBarButtonClickEventArgsA and another
  69. /// object.
  70. /// </remarks>
  71. public override bool Equals (object obj)
  72. {
  73. if (!(obj is ToolBarButtonClickEventArgs))return false;
  74. return (this == (ToolBarButtonClickEventArgs) 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 ToolBarButtonClickEventArgsA as a string.
  95. /// </remarks>
  96. [MonoTODO]
  97. public override string ToString ()
  98. {
  99. //FIXME: add class specific stuff;
  100. return base.ToString();
  101. }
  102. #endregion
  103. }
  104. }