2 // System.Windows.Forms.StatusBarPanelClickEventArgs
5 // stubbed out by Richard Baumann (biochem333@nyc.rr.com)
6 // Partially completed by Dennis Hayes (dennish@raytek.com)
7 // Gianandrea Terzi (gianandrea.terzi@lario.com)
9 // (C) Ximian, Inc., 2002
12 namespace System
.Windows
.Forms
{
15 /// Provides data for the PanelClick event.
17 public class StatusBarPanelClickEventArgs
: MouseEventArgs
{
19 private StatusBarPanel panel
;
21 /// --- Constructor ---
22 public StatusBarPanelClickEventArgs(StatusBarPanel panel
, MouseButtons button
, int clicks
, int x
, int y
) : base(button
, clicks
, x
, y
, 0)
27 #region Public Properties
30 /// StatusBarPanel Property
34 /// Gets the StatusBarPanel to draw.
36 public StatusBarPanel StatusBarPanel
47 #region Public Methods
53 /// Compares two StatusBarPanelClickEventArgs objects.
54 /// The return value is based on the equivalence of
55 /// the StatusBarPanel, Button, Clicks, X, and Y
56 /// properties of the two StatusBarPanelClickEventArgs.
58 public static bool operator == (StatusBarPanelClickEventArgs objA
, StatusBarPanelClickEventArgs objB
)
60 return ((objA
.panel
== objB
.panel
) && (objA
.Button
== objB
.Button
) && (objA
.Clicks
== objB
.Clicks
) && (objA
.X
== objB
.X
) && (objA
.Y
== objB
.Y
));
64 /// Inequality Operator
68 /// Compares two StatusBarPanelClickEventArgs objects.
69 /// The return value is based on the equivalence of
70 /// the StatusBarPanel, Button, Clicks, X, and Y
71 /// properties of the two StatusBarPanelClickEventArgs.
73 public static bool operator != (StatusBarPanelClickEventArgs objA
, StatusBarPanelClickEventArgs objB
)
75 return ((objA
.panel
!= objB
.panel
) || (objA
.Button
!= objB
.Button
) || (objA
.Clicks
!= objB
.Clicks
) || (objA
.X
!= objB
.X
) || (objA
.Y
!= objB
.Y
));
83 /// Checks equivalence of this
84 /// StatusBarPanelClickEventArgs and another
87 public override bool Equals (object obj
)
89 if (!(obj
is StatusBarPanelClickEventArgs
))return false;
90 return (this == (StatusBarPanelClickEventArgs
) obj
);
94 /// GetHashCode Method
98 /// Calculates a hashing value.
100 public override int GetHashCode ()
102 return unchecked(panel
.GetHashCode() * base.GetHashCode());
110 /// Formats the StatusBarPanelClickEventArgs as a string.
113 public override string ToString ()
115 //FIXME: add class specific stuff;
116 return base.ToString();