QueryContinueDragEventArgs.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. //
  2. // System.Windows.Forms.QueryContinueDragEventArgs.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. using System.Runtime.InteropServices;
  12. namespace System.Windows.Forms {
  13. // <summary>
  14. // Just a template.
  15. // </summary>
  16. public class QueryContinueDragEventArgs : EventArgs {
  17. #region Fields
  18. private int keystate;
  19. private bool escapepressed;
  20. private DragAction action;
  21. #endregion
  22. //
  23. // --- Constructor
  24. //
  25. //[ComVisible(true)]
  26. public QueryContinueDragEventArgs(int keyState, bool escapePressed, DragAction action)
  27. {
  28. this.keystate = keyState;
  29. this.escapepressed = escapePressed;
  30. this.action = action;
  31. }
  32. #region Public Properties
  33. [ComVisible(true)]
  34. public DragAction Action {
  35. get {
  36. return action;
  37. }
  38. set {
  39. action = value;
  40. }
  41. }
  42. [ComVisible(true)]
  43. public bool EscapePressed {
  44. get {
  45. return escapepressed;
  46. }
  47. }
  48. [ComVisible(true)]
  49. public int KeyState {
  50. get {
  51. return keystate;
  52. }
  53. }
  54. #endregion
  55. #region Public Methods
  56. /// <summary>
  57. /// Equality Operator
  58. /// </summary>
  59. ///
  60. /// <remarks>
  61. /// Compares two QueryContinueDragEventArgs objects.
  62. /// The return value is based on the equivalence of
  63. /// keystate, escaperessed and action Property
  64. /// of the two QueryContinueDragEventArgs.
  65. /// </remarks>
  66. public static bool operator == (QueryContinueDragEventArgs QueryContinueDragEventArgsA, QueryContinueDragEventArgs QueryContinueDragEventArgsB)
  67. {
  68. return ((QueryContinueDragEventArgsA.EscapePressed == QueryContinueDragEventArgsB.EscapePressed) && (QueryContinueDragEventArgsA.KeyState == QueryContinueDragEventArgsB.KeyState) && (QueryContinueDragEventArgsA.Action == QueryContinueDragEventArgsB.Action));
  69. }
  70. /// <summary>
  71. /// Inequality Operator
  72. /// </summary>
  73. ///
  74. /// <remarks>
  75. /// Compares two ScrollEventArgs objects.
  76. /// The return value is based on the equivalence of
  77. /// newvalue and type Property
  78. /// of the two ScrollEventArgs.
  79. /// </remarks>
  80. public static bool operator != (QueryContinueDragEventArgs QueryContinueDragEventArgsA, QueryContinueDragEventArgs QueryContinueDragEventArgsB)
  81. {
  82. return ((QueryContinueDragEventArgsA.EscapePressed != QueryContinueDragEventArgsB.EscapePressed) || (QueryContinueDragEventArgsA.KeyState != QueryContinueDragEventArgsB.KeyState) || (QueryContinueDragEventArgsA.Action != QueryContinueDragEventArgsB.Action));
  83. }
  84. /// <summary>
  85. /// Equals Method
  86. /// </summary>
  87. ///
  88. /// <remarks>
  89. /// Checks equivalence of this
  90. /// QueryContinueDragEventArgs and another
  91. /// object.
  92. /// </remarks>
  93. public override bool Equals (object obj)
  94. {
  95. if (!(obj is QueryContinueDragEventArgs))return false;
  96. return (this == (QueryContinueDragEventArgs) obj);
  97. }
  98. /// <summary>
  99. /// GetHashCode Method
  100. /// </summary>
  101. ///
  102. /// <remarks>
  103. /// Calculates a hashing value.
  104. /// </remarks>
  105. [MonoTODO]
  106. public override int GetHashCode ()
  107. {
  108. //FIXME: add class specific stuff;
  109. return base.GetHashCode();
  110. }
  111. /// <summary>
  112. /// ToString Method
  113. /// </summary>
  114. ///
  115. /// <remarks>
  116. /// Formats the object as a string.
  117. /// </remarks>
  118. [MonoTODO]
  119. public override string ToString ()
  120. {
  121. //FIXME: add class specific stuff;
  122. return base.ToString();
  123. }
  124. #endregion
  125. }
  126. }