QueryAccessibilityHelpEventArgs.cs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. //
  2. // System.Windows.Forms.QueryAccessibilityHelpEventArgs.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. // This is only a template. Nothing is implemented yet.
  15. //
  16. // </summary>
  17. public class QueryAccessibilityHelpEventArgs : EventArgs {
  18. #region Fields
  19. string helpnamespace;
  20. string helpstring;
  21. string helpkeyword;
  22. #endregion
  23. //
  24. // --- Constructor
  25. //
  26. public QueryAccessibilityHelpEventArgs()
  27. {
  28. this.helpkeyword = "";
  29. this.helpnamespace = "";
  30. this.helpstring = "";
  31. }
  32. public QueryAccessibilityHelpEventArgs(string helpNamespace, string helpString, string helpKeyword) {
  33. this.helpkeyword = helpKeyword;
  34. this.helpnamespace = helpNamespace;
  35. this.helpstring =helpString;
  36. }
  37. #region Public Properties
  38. [ComVisible(true)]
  39. public string HelpKeyword {
  40. get {
  41. return helpkeyword;
  42. }
  43. set {
  44. helpkeyword = value;
  45. }
  46. }
  47. [ComVisible(true)]
  48. public string HelpNamespace {
  49. get {
  50. return helpnamespace;
  51. }
  52. set {
  53. helpnamespace = value;
  54. }
  55. }
  56. [ComVisible(true)]
  57. public string HelpString {
  58. get {
  59. return helpstring;
  60. }
  61. set {
  62. helpstring = value;
  63. }
  64. }
  65. #endregion
  66. #region Public Methods
  67. /// <summary>
  68. /// Equality Operator
  69. /// </summary>
  70. ///
  71. /// <remarks>
  72. /// Compares two QueryAccessibilityHelpEventArgs objects.
  73. /// The return value is based on the equivalence of
  74. /// helpkeyword, helpnamespace and helpstring Property
  75. /// of the two QueryAccessibilityHelpEventArgs.
  76. /// </remarks>
  77. public static bool operator == (QueryAccessibilityHelpEventArgs QueryAccessibilityHelpEventArgsA, QueryAccessibilityHelpEventArgs QueryAccessibilityHelpEventArgsB)
  78. {
  79. return ((QueryAccessibilityHelpEventArgsA.HelpKeyword == QueryAccessibilityHelpEventArgsB.HelpKeyword) && (QueryAccessibilityHelpEventArgsA.HelpNamespace == QueryAccessibilityHelpEventArgsB.HelpNamespace) && (QueryAccessibilityHelpEventArgsA.HelpString == QueryAccessibilityHelpEventArgsB.HelpString));
  80. }
  81. /// <summary>
  82. /// Inequality Operator
  83. /// </summary>
  84. ///
  85. /// <remarks>
  86. /// Compares two QueryAccessibilityHelpEventArgs objects.
  87. /// The return value is based on the equivalence of
  88. /// helpkeyword, helpnamespace and helpstring Property
  89. /// of the two QueryAccessibilityHelpEventArgs.
  90. /// </remarks>
  91. public static bool operator != (QueryAccessibilityHelpEventArgs QueryAccessibilityHelpEventArgsA, QueryAccessibilityHelpEventArgs QueryAccessibilityHelpEventArgsB)
  92. {
  93. return ((QueryAccessibilityHelpEventArgsA.HelpKeyword != QueryAccessibilityHelpEventArgsB.HelpKeyword) || (QueryAccessibilityHelpEventArgsA.HelpNamespace != QueryAccessibilityHelpEventArgsB.HelpNamespace) || (QueryAccessibilityHelpEventArgsA.HelpString != QueryAccessibilityHelpEventArgsB.HelpString));
  94. }
  95. /// <summary>
  96. /// Equals Method
  97. /// </summary>
  98. ///
  99. /// <remarks>
  100. /// Checks equivalence of this
  101. /// QueryAccessibilityHelpEventArgs and another
  102. /// object.
  103. /// </remarks>
  104. public override bool Equals (object obj)
  105. {
  106. if (!(obj is QueryAccessibilityHelpEventArgs))return false;
  107. return (this == (QueryAccessibilityHelpEventArgs) obj);
  108. }
  109. /// <summary>
  110. /// GetHashCode Method
  111. /// </summary>
  112. ///
  113. /// <remarks>
  114. /// Calculates a hashing value.
  115. /// </remarks>
  116. [MonoTODO]
  117. public override int GetHashCode ()
  118. {
  119. //FIXME: add class specific stuff;
  120. return base.GetHashCode();
  121. }
  122. /// <summary>
  123. /// ToString Method
  124. /// </summary>
  125. ///
  126. /// <remarks>
  127. /// Formats the object as a string.
  128. /// </remarks>
  129. [MonoTODO]
  130. public override string ToString ()
  131. {
  132. //FIXME: add class specific stuff;
  133. return base.ToString();
  134. }
  135. #endregion
  136. }
  137. }