{\r
OnComponentsCreating (new ToolboxComponentsCreatingEventArgs (host));\r
IComponent[] Comp = CreateComponentsCore (host);\r
- OnComponentsCreated ( new ToolboxComponentsCreatedEventArgs (Comp));\r
+ OnComponentsCreated (new ToolboxComponentsCreatedEventArgs (Comp));\r
return Comp;\r
}\r
\r
{\r
if (host == null)\r
throw new ArgumentNullException("host");\r
-\r
- OnComponentsCreating(new ToolboxComponentsCreatingEventArgs(host));\r
\r
IComponent[] components;\r
Type type = GetType(host, AssemblyName, TypeName, true);\r
else\r
components = new IComponent[] { host.CreateComponent(type) };\r
\r
- OnComponentsCreated(new ToolboxComponentsCreatedEventArgs(components));\r
return components;\r
}\r
\r
#if NET_2_0\r
- [MonoTODO] \r
protected virtual IComponent[] CreateComponentsCore (IDesignerHost host, IDictionary defaultValues)\r
{\r
- throw new NotImplementedException ();\r
+ IComponent[] components = CreateComponentsCore (host);\r
+ foreach (Component c in components) {\r
+ IComponentInitializer initializer = host.GetDesigner (c) as IComponentInitializer;\r
+ initializer.InitializeNewComponent (defaultValues);\r
+ }\r
+ return components;\r
} \r
\r
- [MonoTODO] \r
public IComponent[] CreateComponents (IDesignerHost host, IDictionary defaultValues)\r
{\r
- throw new NotImplementedException ();\r
- } \r
+ OnComponentsCreating (new ToolboxComponentsCreatingEventArgs (host));\r
+ IComponent[] components = CreateComponentsCore (host, defaultValues);\r
+ OnComponentsCreated (new ToolboxComponentsCreatedEventArgs (components));\r
\r
- [MonoNotSupported("")] \r
- public Type GetType (IDesignerHost host)\r
- {\r
- if (host == null)\r
- return null;\r
- throw new NotImplementedException ();\r
- }\r
+ return components;\r
+ } \r
\r
protected virtual object FilterPropertyValue (string propertyName, object value)\r
{\r
return string.Concat (TypeName, DisplayName).GetHashCode ();\r
}\r
\r
+ public Type GetType (IDesignerHost host)\r
+ {\r
+ return GetType (host, this.AssemblyName, this.TypeName, false);\r
+ }\r
+\r
protected virtual Type GetType (IDesignerHost host, AssemblyName assemblyName, string typeName, bool reference)\r
{\r
if (typeName == null)\r