PropertyTabChangedEventArgs.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. //
  2. // System.Windows.Forms.PropertyTabChangedEventArgs
  3. //
  4. // Author:
  5. // stubbed out by Jaak Simm ([email protected])
  6. // Dennis Hayes ([email protected])
  7. // Gianandrea Terzi ([email protected])
  8. //
  9. // (C) Ximian, Inc., 2002
  10. //
  11. using System.Runtime.InteropServices;
  12. using System.Windows.Forms.Design;
  13. namespace System.Windows.Forms {
  14. /// <summary>
  15. /// Provides data for the PropertyTabChanged event of a PropertyGrid.
  16. ///
  17. /// ToDo note:
  18. /// - nothing is implemented
  19. /// </summary>
  20. [MonoTODO]
  21. [ComVisible(true)]
  22. public class PropertyTabChangedEventArgs : EventArgs {
  23. #region Fields
  24. private PropertyTab oldtab;
  25. private PropertyTab newtab;
  26. #endregion
  27. #region Constructor
  28. //[ComVisible(true)]
  29. public PropertyTabChangedEventArgs(PropertyTab oldTab, PropertyTab newTab){
  30. this.oldtab = oldTab;
  31. this.newtab = newTab;
  32. }
  33. #endregion
  34. #region Public Properties
  35. [ComVisible(true)]
  36. public PropertyTab NewTab {
  37. get {
  38. return newtab;
  39. }
  40. }
  41. [ComVisible(true)]
  42. public PropertyTab OldTab {
  43. get {
  44. return oldtab;
  45. }
  46. }
  47. #endregion
  48. #region Public Methods
  49. /// <summary>
  50. /// Equality Operator
  51. /// </summary>
  52. ///
  53. /// <remarks>
  54. /// Compares two PropertyTabChangedEventArgs objects.
  55. /// The return value is based on the equivalence of
  56. /// oldtab and newtab Property
  57. /// of the two PropertyTabChangedEventArgs.
  58. /// </remarks>
  59. public static bool operator == (PropertyTabChangedEventArgs PropertyTabChangedEventArgsA, PropertyTabChangedEventArgs PropertyTabChangedEventArgsB)
  60. {
  61. return (PropertyTabChangedEventArgsA.NewTab == PropertyTabChangedEventArgsB.NewTab) && (PropertyTabChangedEventArgsA.OldTab == PropertyTabChangedEventArgsB.OldTab);
  62. }
  63. /// <summary>
  64. /// Inequality Operator
  65. /// </summary>
  66. ///
  67. /// <remarks>
  68. /// Compares two PropertyValueChangedEventArgs objects.
  69. /// The return value is based on the equivalence of
  70. /// ChangedItem and OldValue Property
  71. /// of the two PropertyValueChangedEventArgs.
  72. /// </remarks>
  73. public static bool operator != (PropertyTabChangedEventArgs PropertyTabChangedEventArgsA, PropertyTabChangedEventArgs PropertyTabChangedEventArgsB)
  74. {
  75. return (PropertyTabChangedEventArgsA.NewTab != PropertyTabChangedEventArgsB.NewTab) || (PropertyTabChangedEventArgsA.OldTab != PropertyTabChangedEventArgsB.OldTab);
  76. }
  77. /// <summary>
  78. /// Equals Method
  79. /// </summary>
  80. ///
  81. /// <remarks>
  82. /// Checks equivalence of this
  83. /// PropertyTabChangedEventArgs and another
  84. /// object.
  85. /// </remarks>
  86. public override bool Equals (object obj)
  87. {
  88. if (!(obj is PropertyTabChangedEventArgs))return false;
  89. return (this == (PropertyTabChangedEventArgs) 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();
  116. }
  117. #endregion
  118. }
  119. }