Author: igorz
Date: 2007-02-27 07:02:04 -0500 (Tue, 27 Feb 2007)
New Revision: 73457
Modified:
trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
trunk/mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
Log:
2007-02-27 Igor Zelmanovich <[EMAIL PROTECTED]>
* WebControl.cs: implemented IsEnabled and HasAttributes.
Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
2007-02-27 11:38:53 UTC (rev 73456)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
2007-02-27 12:02:04 UTC (rev 73457)
@@ -1,5 +1,9 @@
-2007-02-26 Igor Zelmanovich <[EMAIL PROTECTED]>
+2007-02-27 Igor Zelmanovich <[EMAIL PROTECTED]>
+ * WebControl.cs: implemented IsEnabled and HasAttributes.
+
+2007-02-27 Igor Zelmanovich <[EMAIL PROTECTED]>
+
* BaseDataList.cs: fixed: data-binding flow for 2.0 features.
2007-02-27 Marek Habersack <[EMAIL PROTECTED]>
Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
2007-02-27 11:38:53 UTC (rev 73456)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
2007-02-27 12:02:04 UTC (rev 73457)
@@ -289,11 +289,10 @@
#if NET_2_0
[Browsable (false)]
[DesignerSerializationVisibility
(DesignerSerializationVisibility.Hidden)]
- [MonoTODO ("Not implemented")]
public bool HasAttributes
{
get {
- throw new NotImplementedException ();
+ return (attributes != null && attributes.Count
> 0);
}
}
#endif
@@ -404,11 +403,19 @@
}
#if NET_2_0
- [MonoTODO ("Not implemented")]
protected internal bool IsEnabled
{
get {
- throw new NotImplementedException ();
+ if (Enabled)
+ return true;
+ if(!HasControls())
+ return false;
+ for (int i = 0; i < Controls.Count; i++) {
+ WebControl wc = Controls [i] as
WebControl;
+ if (wc != null && wc.IsEnabled)
+ return true;
+ }
+ return false;
}
}
#endif
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches