2005-09-01 Chris Toshok <toshok@ximian.com>
authorChris Toshok <toshok@novell.com>
Thu, 1 Sep 2005 22:41:03 +0000 (22:41 -0000)
committerChris Toshok <toshok@novell.com>
Thu, 1 Sep 2005 22:41:03 +0000 (22:41 -0000)
* System.Web.UI.WebControls/Button.cs,
System.Web.UI.WebControls/ButtonField.cs,
System.Web.UI.WebControls/DataControlField.cs,
System.Web.UI.WebControls/BaseCompareValidator.cs,
System.Web.UI.WebControls/AutoGeneratedField.cs,
System.Web.UI.WebControls/CustomValidator.cs,
System.Web.UI.WebControls/Content.cs,
System.Web.UI.WebControls/BoundField.cs,
System.Web.UI.WebControls/AdRotator.cs,
System.Web.UI.WebControls/ButtonColumn.cs,
System.Web.UI.WebControls/CompareValidator.cs,
System.Web.UI.WebControls/AdCreatedEventArgs.cs: More corcompare
work.  Stub things out, and add attributes.

svn path=/trunk/mcs/; revision=49303

13 files changed:
mcs/class/System.Web/System.Web.UI.WebControls/AdCreatedEventArgs.cs
mcs/class/System.Web/System.Web.UI.WebControls/AdRotator.cs
mcs/class/System.Web/System.Web.UI.WebControls/AutoGeneratedField.cs
mcs/class/System.Web/System.Web.UI.WebControls/BaseCompareValidator.cs
mcs/class/System.Web/System.Web.UI.WebControls/BoundField.cs
mcs/class/System.Web/System.Web.UI.WebControls/Button.cs
mcs/class/System.Web/System.Web.UI.WebControls/ButtonColumn.cs
mcs/class/System.Web/System.Web.UI.WebControls/ButtonField.cs
mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
mcs/class/System.Web/System.Web.UI.WebControls/CompareValidator.cs
mcs/class/System.Web/System.Web.UI.WebControls/Content.cs
mcs/class/System.Web/System.Web.UI.WebControls/CustomValidator.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataControlField.cs

