2002-10-18 DennisHayes <dennish@raytek.com>
[mono.git] / mcs / class / System.Windows.Forms / WINELib / ItemCheckEventArgs.cs
1 //\r
2 // System.Windows.Forms.ItemCheckEventArgs.cs\r
3 //\r
4 // Author:\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
8 //\r
9 // (C) 2002 Ximian, Inc\r
10 //\r
11 \r
12 namespace System.Windows.Forms {\r
13 \r
14         // <summary>\r
15         //      This is only a template.  Nothing is implemented yet.\r
16         //\r
17         // </summary>\r
18 \r
19         public class ItemCheckEventArgs : EventArgs {\r
20 \r
21                 #region Fields\r
22                 private int index;\r
23                 private CheckState newcheckvalue;\r
24                 private CheckState currentcheckvalue;\r
25                 #endregion\r
26 \r
27                 //\r
28                 //  --- Constructor\r
29                 //\r
30                 public ItemCheckEventArgs(int index,  CheckState newCheckValue, CheckState currentValue ) \r
31                 {\r
32                         this.index = index;\r
33                         newcheckvalue = newCheckValue;\r
34                         currentcheckvalue = currentValue;\r
35                 }\r
36                 \r
37                 #region Public Properties\r
38                 public CheckState CurrentValue \r
39                 {\r
40                         get {\r
41                                 return currentcheckvalue;\r
42                         }\r
43                 }\r
44                 public int Index {\r
45                         get {\r
46                                 return index;\r
47                         }\r
48                 }\r
49                 public CheckState NewValue {\r
50                         get {\r
51                                 return newcheckvalue;\r
52                         }\r
53                         set {\r
54                                 newcheckvalue = value;\r
55                         }\r
56                 }\r
57                 #endregion\r
58 \r
59                 #region Public Methods\r
60 \r
61                 /// <summary>\r
62                 ///     Equality Operator\r
63                 /// </summary>\r
64                 ///\r
65                 /// <remarks>\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
70                 /// </remarks>\r
71                 public static bool operator == (ItemCheckEventArgs ItemCheckEventArgsA, ItemCheckEventArgs ItemCheckEventArgsB) \r
72                 {\r
73                         return (ItemCheckEventArgsA.CurrentValue == ItemCheckEventArgsB.CurrentValue) && \r
74                                    (ItemCheckEventArgsA.Index == ItemCheckEventArgsB.Index) && \r
75                                    (ItemCheckEventArgsA.NewValue == ItemCheckEventArgsB.NewValue);\r
76 \r
77                 }\r
78                 \r
79                 /// <summary>\r
80                 ///     Inequality Operator\r
81                 /// </summary>\r
82                 ///\r
83                 /// <remarks>\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
88                 /// </remarks>\r
89                 public static bool operator != (ItemCheckEventArgs ItemCheckEventArgsA, ItemCheckEventArgs ItemCheckEventArgsB) \r
90                 {\r
91                         return (ItemCheckEventArgsA.CurrentValue != ItemCheckEventArgsB.CurrentValue) || \r
92                                 (ItemCheckEventArgsA.Index != ItemCheckEventArgsB.Index) || \r
93                                 (ItemCheckEventArgsA.NewValue != ItemCheckEventArgsB.NewValue);\r
94 \r
95                 }\r
96 \r
97                 /// <summary>\r
98                 ///     Equals Method\r
99                 /// </summary>\r
100                 ///\r
101                 /// <remarks>\r
102                 ///     Checks equivalence of this\r
103                 ///     ItemCheckEventArgs and another\r
104                 ///     object.\r
105                 /// </remarks>\r
106                 public override bool Equals (object obj) \r
107                 {\r
108                         if (!(obj is ItemCheckEventArgs))return false;\r
109                         return (this == (ItemCheckEventArgs) obj);\r
110                 }\r
111 \r
112                 /// <summary>\r
113                 ///     GetHashCode Method\r
114                 /// </summary>\r
115                 ///\r
116                 /// <remarks>\r
117                 ///     Calculates a hashing value.\r
118                 /// </remarks>\r
119                 [MonoTODO]\r
120                 public override int GetHashCode () \r
121                 {\r
122                         //FIXME: add class specific stuff;\r
123                         return base.GetHashCode();\r
124                 }\r
125 \r
126                 /// <summary>\r
127                 ///     ToString Method\r
128                 /// </summary>\r
129                 ///\r
130                 /// <remarks>\r
131                 ///     Formats the object as a string.\r
132                 /// </remarks>\r
133                 [MonoTODO]\r
134                 public override string ToString () \r
135                 {\r
136                         //FIXME: add class specific stuff;\r
137                         return base.ToString() + " ItemCheckEventArgs";\r
138                 }\r
139 \r
140 \r
141                 #endregion\r
142         }\r
143 }\r