2 // System.Windows.Forms.ItemCheckEventArgs.cs
\r
5 // stubbed out by Daniel Carrera (dcarrera@math.toronto.edu)
\r
6 // Partially completed by Dennis Hayes (dennish@raytek.com)
\r
7 // Gianandrea Terzi (gianandrea.terzi@lario.com)
\r
9 // (C) 2002 Ximian, Inc
\r
12 namespace System.Windows.Forms {
\r
15 // This is only a template. Nothing is implemented yet.
\r
19 public class ItemCheckEventArgs : EventArgs {
\r
23 private CheckState newcheckvalue;
\r
24 private CheckState currentcheckvalue;
\r
30 public ItemCheckEventArgs(int index, CheckState newCheckValue, CheckState currentValue )
\r
33 newcheckvalue = newCheckValue;
\r
34 currentcheckvalue = currentValue;
\r
37 #region Public Properties
\r
38 public CheckState CurrentValue
\r
41 return currentcheckvalue;
\r
49 public CheckState NewValue {
\r
51 return newcheckvalue;
\r
54 newcheckvalue = value;
\r
59 #region Public Methods
\r
62 /// Equality Operator
\r
66 /// Compares two ItemCheckEventArgs objects.
\r
67 /// The return value is based on the equivalence of
\r
68 /// CurrentValue, Index, NewValue and end Property
\r
69 /// of the two ItemCheckEventArgs.
\r
71 public static bool operator == (ItemCheckEventArgs ItemCheckEventArgsA, ItemCheckEventArgs ItemCheckEventArgsB)
\r
73 return (ItemCheckEventArgsA.CurrentValue == ItemCheckEventArgsB.CurrentValue) &&
\r
74 (ItemCheckEventArgsA.Index == ItemCheckEventArgsB.Index) &&
\r
75 (ItemCheckEventArgsA.NewValue == ItemCheckEventArgsB.NewValue);
\r
80 /// Inequality Operator
\r
84 /// Compares two ItemCheckEventArgs objects.
\r
85 /// The return value is based on the equivalence of
\r
86 /// CurrentValue, Index, NewValue and end Property
\r
87 /// of the two ItemCheckEventArgs.
\r
89 public static bool operator != (ItemCheckEventArgs ItemCheckEventArgsA, ItemCheckEventArgs ItemCheckEventArgsB)
\r
91 return (ItemCheckEventArgsA.CurrentValue != ItemCheckEventArgsB.CurrentValue) ||
\r
92 (ItemCheckEventArgsA.Index != ItemCheckEventArgsB.Index) ||
\r
93 (ItemCheckEventArgsA.NewValue != ItemCheckEventArgsB.NewValue);
\r
102 /// Checks equivalence of this
\r
103 /// ItemCheckEventArgs and another
\r
106 public override bool Equals (object obj)
\r
108 if (!(obj is ItemCheckEventArgs))return false;
\r
109 return (this == (ItemCheckEventArgs) obj);
\r
113 /// GetHashCode Method
\r
117 /// Calculates a hashing value.
\r
120 public override int GetHashCode ()
\r
122 //FIXME: add class specific stuff;
\r
123 return base.GetHashCode();
\r
127 /// ToString Method
\r
131 /// Formats the object as a string.
\r
134 public override string ToString ()
\r
136 //FIXME: add class specific stuff;
\r
137 return base.ToString() + " ItemCheckEventArgs";
\r