/// <summary> /// Constructor /// </summary> public FoldersComponentControl(FoldersComponent component) { InitializeComponent(); _component = component; ToolStripBuilder.BuildToolbar(_toolbar.Items, _component.ToolbarModel.ChildNodes, ToolStripItemDisplayStyle.ImageAndText); foreach (IFolder folder in _component.Folders) { TreeNode node = new TreeNode(folder.DisplayName); node.Tag = folder; _folderTree.Nodes.Add(node); } _component.SelectedFolderChanged += new EventHandler(_component_SelectedFolderChanged); // TODO add .NET databindings to _component }
public void SetComponent(IApplicationComponent component) { _component = (FoldersComponent)component; }