public HostControl2 GetNewHost(Type rootComponentType, int load) { TestLoader tl = new TestLoader(rootComponentType); HostSurface2 hostSurface = new HostSurface2(this.ServiceContainer); hostSurface.BeginLoad(tl); this.ActiveDesignSurface = hostSurface; return(new HostControl2(hostSurface)); }
/// <summary> /// Gets a new HostSurface and loads it with the appropriate type of /// root component. /// </summary> public HostControl2 GetNewHost(Type rootComponentType) { HostSurface2 hostSurface = new HostSurface2(this.ServiceContainer); hostSurface.BeginLoad(rootComponentType); hostSurface.Initialize(); this.ActiveDesignSurface = hostSurface; return(new HostControl2(hostSurface)); }