Author: everaldo
Date: 2007-05-23 11:56:08 -0400 (Wed, 23 May 2007)
New Revision: 77847
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContextMenu.cs
Log:
2007-05-23 Everaldo Canuto <[EMAIL PROTECTED]>
* ContextMenu.cs: Implement Collapse.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-23 15:52:38 UTC (rev 77846)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-23 15:56:08 UTC (rev 77847)
@@ -1,3 +1,7 @@
+2007-05-23 Everaldo Canuto <[EMAIL PROTECTED]>
+
+ * ContextMenu.cs: Implement Collapse.
+
2007-05-23 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
* ToolBarButton.cs: Implement Name.
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContextMenu.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContextMenu.cs
2007-05-23 15:52:38 UTC (rev 77846)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContextMenu.cs
2007-05-23 15:56:08 UTC (rev 77847)
@@ -37,9 +37,18 @@
private Control src_control;
#region Events
-
+#if NET_2_0
+ static object CollapseEvent = new object ();
+#endif
static object PopupEvent = new object ();
-
+
+#if NET_2_0
+ public event EventHandler Collapse {
+ add { Events.AddHandler (CollapseEvent, value); }
+ remove { Events.RemoveHandler (CollapseEvent, value); }
+ }
+#endif
+
public event EventHandler Popup {
add { Events.AddHandler (PopupEvent, value); }
remove { Events.RemoveHandler (PopupEvent, value); }
@@ -77,7 +86,16 @@
#endregion Public Properties
#region Public Methods
-
+
+#if NET_2_0
+ protected internal virtual void OnCollapse (EventArgs e)
+ {
+ EventHandler eh = (EventHandler) (Events
[CollapseEvent]);
+ if (eh != null)
+ eh (this, e);
+ }
+#endif
+
protected internal virtual void OnPopup (EventArgs e)
{
EventHandler eh = (EventHandler) (Events [PopupEvent]);
@@ -95,6 +113,9 @@
OnPopup (EventArgs.Empty);
pos = control.PointToScreen (pos);
MenuTracker.TrackPopupMenu (this, pos);
+#if NET_2_0
+ OnCollapse (EventArgs.Empty);
+#endif
}
#if NET_2_0
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches