فهرست منبع

2005-08-22 Michael Hutchinson <[email protected]>

	* WebControl.cs: Correct type for some default values
	* UnitConverter.cs: Fix potential infinite loop


svn path=/trunk/mcs/; revision=48669
Michael Hutchinson 20 سال پیش
والد
کامیت
7ea013c4aa

+ 5 - 0
mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog

@@ -1,3 +1,8 @@
+2005-08-22 Michael Hutchinson <[email protected]>
+
+	* WebControl.cs: Correct type for some default values
+	* UnitConverter.cs: Fix potential infinite loop
+
 2005-07-29  Kornél Pál <[email protected]>
 
 	* *.cs: Replaced assembly references with constants in Consts.cs.

+ 3 - 3
mcs/class/System.Web/System.Web.UI.WebControls/UnitConverter.cs

@@ -52,7 +52,7 @@ namespace System.Web.UI.WebControls
 		{
 			if(sourceType == typeof(string))
 				return true;
-			return CanConvertFrom(context, sourceType);
+			return base.CanConvertFrom(context, sourceType);
 		}
 
 #if NET_2_0
@@ -81,7 +81,7 @@ namespace System.Web.UI.WebControls
 				}
 				return (culture == null ? Unit.Parse(val) : Unit.Parse(val, culture));
 			}
-			return ConvertFrom(context, culture, value);
+			return base.ConvertFrom(context, culture, value);
 		}
 
 		public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
@@ -110,7 +110,7 @@ namespace System.Web.UI.WebControls
 			}
 #endif
 			
-			return ConvertTo(context, culture, value, destinationType);
+			return base.ConvertTo(context, culture, value, destinationType);
 		}
 	}
 }

+ 7 - 7
mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs

@@ -118,7 +118,7 @@ namespace System.Web.UI.WebControls
 #if !NET_2_0
 		[Bindable (true)]
 #endif
-		[DefaultValue (null), WebCategory ("Appearance")]
+		[DefaultValue (typeof(Color), ""), WebCategory ("Appearance")]
 		[TypeConverter (typeof (WebColorConverter))]
 		[WebSysDescription ("The background color for the WebControl.")]
 		public virtual Color BackColor
@@ -137,7 +137,7 @@ namespace System.Web.UI.WebControls
 #if !NET_2_0
 		[Bindable (true)]
 #endif
-		[DefaultValue (null), WebCategory ("Appearance")]
+		[DefaultValue (typeof(Color), ""), WebCategory ("Appearance")]
 		[TypeConverter (typeof (WebColorConverter))]
 		[WebSysDescription ("The border color for the WebControl.")]
 		public virtual Color BorderColor
@@ -174,7 +174,7 @@ namespace System.Web.UI.WebControls
 #if !NET_2_0
 		[Bindable (true)]
 #endif
-		[DefaultValue (null), WebCategory ("Appearance")]
+		[DefaultValue (typeof (Unit), ""), WebCategory ("Appearance")]
 		[WebSysDescription ("The width of the border used for the WebControl.")]
 		public virtual Unit BorderWidth
 		{
@@ -277,7 +277,7 @@ namespace System.Web.UI.WebControls
 #if !NET_2_0
 		[Bindable (true)]
 #endif
-		[DefaultValue (null), WebCategory ("Appearance")]
+		[DefaultValue (typeof(Color), ""), WebCategory ("Appearance")]
 		[TypeConverter (typeof (WebColorConverter))]
 		[WebSysDescription ("The color that is used to paint the primary display of the WebControl.")]
 		public virtual Color ForeColor
@@ -296,7 +296,7 @@ namespace System.Web.UI.WebControls
 #if !NET_2_0
 		[Bindable (true)]
 #endif
-		[DefaultValue (null), WebCategory ("Layout")]
+		[DefaultValue (typeof(Unit), ""), WebCategory ("Layout")]
 		[WebSysDescription ("The height of this WebControl.")]
 		public virtual Unit Height
 		{
@@ -322,7 +322,7 @@ namespace System.Web.UI.WebControls
 			}
 		}
 
-		[DefaultValue (0), WebCategory ("Behavior")]
+		[DefaultValue (typeof (short), "0"), WebCategory ("Behavior")]
 		[WebSysDescription ("The order in which this WebControl gets tabbed through.")]
 		public virtual short TabIndex
 		{
@@ -366,7 +366,7 @@ namespace System.Web.UI.WebControls
 #if !NET_2_0
 		[Bindable (true)]
 #endif
-		[DefaultValue (null), WebCategory ("Layout")]
+		[DefaultValue ( typeof (Unit), ""), WebCategory ("Layout")]
 		[WebSysDescription ("The width of this WebControl.")]
 		public virtual Unit Width
 		{