2 // System.Windows.Forms.ControlEventArgs.cs
5 // stubbed out by Jaak Simm (jaaksimm@firm.ee)
6 // implemented for Gtk+ by Rachel Hestilow (hestilow@ximian.com)
7 // Dennis Hayes (dennish@Raytek.com)
8 // Gianandrea Terzi (gianandrea.terzi@lario.com)
10 // (C) Ximian, Inc., 2002
13 namespace System
.Windows
.Forms
{
19 public class ControlEventArgs
: EventArgs
{
25 public ControlEventArgs(Control control
)
27 this.control
= control
;
30 #region Public Properties
31 public Control Control
40 #region Public Methods
47 /// Compares two ControlEventArgs objects.
48 /// The return value is based on the equivalence of
50 /// of the two ControlEventArgs.
52 public static bool operator == (ControlEventArgs ControlEventArgsA
, ControlEventArgs ControlEventArgsB
)
54 return (ControlEventArgsA
.Control
== ControlEventArgsB
.Control
);
59 /// Inequality Operator
63 /// Compares two ControlEventArgs objects.
64 /// The return value is based on the equivalence of
66 /// of the two ControlEventArgs.
68 public static bool operator != (ControlEventArgs ControlEventArgsA
, ControlEventArgs ControlEventArgsB
)
70 return (ControlEventArgsA
.Control
!= ControlEventArgsB
.Control
);
79 /// Checks equivalence of this
80 /// ControlEventArgs and another
83 public override bool Equals (object obj
)
85 if (!(obj
is ControlEventArgs
))return false;
86 return (this == (ControlEventArgs
) obj
);
90 /// GetHashCode Method
94 /// Calculates a hashing value.
97 public override int GetHashCode ()
99 //FIXME: add class specific stuff;
100 return base.GetHashCode();
108 /// Formats the object as a string.
111 public override string ToString ()
113 //FIXME: add class specific stuff;
114 return base.ToString() + " ControlEventArgs";