private void ConstructFilterTree(IVideoFilter filter) { treeViewFilter.Nodes.Clear(); FilterNodeCreator node_creator; if (!node_creator_map_.TryGetValue(filter.GetType(), out node_creator)) { node_creator = CreateUnknownFilterNode; } treeViewFilter.Nodes.Add(node_creator(filter)); treeViewFilter.ExpandAll(); }
private TreeNode CreateNotFilterNode(IVideoFilter ifilter) { NotFilter filter = ifilter as NotFilter; TreeNode node = new TreeNode("NOT"); IVideoFilter inner_filter = filter.InnerFilter; FilterNodeCreator node_creator; if (!node_creator_map_.TryGetValue(inner_filter.GetType(), out node_creator)) { node_creator = CreateUnknownFilterNode; } node.Nodes.Add(node_creator(inner_filter)); return(node); }