Browse Source

2002-09-16 Gaurav Vaish <[email protected]>

* AdRotatorDesigner.cs    : GetDesignTimeHtml() - Removed "MonoTODO"
* ButtonDesigner.cs       : Completed.
* CalendarAutoFormatDialog.cs
                          : Initial implementation.
  	* CalendarDesigner.cs     : Initial implementation.
* CheckBoxDesigner.cs     : Completed.
* HyperLinkDesigner.cs    : Almost completed. See "FIXME".
* LabelDesigner.cs        : Completed.
* LinkButtonDesigner.cs   : Completed.
* TableCellsCollectionEditor.cs
                          : Completed
  	* TableDesigner.cs        : Initial implementation.

2002-09-16     Gaurav Vaish <[email protected]>

* TODO                    : TODO Updates. Found some undocumented
                            classes.

svn path=/trunk/mcs/; revision=7613
Gaurav Vaish 23 years ago
parent
commit
c55b3d8237

+ 1 - 2
mcs/class/System.Design/System.Web.UI.Design.WebControls/AdRotatorDesigner.cs

@@ -3,7 +3,7 @@
  * Class:       AdRotatorDesigner
  *
  * Author:      Gaurav Vaish
- * Maintainer:  mastergaurav AT users DOT sf DOT net
+ * Maintainer:  [email protected]
  *
  * (C) Gaurav Vaish (2002)
  */
@@ -21,7 +21,6 @@ namespace System.Web.UI.Design.WebControls
 		{
 		}
 
