Author: everaldo
Date: 2007-05-23 21:18:28 -0400 (Wed, 23 May 2007)
New Revision: 77885

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs
Log:
        * LinkLabel.cs: Implement LinkCollection.Add with Link parameter (2.0).

2007-05-23  Everaldo Canuto  <[EMAIL PROTECTED]>



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-05-24 01:01:46 UTC (rev 77884)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-05-24 01:18:28 UTC (rev 77885)
@@ -1,5 +1,9 @@
 2007-05-23  Everaldo Canuto  <[EMAIL PROTECTED]>
 
+       * LinkLabel.cs: Implement LinkCollection.Add with Link parameter (2.0).
+
+2007-05-23  Everaldo Canuto  <[EMAIL PROTECTED]>
+
        * LinkLabelLinkClickedEventArgs.cs, LinkLabel.cs: Implement Button 
property.
 
 2007-05-23  Everaldo Canuto  <[EMAIL PROTECTED]>

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs     
2007-05-24 01:01:46 UTC (rev 77884)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs     
2007-05-24 01:18:28 UTC (rev 77885)
@@ -918,6 +918,28 @@
                                }
                        }
 
+#if NET_2_0
+                       public
+#else
+                       internal
+#endif
+                       int Add (Link link)
+                       {
+                               /* remove the default 0,-1 link */
+                               if (IsDefault) {
+                                       /* don't call Clear() here to save the 
additional CreateLinkPieces */
+                                       collection.Clear ();
+                               }
+
+                               int idx = collection.Add (link);
+
+                               owner.sorted_links = null;
+                               owner.CheckLinks ();
+                               owner.CreateLinkPieces ();
+
+                               return idx;
+                       }
+
                        public Link Add (int start, int length)
                        {
                                return Add (start, length, null);
@@ -934,22 +956,12 @@
                        public Link Add (int start, int length, object o)
                        {
                                Link link = new Link (owner);
-                               int idx;
-
-                               /* remove the default 0,-1 link */
-                               if (IsDefault) {
-                                       /* don't call Clear() here to save the 
additional CreateLinkPieces */
-                                       collection.Clear ();
-                               }
-
                                link.Length = length;
                                link.Start = start;
                                link.LinkData = o;
-                               idx = collection.Add (link);
 
-                               owner.sorted_links = null;
-                               owner.CheckLinks ();
-                               owner.CreateLinkPieces ();
+                               int idx = Add (link);
+
                                return (Link) collection[idx];
                        }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to