**** Merged from MCS ****
[mono-project.git] / mcs / class / System.Windows.Forms / WINELib / ItemCheckEventArgs.cs
blobb2a7d7c16a59ec09e131481197fc8fb1d053f1ad
1 //
2 // System.Windows.Forms.ItemCheckEventArgs.cs
3 //
4 // Author:
5 // stubbed out by Daniel Carrera (dcarrera@math.toronto.edu)
6 // Partially completed by Dennis Hayes (dennish@raytek.com)
7 // Gianandrea Terzi (gianandrea.terzi@lario.com)
8 //
9 // (C) 2002 Ximian, Inc
12 namespace System.Windows.Forms {
14 // <summary>
15 // This is only a template. Nothing is implemented yet.
17 // </summary>
19 public class ItemCheckEventArgs : EventArgs {
21 #region Fields
22 private int index;
23 private CheckState newcheckvalue;
24 private CheckState currentcheckvalue;
25 #endregion
28 // --- Constructor
30 public ItemCheckEventArgs(int index, CheckState newCheckValue, CheckState currentValue )
32 this.index = index;
33 newcheckvalue = newCheckValue;
34 currentcheckvalue = currentValue;
37 #region Public Properties
38 public CheckState CurrentValue
40 get {
41 return currentcheckvalue;
44 public int Index {
45 get {
46 return index;
49 public CheckState NewValue {
50 get {
51 return newcheckvalue;
53 set {
54 newcheckvalue = value;
57 #endregion
59 #region Public Methods
61 /// <summary>
62 /// Equality Operator
63 /// </summary>
64 ///
65 /// <remarks>
66 /// Compares two ItemCheckEventArgs objects.
67 /// The return value is based on the equivalence of
68 /// CurrentValue, Index, NewValue and end Property
69 /// of the two ItemCheckEventArgs.
70 /// </remarks>
71 public static bool operator == (ItemCheckEventArgs ItemCheckEventArgsA, ItemCheckEventArgs ItemCheckEventArgsB)
73 return (ItemCheckEventArgsA.CurrentValue == ItemCheckEventArgsB.CurrentValue) &&
74 (ItemCheckEventArgsA.Index == ItemCheckEventArgsB.Index) &&
75 (ItemCheckEventArgsA.NewValue == ItemCheckEventArgsB.NewValue);
79 /// <summary>
80 /// Inequality Operator
81 /// </summary>
82 ///
83 /// <remarks>
84 /// Compares two ItemCheckEventArgs objects.
85 /// The return value is based on the equivalence of
86 /// CurrentValue, Index, NewValue and end Property
87 /// of the two ItemCheckEventArgs.
88 /// </remarks>
89 public static bool operator != (ItemCheckEventArgs ItemCheckEventArgsA, ItemCheckEventArgs ItemCheckEventArgsB)
91 return (ItemCheckEventArgsA.CurrentValue != ItemCheckEventArgsB.CurrentValue) ||
92 (ItemCheckEventArgsA.Index != ItemCheckEventArgsB.Index) ||
93 (ItemCheckEventArgsA.NewValue != ItemCheckEventArgsB.NewValue);
97 /// <summary>
98 /// Equals Method
99 /// </summary>
101 /// <remarks>
102 /// Checks equivalence of this
103 /// ItemCheckEventArgs and another
104 /// object.
105 /// </remarks>
106 public override bool Equals (object obj)
108 if (!(obj is ItemCheckEventArgs))return false;
109 return (this == (ItemCheckEventArgs) obj);
112 /// <summary>
113 /// GetHashCode Method
114 /// </summary>
116 /// <remarks>
117 /// Calculates a hashing value.
118 /// </remarks>
119 [MonoTODO]
120 public override int GetHashCode ()
122 //FIXME: add class specific stuff;
123 return base.GetHashCode();
126 /// <summary>
127 /// ToString Method
128 /// </summary>
130 /// <remarks>
131 /// Formats the object as a string.
132 /// </remarks>
133 [MonoTODO]
134 public override string ToString ()
136 //FIXME: add class specific stuff;
137 return base.ToString() + " ItemCheckEventArgs";
141 #endregion