-		[MonoTODO]
 		public override string GetDesignTimeHtml()
 		{
 			if(Component != null && Component is AdRotator)

+ 39 - 0
mcs/class/System.Design/System.Web.UI.Design.WebControls/ButtonDesigner.cs

@@ -0,0 +1,39 @@
+/**
+ * Namespace:   System.Web.UI.Design.WebControls
+ * Class:       ButtonDesigner
+ *
+ * Author:      Gaurav Vaish
+ * Maintainer:  [email protected]
+ *
+ * (C) Gaurav Vaish (2002)
+ */
+
+using System;
+using System.Web;
+using System.Web.UI.WebControls;
+using System.Web.UI.Design;
+
+namespace System.Web.UI.Design.WebControls
+{
+	public class ButtonDesigner : TextControlDesigner
+	{
+		public ButtonDesigner(): base()
+		{
+		}
+
+		public override string GetDesignTimeHtml()
+		{
+			if(Component != null && Component is Button)
+			{
+				Button btn = (Button)Component;
+				btn.Text   = btn.Text.Trim();
+				if(btn.Text.Length == 0)
+				{
+					btn.Text = "[" + btn.ID + "]";
+				}
+				return base.GetDesignTimeHtml();
+			}
+			return String.Empty;
+		}
+	}
+}

+ 43 - 0
mcs/class/System.Design/System.Web.UI.Design.WebControls/CalendarAutoFormatDialog.cs

@@ -0,0 +1,43 @@
+/**
+ * Namespace:   System.Web.UI.Design.WebControls
+ * Class:       CalendarAutoFormatDialog
+ *
+ * Author:      Gaurav Vaish
+ * Maintainer:  [email protected]
+ *
+ * (C) Gaurav Vaish (2002)
+ */
+
+using System;
+using System.Web;
+using System.Web.UI.WebControls;
+using System.Windows.Forms;
+
+namespace System.Web.UI.Design.WebControls
+{
+	public class CalendarAutoFormatDialog : Form
+	{
+		private Calendar calendar;
+		private bool     activated;
+
+		public CalendarAutoFormatDialog(Calendar calendar) : base()
+		{
+			this.calendar  = calendar;
+			this.activated = false;
+			this.InitializeCalendar();
+		}
+
+		[MonoTODO]
+		private void InitializeCalendar()
+		{
+			// Load various WC-schemes.
+			throw new NotImplementedException();
+		}
+
+		[MonoTODO]
+		protected void OnActivated(object source, EventArgs e)
+		{
+			throw new NotImplementedException();
+		}
+	}
+}

+ 57 - 0
mcs/class/System.Design/System.Web.UI.Design.WebControls/CalendarDesigner.cs

@@ -0,0 +1,57 @@
+/**
+ * Namespace:   System.Web.UI.Design.WebControls
+ * Class:       CalendarDesigner
+ *
+ * Author:      Gaurav Vaish
+ * Maintainer:  [email protected]
+ *
+ * (C) Gaurav Vaish (2002)
+ */
+
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Design;
+using System.Web;
+using System.Web.UI.WebControls;
+using System.Web.UI.Design;
+
+namespace System.Web.UI.Design.WebControls
+{
+	public class CalendarDesigner : ControlDesigner
+	{
+		private DesignerVerbCollection verbs;
+		private Calendar               calendar;
+
+		public CalendarDesigner() : base()
+		{
+		}
+
+		public override DesignerVerbCollection Verbs
+		{
+			get
+			{
+				if(verbs == null)
+				{
+					verbs = new DesignerVerbCollection();
+					//verbs.Add(new DesignerVerb(OnAutoFormat:Event_Handler)
+				}
+				return verbs;
+			}
+		}
+
+		public override void Initialize(IComponent component)
+		{
+			if(component is Calendar)
+			{
+				base.Initialize(component);
+				this.calendar = (Calendar) component;
+			}
+		}
+
+		[MonoTODO]
+		protected void OnAutoFormat(object sender, EventArgs e)
+		{
+			throw new NotImplementedException();
+		}
+	}
+}

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

@@ -1,4 +1,19 @@
 
+2002-09-16     Gaurav Vaish <[email protected]>
+
+	* AdRotatorDesigner.cs    : GetDesignTimeHtml() - Removed "MonoTODO"
+	* ButtonDesigner.cs       : Completed.
+	* CalendarAutoFormatDialog.cs
+	                          : Initial implementation.
+	* CalendarDesigner.cs     : Initial implementation.
+	* CheckBoxDesigner.cs     : Completed.
+	* HyperLinkDesigner.cs    : Almost completed. See "FIXME".
+	* LabelDesigner.cs        : Completed.
+	* LinkButtonDesigner.cs   : Completed.
+	* TableCellsCollectionEditor.cs
+	                          : Completed
+	* TableDesigner.cs        : Initial implementation.
+
 2002-09-16     Gaurav Vaish <[email protected]>
 
 	* TODO                    : TODO Updates. Found some undocumented

+ 39 - 0
mcs/class/System.Design/System.Web.UI.Design.WebControls/CheckBoxDesigner.cs

@@ -0,0 +1,39 @@
+/**
+ * Namespace:   System.Web.UI.Design.WebControls
+ * Class:       CheckboxDesigner
+ *
+ * Author:      Gaurav Vaish
+ * Maintainer:  [email protected]
+ *
+ * (C) Gaurav Vaish (2002)
+ */
+
+using System;
+using System.Web;
+using System.Web.UI.WebControls;
+using System.Web.UI.Design;
+
+namespace System.Web.UI.Design.WebControls
+{
+	public class CheckBoxDesigner : ControlDesigner
+	{
+		public CheckBoxDesigner() : base()
+		{
+		}
+		
+		public override string GetDesignTimeHtml()
+		{
+			if(Component != null && Component is CheckBox)
+			{
+				CheckBox cbx = (CheckBox) Component;
+				cbx.Text     = cbx.Text.Trim();
+				if(cbx.Text.Length == 0)
+				{
+					cbx.Text = "[" + cbx.ID + "]";
+				}
+				return base.GetDesignTimeHtml();
+			}
+			return String.Empty;
+		}
+	}
+}

+ 55 - 0
mcs/class/System.Design/System.Web.UI.Design.WebControls/HyperLinkDesigner.cs

@@ -0,0 +1,55 @@
+/**
+ * Namespace:   System.Web.UI.Design.WebControls
+ * Class:       HyperLinkDesigner
+ *
+ * Author:      Gaurav Vaish
+ * Maintainer:  [email protected]
+ *
+ * (C) Gaurav Vaish (2002)
+ */
+
+using System;
+using System.Web;
+using System.Web.UI.WebControls;
+using System.Web.UI.Design;
+
+namespace System.Web.UI.Design.WebControls
+{
+	public class HyperLinkDesigner : TextControlDesigner
+	{
+		public HyperLinkDesigner() : base()
+		{
+		}
+
+		[MonoTODO]
+		public override string GetDesignTimeHtml()
+		{
+			if(Component != null && Component is HyperLink)
+			{
+				HyperLink link   = (HyperLink) Component;
+				link.Text        = link.Text.Trim();
+				link.ImageUrl    = link.ImageUrl.Trim();
+				link.NavigateUrl = link.NavigateUrl.Trim();
+				bool textOrImage = (link.Text.Length > 0 ||
+				                    link.ImageUrl.Length > 0);
+				bool nav         = link.NavigateUrl.Length > 0;
+				if(!textOrImage)
+				{
+					link.Text        = "[" + link.ID + "]";
+					if(!nav)
+					{
+						link.NavigateUrl = "url";
+					}
+				}
+
+				// FIXME: Unable to get the essence of "Remarks"
+				// in the MSDN documentation. Need to write a program
+				// to test what's happening.
+				throw new NotImplementedException();
+
+				//return base.GetDesignTimeHtml();
+			}
+			return String.Empty;
+		}
+	}
+}

+ 24 - 0
mcs/class/System.Design/System.Web.UI.Design.WebControls/LabelDesigner.cs

@@ -0,0 +1,24 @@
+/**
+ * Namespace:   System.Web.UI.Design.WebControls
+ * Class:       LabelDesigner
+ *
+ * Author:      Gaurav Vaish
+ * Maintainer:  [email protected]
+ *
+ * (C) Gaurav Vaish (2002)
+ */
+
+using System;
+using System.Web;
+using System.Web.UI.WebControls;
+using System.Web.UI.Design;
+
+namespace System.Web.UI.Design.WebControls
+{
+	public class LabelDesigner : TextControlDesigner
+	{
+		public LabelDesigner(): base()
+		{
+		}
+	}
+}

+ 24 - 0
mcs/class/System.Design/System.Web.UI.Design.WebControls/LinkButtonDesigner.cs

@@ -0,0 +1,24 @@
+/**
+ * Namespace:   System.Web.UI.Design.WebControls
+ * Class:       LinkButtonDesigner
+ *
+ * Author:      Gaurav Vaish
+ * Maintainer:  [email protected]
+ *
+ * (C) Gaurav Vaish (2002)
+ */
+
+using System;
+using System.Web;
+using System.Web.UI.WebControls;
+using System.Web.UI.Design;
+
+namespace System.Web.UI.Design.WebControls
+{
+	public class LinkButtonDesigner : TextControlDesigner
+	{
+		public LinkButtonDesigner(): base()
+		{
+		}
+	}
+}

+ 9 - 9
mcs/class/System.Design/System.Web.UI.Design.WebControls/TODO

@@ -14,25 +14,25 @@ Documented + Undocumented.
 BaseDataListComponentEditor
 BaseDataListDesigner
 BaseValidatorDesigner
-ButtonDesigner
-CalendarAutoFormatDialog
-CalendarDesigner
-CheckBoxDesigner
+* ButtonDesigner
+& CalendarAutoFormatDialog
+& CalendarDesigner
+* CheckBoxDesigner
 DataGridColumnCollectionEditor
 DataGridComponentEditor
 DataGridDesigner
 DataListComponentEditor
 DataListDesigner
-HyperLinkDesigner
-LabelDesigner
-LinkButtonDesigner
+* HyperLinkDesigner
+* LabelDesigner
+* LinkButtonDesigner
 ListControlDataBindingHandler
 ListControlDesigner
 ListItemsCollectionEditor
 PanelDesigner
 RegexTypeEditor
-TableCellsCollectionEditor
-TableDesigner
+* TableCellsCollectionEditor
+& TableDesigner
 TableRowsCollectionEditor
 
 ------------------------------------------------------

+ 38 - 0
mcs/class/System.Design/System.Web.UI.Design.WebControls/TableCellsCollectionEditor.cs

@@ -0,0 +1,38 @@
+/**
+ * Namespace:   System.Web.UI.Design.WebControls
+ * Class:       TableCellsCollectionEditor
+ *
+ * Author:      Gaurav Vaish
+ * Maintainer:  [email protected]
+ *
+ * (C) Gaurav Vaish (2002)
+ */
+
+using System;
+using System.ComponentModel.Design;
+using System.Reflection;
+using System.Web.UI.WebControls;
+using System.Web.UI.Design;
+
+namespace System.Web.UI.Design.WebControls
+{
+	public class TableCellsCollectionEditor : CollectionEditor
+	{
+		public TableCellsCollectionEditor(Type type) : base(type)
+		{
+		}
+
+		protected override bool CanSelectMultipleInstances()
+		{
+			return false;
+		}
+
+		protected override object CreateInstance(Type itemType)
+		{
+			return Activator.CreateInstance(itemType, BindingFlags.Public |
+			                                BindingFlags.CreateInstance |
+			                                BindingFlags.Instance,
+			                                null, null, null);
+		}
+	}
+}

+ 41 - 0
mcs/class/System.Design/System.Web.UI.Design.WebControls/TableDesigner.cs

@@ -0,0 +1,41 @@
+/**
+ * Namespace:   System.Web.UI.Design.WebControls
+ * Class:       TableDesigner
+ *
+ * Author:      Gaurav Vaish
+ * Maintainer:  [email protected]
+ *
+ * (C) Gaurav Vaish (2002)
+ */
+
+using System;
+using System.Web;
+using System.Web.UI.WebControls;
+using System.Web.UI.Design;
+
+namespace System.Web.UI.Design.WebControls
+{
+	public class TableDesigner : TextControlDesigner
+	{
+		public TableDesigner(): base()
+		{
+		}
+
+		[MonoTODO]
+		public override string GetDesignTimeHtml()
+		{
+			if(Component != null && Component is Table)
+			{
+				Table table = (Table) Component;
+				throw new NotImplementedException();
+			}
+			return String.Empty;
+		}
+
+		[MonoTODO]
+		public override string GetPersistInnerHtml()
+		{
+			throw new NotImplementedException();
+		}
+	}
+}