Merge pull request #1407 from chrisvire/bug-24587
[mono.git] / mcs / class / System.Design / System.Web.UI.Design.WebControls / BaseDataListComponentEditor.cs
old mode 100755 (executable)
new mode 100644 (file)
index f4dc14b..5fba73e
@@ -1,4 +1,9 @@
-
+//
+// System.Web.UI.Design.WebControls.BaseDataListComponentEditor.cs
+//
+// Author: Duncan Mak (duncan@novell.com)
+//
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-/**
- * Namespace:   System.Web.UI.Design.WebControls
- * Class:       BaseDataListComponentEditor
- *
- * Author:      Gaurav Vaish
- * Maintainer:  mastergaurav AT users DOT sf DOT net
- *
- * (C) Gaurav Vaish (2002)
- */
 
-using System;
 using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Web.UI.Design;
 using System.Windows.Forms;
 using System.Windows.Forms.Design;
 
-namespace System.Web.UI.Design.WebControls
-{
+namespace System.Web.UI.Design.WebControls {
+
        public abstract class BaseDataListComponentEditor : WindowsFormsComponentEditor
        {
-               private int initialPage;
+               int initial_page;
 
-               public BaseDataListComponentEditor(int initialPage) : base()
+               public BaseDataListComponentEditor (int initial_page)
                {
-                       this.initialPage = initialPage;
+                       this.initial_page = initial_page;
                }
 
-               public override bool EditComponent(ITypeDescriptorContext context,
-                                                  object obj, IWin32Window parent)
+               public override bool EditComponent (
+                       ITypeDescriptorContext context,
+                       object obj,
+                       IWin32Window parent)
                {
-                       IComponent comp = (IComponent) obj;
-                       ISite      site = comp.Site;
-                       bool retVal  = false;
-                       bool inTemplateMode = false;
-
-                       if(site != null)
-                       {
-                               IDesignerHost dh = (IDesignerHost)site.GetService(typeof(IDesignerHost));
-                               inTemplateMode = ((TemplatedControlDesigner)dh.GetDesigner(comp)).InTemplateMode;
-                       }
-                       if(inTemplateMode)
-                       {
-                               throw new NotImplementedException();
-                       } else
-                       {
-                               retVal = base.EditComponent(context, obj, parent);
-                       }
-                       return retVal;
+                       throw new NotImplementedException ();
                }
 
-               protected override int GetInitialComponentEditorPageIndex()
+               protected override int GetInitialComponentEditorPageIndex ()
                {
-                       return initialPage;
+                       return initial_page;
                }
        }
-}
+}
\ No newline at end of file