2007-03-14 Sebastien Pouliot <sebastien@ximian.com>
[mono.git] / mcs / class / System.Drawing / System.Drawing.Design / ToolboxItem.cs
index b70548ef053917d0d01e15ffe62507ac96f50d53..94a44e69182d77bf26b55308d2847d1f20d54679 100644 (file)
@@ -99,11 +99,11 @@ namespace System.Drawing.Design
                        get { return (string) properties["Company"]; }
                        set { SetValue ("Company", value); }
                }
-\r
+
                public virtual string ComponentType {
                        get { return ".NET Component"; }
                }
-\r
+
                public AssemblyName[] DependentAssemblies {
                        get { return (AssemblyName[]) properties["DependentAssemblies"]; }
                        set {
@@ -113,12 +113,12 @@ namespace System.Drawing.Design
                                SetValue ("DependentAssemblies", names);
                        }
                }
-\r
+
                public string Description {
                        get { return (string) properties["Description"]; }
                        set { SetValue ("Description", value); }
-               }\r
-\r
+               }
+
                public bool IsTransient {                       
                        get {
                                object o = properties ["IsTransient"];
@@ -126,7 +126,7 @@ namespace System.Drawing.Design
                        }
                        set { SetValue ("IsTransient", value); }
                }
-\r
+
                public IDictionary Properties {
                         get { return properties; }
                }
@@ -157,20 +157,20 @@ namespace System.Drawing.Design
 
                // FIXME - get error handling logic correct
                protected virtual IComponent[] CreateComponentsCore (IDesignerHost host)
-               {\r
-                       if (host == null)\r
+               {
+                       if (host == null)
                                throw new ArgumentNullException("host");
 
                        OnComponentsCreating(new ToolboxComponentsCreatingEventArgs(host));
-                       \r
-                       IComponent[] components;\r
+                       
+                       IComponent[] components;
                        Type type = GetType(host, AssemblyName, TypeName, true);
-                       if (type == null)\r
+                       if (type == null)
                                components = new IComponent[] { };
-                       else\r
+                       else
                                components = new IComponent[] { host.CreateComponent(type) };
 
-                       OnComponentsCreated(new ToolboxComponentsCreatedEventArgs(components));\r
+                       OnComponentsCreated(new ToolboxComponentsCreatedEventArgs(components));
                        return components;
                }
 
@@ -182,20 +182,20 @@ namespace System.Drawing.Design
                } 
 
                [MonoTODO] 
-               public IComponent[] CreateComponents (IDesignerHost host, IDictionary defaultValues)\r
+               public IComponent[] CreateComponents (IDesignerHost host, IDictionary defaultValues)
                {
                        throw new NotImplementedException ();
                } 
 
                [MonoTODO] 
-               public Type GetType (IDesignerHost host)\r
+               public Type GetType (IDesignerHost host)
                {
                        if (host == null)
-                               return null;\r
-                       throw new NotImplementedException ();\r
+                               return null;
+                       throw new NotImplementedException ();
                }
 
-               protected virtual object FilterPropertyValue (string propertyName, object value)\r
+               protected virtual object FilterPropertyValue (string propertyName, object value)
                {
                        switch (propertyName) {
                        case "AssemblyName":
@@ -208,7 +208,7 @@ namespace System.Drawing.Design
                        default:
                                return value;
                        }
-               }\r
+               }
 #endif
 
                protected virtual void Deserialize (SerializationInfo info, StreamingContext context)
@@ -243,8 +243,8 @@ namespace System.Drawing.Design
                }
 
                protected virtual Type GetType (IDesignerHost host, AssemblyName assemblyName, string typeName, bool reference)
-               {\r
-                       if (typeName == null)\r
+               {
+                       if (typeName == null)
                                throw new ArgumentNullException ("typeName");
 
                        if (host == null)
@@ -256,9 +256,9 @@ namespace System.Drawing.Design
                                throw new Exception("Host does not provide an ITypeResolutionService");
 
                        //TODO: Using Assembly loader to throw errors. Silent fail and return null?
-                       typeRes.GetAssembly(assemblyName, true);\r
-                       if (reference)\r
-                               typeRes.ReferenceAssembly(assemblyName);\r
+                       typeRes.GetAssembly(assemblyName, true);
+                       if (reference)
+                               typeRes.ReferenceAssembly(assemblyName);
                        return typeRes.GetType(typeName, true);
                }
 
@@ -338,7 +338,7 @@ namespace System.Drawing.Design
                }
 
 #if NET_2_0
-               protected void ValidatePropertyType (string propertyName, object value, Type expectedType, bool allowNull)\r
+               protected void ValidatePropertyType (string propertyName, object value, Type expectedType, bool allowNull)
                {
                        if (!allowNull && (value == null))
                                throw new ArgumentNullException ("value");
@@ -350,7 +350,7 @@ namespace System.Drawing.Design
                        }
                }
 
-               protected virtual object ValidatePropertyValue (string propertyName, object value)\r
+               protected virtual object ValidatePropertyValue (string propertyName, object value)
                {
                        switch (propertyName) {
                        case "AssemblyName":