public void InitialiseInUi( IMainForm mainForm ) { _tab = mainForm.TryGetTabForCategory( CategoryName ) as TextureTabPage ; if( _tab==null ) { _tab= buildTab( ) ; mainForm.AddCategoryTab( _tab ) ; } _tab.AddPlugin( this ) ; }
TextureTabPage buildTab( ) { var tabPage = new TextureTabPage { CategoryName = CategoryName } ; IoC.Model.NewModelLoaded += ( o, args ) => _tab.SetRootFolder( IoC.Model.Level.ContentRootFolder ) ; return tabPage ; }