2 // System.Windows.Forms.NodeLabelEditEventArgs.cs
5 // stubbed out by Paul Osman (paul.osman@sympatico.ca)
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 NodeLabelEditEventArgs
: EventArgs
{
23 private TreeNode node
;
24 private string label
= "";
25 private bool canceledit
= false;
32 public NodeLabelEditEventArgs(TreeNode node
)
36 public NodeLabelEditEventArgs(TreeNode node
, string label
)
42 #region Public Properties
44 public bool CancelEdit
{
58 public TreeNode Node
{
66 #region Public Methods
73 /// Compares two NodeLabelEditEventArgs objects.
74 /// The return value is based on the equivalence of
75 /// label, Node and CancelEdit Property
76 /// of the two NodeLabelEditEventArgs.
78 public static bool operator == (NodeLabelEditEventArgs NodeLabelEditEventArgsA
, NodeLabelEditEventArgs NodeLabelEditEventArgsB
)
80 return (NodeLabelEditEventArgsA
.Label
== NodeLabelEditEventArgsB
.Label
) && (NodeLabelEditEventArgsA
.Node
== NodeLabelEditEventArgsB
.Node
) && (NodeLabelEditEventArgsA
.CancelEdit
== NodeLabelEditEventArgsB
.CancelEdit
);
84 /// Inequality Operator
88 /// Compares two NodeLabelEditEventArgs objects.
89 /// The return value is based on the equivalence of
90 /// label, Node and CancelEdit Property
91 /// of the two NodeLabelEditEventArgs.
93 public static bool operator != (NodeLabelEditEventArgs NodeLabelEditEventArgsA
, NodeLabelEditEventArgs NodeLabelEditEventArgsB
)
95 return (NodeLabelEditEventArgsA
.Label
!= NodeLabelEditEventArgsB
.Label
) || (NodeLabelEditEventArgsA
.Node
!= NodeLabelEditEventArgsB
.Node
) || (NodeLabelEditEventArgsA
.CancelEdit
!= NodeLabelEditEventArgsB
.CancelEdit
);
103 /// Checks equivalence of this
104 /// PropertyTabChangedEventArgs and another
107 public override bool Equals (object obj
)
109 if (!(obj
is NodeLabelEditEventArgs
))return false;
110 return (this == (NodeLabelEditEventArgs
) obj
);
114 /// GetHashCode Method
118 /// Calculates a hashing value.
121 public override int GetHashCode ()
123 //FIXME: add class specific stuff;
124 return base.GetHashCode();
132 /// Formats the object as a string.
135 public override string ToString ()
137 //FIXME: add class specific stuff;
138 return base.ToString();