Browse Source

2002-10-07 Gaurav Vaish <[email protected]>

* BaseDataListPageInternal.cs
                          : ctor()         - Removed call to base.
  	                                             It's by default.
     	                  : HelpKeyword    - Added abstract property.
  	                  : IsDataGridMode - Implemented.
  	                  : ShowHelp(),
  	                  : SupportsHelp(),
  	                  : SetComponent(IComponent),
  	                  : GetBaseControl(),
  	                  : GetBaseDesigner()
  	                                   - Implemented.
* BordersPageInternal.cs  : SetComponent(IComponent)
                                   - Implemented.
   	                  : HelpKeyword { get; },
  	                  : InitializeForm()
  	                                   - Stubbed.
* FormatPageInternal.cs   : HelpKeyword { get; }
                                           - Stubbed.
* GeneralPageDataListInternal.cs
                          : HelpKeyword { get; }
  	                                   - Stubbed.

svn path=/trunk/mcs/; revision=8042
Gaurav Vaish 23 years ago
parent
commit
20a375f4ae

+ 54 - 1
mcs/class/System.Design/System.Web.UI.Design.WebControls/BaseDataListPageInternal.cs

@@ -19,8 +19,61 @@ namespace System.Web.UI.Design.WebControls
 {
 	abstract class BaseDataListPageInternal : ComponentEditorPage
 	{
-		public BaseDataListPageInternal() : base()
+		private bool isDataGridMode;
+
+		public BaseDataListPageInternal()
+		{
+		}
+
+		protected abstract string HelpKeyword { get; }
+
+		protected bool IsDataGridMode
+		{
+			get
+			{
+				return isDataGridMode;
+			}
+		}
+
+		public override void ShowHelp()
+		{
+			ISite site = GetSelectedComponent().Site;
+			IHelpService service = (IHelpService)site.GetService(
+			                                          typeof(IHelpService));
+			if(service != null)
+			{
+				service.ShowHelpFromKeyword(HelpKeyword);
+			}
+		}
+
+		public override bool SupportsHelp()
+		{
+			return true;
+		}
+
+		public override void SetComponent(IComponent component)
+		{
+			base.SetComponent(component);
+			isDataGridMode = (GetBaseControl() is DataGrid);
+		}
+
+		protected BaseDataList GetBaseControl()
+		{
+			return (BaseDataList)GetSelectedComponent();
+		}
+
+		protected BaseDataListDesigner GetBaseDesigner()
 		{
+			BaseDataListDesigner retVal = null;
+			ISite site = GetSelectedComponent().Site;
+			IDesignerHost designer = (IDesignerHost)site.GetService(
+			                                      typeof(IDesignerHost));
+			if(designer != null)
+			{
+				retVal = (BaseDataListDesigner)designer.GetDesigner(
+				                                GetSelectedComponent());
+			}
+			return retVal;
 		}
 	}
 }

+ 22 - 1
mcs/class/System.Design/System.Web.UI.Design.WebControls/BordersPageInternal.cs

@@ -19,7 +19,7 @@ namespace System.Web.UI.Design.WebControls
 {
 	class BordersPageInternal : BaseDataListPageInternal
 	{
-		public BordersPageInternal() : base()
+		public BordersPageInternal()
 		{
 		}
 
@@ -34,5 +34,26 @@ namespace System.Web.UI.Design.WebControls
 		{
 			throw new NotImplementedException();
 		}
+
+		public override void SetComponent(IComponent component)
+		{
+			base.SetComponent(component);
+			InitializeForm();
+		}
+
+		[MonoTODO]
+		private void InitializeForm()
+		{
+			throw new NotImplementedException();
+		}
+
+		[MonoTODO]
+		protected override string HelpKeyword
+		{
+			get
+			{
+				throw new NotImplementedException();
+			}
+		}
 	}
 }

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

@@ -1,4 +1,28 @@
 
+2002-10-07     Gaurav Vaish <[email protected]>
+
+	* BaseDataListPageInternal.cs
+	                          : ctor()         - Removed call to base.
+	                                             It's by default.
+	                          : HelpKeyword    - Added abstract property.
+	                          : IsDataGridMode - Implemented.
+	                          : ShowHelp(),
+	                          : SupportsHelp(),
+	                          : SetComponent(IComponent),
+	                          : GetBaseControl(),
+	                          : GetBaseDesigner()
+	                                           - Implemented.
+	* BordersPageInternal.cs  : SetComponent(IComponent)
+	                                           - Implemented.
+	                          : HelpKeyword { get; },
+	                          : InitializeForm()
+	                                           - Stubbed.
+	* FormatPageInternal.cs   : HelpKeyword { get; }
+	                                           - Stubbed.
+	* GeneralPageDataListInternal.cs
+	                          : HelpKeyword { get; }
+	                                           - Stubbed.
+
 2002-09-25     Gaurav Vaish <[email protected]>
 
 	* RegextEditorDialog.cs   : Added a few more methods.

+ 8 - 0
mcs/class/System.Design/System.Web.UI.Design.WebControls/FormatPageInternal.cs

@@ -34,5 +34,13 @@ namespace System.Web.UI.Design.WebControls
 		{
 			throw new NotImplementedException();
 		}
+
+		protected override string HelpKeyword
+		{
+			get
+			{
+				throw new NotImplementedException();
+			}
+		}
 	}
 }

+ 8 - 0
mcs/class/System.Design/System.Web.UI.Design.WebControls/GeneralPageDataListInternal.cs

@@ -34,5 +34,13 @@ namespace System.Web.UI.Design.WebControls
 		{
 			throw new NotImplementedException();
 		}
+
+		protected override string HelpKeyword
+		{
+			get
+			{
+				throw new NotImplementedException();
+			}
+		}
 	}
 }