public ResourceTreePaneBase() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); _resourceTree = new ResourceListView2(); _resourceTree.Dock = DockStyle.Fill; _resourceTree.BorderStyle = BorderStyle.None; _resourceTree.ContextProvider = this; TreeStructureColumn treeStructureColumn = new TreeStructureColumn(); treeStructureColumn.Width = 20; _resourceTree.Columns.Add(treeStructureColumn); _resourceTree.Columns.Add(new ResourceIconColumn()); _resourceTree.JetListView.KeyDown += HandleResourceTreeKeyDown; _resourceTree.JetListView.ActiveNodeChanged += HandleActiveNodeChanged; _resourceTree.KeyNavigationCompleted += HandleKeyNavigationCompleted; _textColumn = new RichTextColumn(); _textColumn.SizeToContent = true; _textColumn.ItemToolTipCallback = HandleToolTipCallback; _resourceTree.Columns.Add(_textColumn); Controls.Add(_resourceTree); Controls.SetChildIndex(_resourceTree, 0); _toolbarManager = new ToolbarActionManager(_toolBar); _toolbarManager.ContextProvider = this; _dataProvider = new ResourceTreeDataProvider(); SetStyle(ControlStyles.Selectable, false); UnreadManager unreadManager = (UnreadManager)Core.UnreadManager; if (unreadManager.Enabled) { _unreadDecorator = new UnreadNodeDecorator(); _textColumn.AddNodeDecorator(_unreadDecorator); } }
public void AddDecorator(IResourceNodeDecorator decorator) { _nameColumn.AddNodeDecorator(decorator); }
public void AddNodeDecorator(IResourceNodeDecorator decorator) { _textColumn.AddNodeDecorator(decorator); }