2 // System.Windows.Forms.ItemCheckEventArgs.cs
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)
9 // (C) 2002 Ximian, Inc
12 namespace System
.Windows
.Forms
{
15 // This is only a template. Nothing is implemented yet.
19 public class ItemCheckEventArgs
: EventArgs
{
23 private CheckState newcheckvalue
;
24 private CheckState currentcheckvalue
;
30 public ItemCheckEventArgs(int index
, CheckState newCheckValue
, CheckState currentValue
)
33 newcheckvalue
= newCheckValue
;
34 currentcheckvalue
= currentValue
;
37 #region Public Properties
38 public CheckState CurrentValue
41 return currentcheckvalue
;
49 public CheckState NewValue
{
54 newcheckvalue
= value;
59 #region Public Methods
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.
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
);
80 /// Inequality Operator
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.
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
);
102 /// Checks equivalence of this
103 /// ItemCheckEventArgs and another
106 public override bool Equals (object obj
)
108 if (!(obj
is ItemCheckEventArgs
))return false;
109 return (this == (ItemCheckEventArgs
) obj
);
113 /// GetHashCode Method
117 /// Calculates a hashing value.
120 public override int GetHashCode ()
122 //FIXME: add class specific stuff;
123 return base.GetHashCode();
131 /// Formats the object as a string.
134 public override string ToString ()
136 //FIXME: add class specific stuff;
137 return base.ToString() + " ItemCheckEventArgs";