ItemDragEventArgs.cs 3.0 KB

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