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)); }
public HostControl2(HostSurface2 hostSurface) { if (hostSurface == null) { return; } _hostSurface = hostSurface; Control control = _hostSurface.View as Control; control.Parent = this; control.Dock = DockStyle.Fill; control.Visible = true; }