index 11e3c9a0f44d62ea8cf11a937bcd9350c6b7067f..b76ef956afa94735f651e80b1af88b841d0fdef8 100644 (file)
@@ -33,7 +33,11 @@ using System.Collections;
 
 namespace System.Web.UI.WebControls {
 
-       public sealed class AdCreatedEventArgs : EventArgs {
+       public
+#if !NET_2_0
+       sealed
+#endif
+       class AdCreatedEventArgs : EventArgs {
 
                private IDictionary properties;
 
index 90084c4601c65279bbea1121273fa2ba74bc8073..f16cfa008e7bf5035af3984fa1f39679c58011cf 100644 (file)
@@ -46,12 +46,6 @@ namespace System.Web.UI.WebControls {
        WebControl
 #endif 
        {
-       
-               protected override ControlCollection CreateControlCollection ()
-               {
-                       return new EmptyControlCollection (this);
-               }
-
 #if NET_2_0
                [MonoTODO]
                protected internal override void OnInit (EventArgs e)
index 74097c3b801f3d62cb8d03df8626b728ba74ade4..9dd115405ea415cfad2b5e6b981aab3b23d622ed 100644 (file)
@@ -134,13 +134,19 @@ namespace System.Web.UI.WebControls {
                {
                        return new AutoGeneratedField ();
                }
-               
+
                protected override void CopyProperties (DataControlField newField)
                {
                        base.CopyProperties (newField);
                        AutoGeneratedField field = (AutoGeneratedField) newField;
                        field.DataType = DataType;
                }
+
+               [MonoTODO]
+               protected override object GetDesignTimeValue()
+               {
+                       return base.GetDesignTimeValue ();
+               }
        }
 }
 #endif
index e7f3e6f0b3ca7fac60d349a39d9dbf1f541e2d7d..022e2396cd75eef68c6d17dd2761a6340c86cd77 100644 (file)
@@ -141,9 +141,14 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
-               [MonoTODO ("why override?")]
                protected override bool DetermineRenderUplevel ()
                {
+                       /* presumably the CompareValidator client side
+                        * code makes use of newer dom/js stuff than
+                        * the rest of the validators.  but ours
+                        * doesn't for the moment, so let's just use
+                        * our present implementation
+                        */
                        return base.DetermineRenderUplevel();
                }
 
@@ -204,6 +209,20 @@ namespace System.Web.UI.WebControls {
 #endif
                }
 
+#if NET_2_0
+               [MonoTODO]
+               [DefaultValue (false)]
+               [Themeable (false)]
+               public bool CultureInvariantValues {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+                       set {
+                               throw new NotImplementedException ();
+                       }
+               }
+#endif
+
                protected static int CutoffYear {
                        get {
                                return CultureInfo.CurrentCulture.Calendar.TwoDigitYearMax;
@@ -211,6 +230,9 @@ namespace System.Web.UI.WebControls {
                }
 
                [DefaultValue(ValidationDataType.String)]
+#if NET_2_0
+               [Themeable (false)]
+#endif
                [WebSysDescription("")]
                [WebCategory("Behavior")]
                public ValidationDataType Type {
@@ -221,6 +243,36 @@ namespace System.Web.UI.WebControls {
                                type = value;
                        }
                }
+
+#if NET_2_0
+               [MonoTODO]
+               public static bool CanConvert (string text, 
+                                              ValidationDataType type, 
+                                              bool cultureInvariant)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected static bool Compare (string leftText, 
+                                              bool cultureInvariantLeftText, 
+                                              string rightText, 
+                                              bool cultureInvariantRightText, 
+                                              ValidationCompareOperator op, 
+                                              ValidationDataType type)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected static bool Convert (string text,
+                                              ValidationDataType type,
+                                              bool cultureInvariant,
+                                              out object value)
+               {
+                       throw new NotImplementedException ();
+               }
+#endif
        }
 
 }
index b0017bb89d52da6aa255301c5aeae51dab28fd09..ffb5bc98f5d0caad3e54750e98e0b11b37eb9a3b 100644 (file)
@@ -45,6 +45,19 @@ namespace System.Web.UI.WebControls {
                public static readonly string ThisExpression = "!";
                
                PropertyDescriptor boundProperty;
+
+               [MonoTODO]
+               [DefaultValueAttribute (false)]
+               [WebSysDescription ("")]
+               [WebCategoryAttribute ("Behavior")]
+               public virtual bool ApplyFormatInEditMode {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+                       set {
+                               throw new NotImplementedException ();
+                       }
+               }
                
                [DefaultValueAttribute (true)]
                [WebSysDescription ("")]
@@ -92,6 +105,18 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
+               [MonoTODO]
+               [WebSysDescription ("")]
+               [WebCategoryAttribute ("Appearance")]
+               public virtual string HeaderText {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+                       set {
+                               throw new NotImplementedException ();
+                       }
+               }
+
                [DefaultValueAttribute ("")]
                [WebCategoryAttribute ("Behavior")]
                public virtual string NullDisplayText {
@@ -133,7 +158,7 @@ namespace System.Web.UI.WebControls {
                                OnFieldChanged ();
                        }
                }
-               
+
                public override void ExtractValuesFromCell (IOrderedDictionary dictionary,
                        DataControlFieldCell cell, DataControlRowState rowState, bool includeReadOnly)
                {
@@ -147,7 +172,14 @@ namespace System.Web.UI.WebControls {
                                dictionary [DataField] = cell.Text;
                        }
                }
-               
+
+               [MonoTODO]
+               public override bool Initialize (bool enableSorting, 
+                                                Control control)
+               {
+                       return base.Initialize (enableSorting, control);
+               }
+
                public override void InitializeCell (DataControlFieldCell cell,
                        DataControlCellType cellType, DataControlRowState rowState, int rowIndex)
                {
@@ -242,6 +274,13 @@ namespace System.Web.UI.WebControls {
                        field.ReadOnly = ReadOnly;
                        field.HtmlEncode = HtmlEncode;
                }
+
+               [MonoTODO]
+               public override void ValidateSupportsCallback ()
+               {
+                       throw new NotImplementedException ();
+               }
+
        }
 }
 #endif
index d3937fa6c9aa46ab0ce19fe628a4dff8abae8d2c..48f614f5aebe597922b1e4870ed069b1cdb8fc1b 100644 (file)
@@ -35,7 +35,12 @@ namespace System.Web.UI.WebControls {
        [DataBindingHandler ("System.Web.UI.Design.TextDataBindingHandler, " + Consts.AssemblySystem_Design)]
        [DefaultProperty ("Text")]
        [Designer ("System.Web.UI.Design.WebControls.ButtonDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
+
+#if NET_2_0
+       [ToolboxDataAttribute ("<{0}:Button runat=\"server\" Text=\"Button\"></{0}:Button>")]
+#else
        [ToolboxDataAttribute ("<{0}:Button runat=server Text=\"Button\"></{0}:Button>")]
+#endif
 
        public class Button : WebControl, IPostBackEventHandler
 #if NET_2_0
@@ -269,7 +274,7 @@ namespace System.Web.UI.WebControls {
                [DefaultValue ("")]
                [Editor ("System.Web.UI.Design.UrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
                [Themeable (false)]
-               [UrlProperty]
+               [UrlProperty("*.aspx")]
                [MonoTODO]
                public string PostBackUrl {
                        get {
index 20fa2d277249d2260b042f5504f59a42d311baf0..b47ae43a76bbd7db72343a5c54be17000d3be8a8 100644 (file)
@@ -33,7 +33,11 @@ namespace System.Web.UI.WebControls {
        public class ButtonColumn : DataGridColumn {
                       
                [DefaultValue(ButtonColumnType.LinkButton)]
+#if NET_2_0
+               [WebSysDescription("The type of button contained within the column.")]
+#else
                [Description("The type of button contained within the column.")]
+#endif
                [WebCategory ("Misc")]
                public virtual ButtonColumnType ButtonType
                {
@@ -47,7 +51,11 @@ namespace System.Web.UI.WebControls {
                }
                
                [DefaultValue("")]
+#if NET_2_0
+               [WebSysDescription("The command associated with the button.")]
+#else
                [Description("The command associated with the button.")]
+#endif
                [WebCategory ("Misc")]
                public virtual string CommandName
                {
@@ -59,8 +67,27 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
+#if NET_2_0
+               [DefaultValue (false)]
+               [WebSysDescription("")]
+               [WebCategory ("Behavior")]
+               public virtual bool CausesValidation
+               {
+                       get {
+                               return ViewState.GetBool ("CausesValidation", false);
+                       }
+                       set {
+                               ViewState ["CausesValidation"] = value;
+                       }
+               }
+#endif
+
                [DefaultValue("")]
+#if NET_2_0
+               [WebSysDescription("The field bound to the text property of the button.")]
+#else
                [Description("The field bound to the text property of the button.")]
+#endif
                [WebCategory ("Misc")]
                public virtual string DataTextField 
                {
@@ -73,7 +100,11 @@ namespace System.Web.UI.WebControls {
                }
                
                [DefaultValue("")]
+#if NET_2_0
+               [WebSysDescription("The formatting applied to the value bound to the Text property.")]
+#else
                [Description("The formatting applied to the value bound to the Text property.")]
+#endif
                [WebCategory ("Misc")]
                public virtual string DataTextFormatString 
                {
@@ -87,7 +118,12 @@ namespace System.Web.UI.WebControls {
                }
 
                [DefaultValue("")]
+#if NET_2_0
+               [Localizable (true)]
+               [WebSysDescription("The text used for the button.")]
+#else
                [Description("The text used for the button.")]
+#endif
                [WebCategory ("Misc")]
                public virtual string Text 
                {
@@ -98,6 +134,21 @@ namespace System.Web.UI.WebControls {
                                ViewState ["Text"] = value;
                        }
                }
+
+#if NET_2_0
+               [DefaultValue ("")]
+               [WebSysDescription("")]
+               [WebCategory ("Behavior")]
+               public virtual string ValidationGroup
+               {
+                       get {
+                               return ViewState.GetString ("ValidationGroup", "");
+                       }
+                       set {
+                               ViewState ["ValidationGroup"] = value;
+                       }
+               }
+#endif
                
                public override void Initialize ()
                {
index c7d09e4c86069e8ec583aa08d0d97bf762652c92..bfa1a13ad3e5af576263c1a21362debddd63c231 100644 (file)
@@ -197,6 +197,12 @@ namespace System.Web.UI.WebControls {
                        field.ImageUrl = ImageUrl;
                        field.Text = Text;
                }
+
+               [MonoTODO]
+               public override void ValidateSupportsCallback ()
+               {
+                       throw new NotImplementedException ();
+               }
        }
 }
 #endif
index 622a44712a5b5453feaa473568505813770afa46..cc461f3a6f08fffb63316d84e401ebc5808cdbe7 100644 (file)
@@ -1,3 +1,19 @@
+2005-09-01  Chris Toshok  <toshok@ximian.com>
+
+       * System.Web.UI.WebControls/Button.cs,
+       System.Web.UI.WebControls/ButtonField.cs,
+       System.Web.UI.WebControls/DataControlField.cs,
+       System.Web.UI.WebControls/BaseCompareValidator.cs,
+       System.Web.UI.WebControls/AutoGeneratedField.cs,
+       System.Web.UI.WebControls/CustomValidator.cs,
+       System.Web.UI.WebControls/Content.cs,
+       System.Web.UI.WebControls/BoundField.cs,
+       System.Web.UI.WebControls/AdRotator.cs,
+       System.Web.UI.WebControls/ButtonColumn.cs,
+       System.Web.UI.WebControls/CompareValidator.cs,
+       System.Web.UI.WebControls/AdCreatedEventArgs.cs: More corcompare
+       work.  Stub things out, and add attributes.
+
 2005-09-01  Chris Toshok  <toshok@ximian.com>
 
        * Button.cs, ButtonField.cs, FontInfo.cs, Style.cs, Xml.cs,
index 6ef46ecf7ea88ad1c69a44acbb7dc86280b14496..af1bcda88ae6340ecdcc6c57255c4a1cdc90613f 100644 (file)
@@ -31,8 +31,13 @@ using System.Web.UI.WebControls;
 using System.Globalization;
 using System.ComponentModel;
 
-namespace System.Web.UI.WebControls {
+namespace System.Web.UI.WebControls
+{
+#if NET_2_0
+       [ToolboxData("<{0}:CompareValidator runat=\"server\" ErrorMessage=\"CompareValidator\"></{0}:CompareValidator>")]
+#else
        [ToolboxData("<{0}:CompareValidator runat=server ErrorMessage=\"CompareValidator\"></{0}:CompareValidator>")]
+#endif
        public class CompareValidator : BaseCompareValidator
        {
                public CompareValidator ()
@@ -88,6 +93,9 @@ namespace System.Web.UI.WebControls {
                [TypeConverter(typeof(System.Web.UI.WebControls.ValidatedControlConverter))]
                [WebSysDescription ("")]
                [WebCategory ("Behavior")]
+#if NET_2_0
+               [Themeable (false)]
+#endif
                public string ControlToCompare {
                        get {
                                return ViewState.GetString ("ControlToCompare", String.Empty);
@@ -100,6 +108,9 @@ namespace System.Web.UI.WebControls {
                [DefaultValue(ValidationCompareOperator.Equal)]
                [WebSysDescription ("")]
                [WebCategory ("Behavior")]
+#if NET_2_0
+               [Themeable (false)]
+#endif
                public ValidationCompareOperator Operator {
                        get {
                                return (ValidationCompareOperator)ViewState.GetInt ("Operator", (int)ValidationCompareOperator.Equal);
@@ -110,10 +121,15 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
+#if !NET_2_0
                [Bindable(true)]
+#endif
                [DefaultValue("")]
                [WebSysDescription ("")]
                [WebCategory ("Behavior")]
+#if NET_2_0
+               [Themeable (false)]
+#endif
                public string ValueToCompare {
                        get {
                                return ViewState.GetString ("ValueToCompare", String.Empty);
index b04383ca4068093efe7eebfe0008764f5a3c9709..a6011121e1335437de7a0b323fc615f77a4f5016 100644 (file)
@@ -35,9 +35,13 @@ using System.ComponentModel;
 
 namespace System.Web.UI.WebControls
 {
-       [ToolboxDataAttribute ("<{0}:Content runat='server'></{0}:Content>")]
+       [ToolboxItem (false)]
        [DesignerAttribute ("System.Web.UI.Design.WebControls.ContentDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
+#if notyet
+       [ControlBuilder(typeof(ContentControlBuilderInternal))]  /* XXX ew, this is in beta2 - an internal builder? */
+#else
        [ControlBuilder(typeof(ContentControlBuilder))] 
+#endif
        public class Content: Control, INamingContainer
        {
                string placeHolderId;
index 46b8281898059b982f10ddf7ac3e39cfdf6dda04..0fbe0830352e28f4d30e69c9a933b8262802a5ec 100644 (file)
@@ -32,7 +32,11 @@ using System.ComponentModel;
 
 namespace System.Web.UI.WebControls {
        [DefaultEvent("ServerValidate")]
+#if NET_2_0
+       [ToolboxData("<{0}:CustomValidator runat=\"server\" ErrorMessage=\"CustomValidator\"></{0}:CustomValidator>")]
+#else
        [ToolboxData("<{0}:CustomValidator runat=server ErrorMessage=\"CustomValidator\"></{0}:CustomValidator>")]
+#endif
        public class CustomValidator : BaseValidator {
                #region Public Constructors
                public CustomValidator() {
@@ -43,6 +47,9 @@ namespace System.Web.UI.WebControls {
                [DefaultValue("")]
                [WebSysDescription ("")]
                [WebCategory ("Behavior")]
+#if NET_2_0
+               [Themeable (false)]
+#endif
                public string ClientValidationFunction {
                        get {
                                return ViewState.GetString("ClientValidationFunction", string.Empty);
@@ -52,6 +59,20 @@ namespace System.Web.UI.WebControls {
                                ViewState["ClientValidationFunction"] = value;
                        }
                }
+
+#if NET_2_0
+               [MonoTODO]
+               [Themeable (false)]
+               [DefaultValue (false)]
+               public bool ValidateEmptyText {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+                       set {
+                               throw new NotImplementedException ();
+                       }
+               }
+#endif
                #endregion      // Public Instance Properties
 
                #region Public Instance Methods
index b521bf735e162e30952e0252afb94de69c7a2c0f..4ea6ea1a92515e7e9e0f9eb64e6d7156437c4ab3 100644 (file)
@@ -269,7 +269,7 @@ namespace System.Web.UI.WebControls {
 
                [UrlPropertyAttribute]
                [DefaultValueAttribute ("")]
-               [EditorAttribute ("System.Web.UI.Design.UrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
+               [EditorAttribute ("System.Web.UI.Design.ImageUrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
                [WebCategoryAttribute ("Appearance")]
                public virtual string HeaderImageUrl {
                        get {