public ItemSelectorControl( ITreeItem itemEditor ) { ItemEditor = itemEditor ; InitializeComponent( ) ; _levelExplorer = new LevelExplorerControl { Dock = DockStyle.Fill, Parent = this, CheckBoxes= false, Visible = true, ShowToolStrip = false, HideContextMenus=true, InteractsWithModel=false } ; _levelExplorer.ItemSelected += ( s, e ) => { if( e.Item is ItemEditor ) { ItemEditor = e.Item as ItemEditor ; } } ; Controls.Add( _levelExplorer ); _levelExplorer.Refresh( ); }
public ItemSelectorControl(ITreeItem itemEditor) { ItemEditor = itemEditor; InitializeComponent( ); _levelExplorer = new LevelExplorerControl { Dock = DockStyle.Fill, Parent = this, CheckBoxes = false, Visible = true, ShowToolStrip = false, HideContextMenus = true, InteractsWithModel = false }; _levelExplorer.ItemSelected += (s, e) => { if (e.Item is ItemEditor) { ItemEditor = e.Item as ItemEditor; } }; Controls.Add(_levelExplorer); _levelExplorer.Refresh( ); }