public ReflectorTreeView() { this.testDomains=new TreeTestDomainCollection(this); // This call is required by the Windows.Forms Form Designer. InitializeComponent(); Application.AddMessageFilter(this); DragAcceptFiles(this.Handle, true); this.state = new UnitTreeViewState(this.typeTree, new UnitTreeViewState.UpdateTreeNodeDelegate(this.UpdateNode) ); this.treeNodeFacade= new TestTreeNodeFacade(); this.reflectionImageList = new ReflectionImageList(this.treeImageList); this.createNode = new UnitTreeNodeCreatorDelegate(this.CreateNode); this.addChildNode = new AddChildNodeDelegate(this.AddChildNode); this.testDomains.Watcher.AssemblyChangedEvent+=new MbUnit.Core.Remoting.AssemblyWatcher.AssemblyChangedHandler(Watcher_AssemblyChangedEvent); this.SetStyle(ControlStyles.DoubleBuffer,true); this.SetStyle(ControlStyles.ResizeRedraw,true); }
/// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } if (this.workerThread!=null) { this.workerThread.Abort(); } } if (this.testDomains != null) { this.testDomains.Watcher.AssemblyChangedEvent -= new MbUnit.Core.Remoting.AssemblyWatcher.AssemblyChangedHandler(Watcher_AssemblyChangedEvent); this.testDomains.Dispose(); this.testDomains = null; } base.Dispose( disposing ); }