// Build views subtree public void BuildViewsTree(GroupCollection groups, ViewCollection views) { if (!camerasOnly) { BuildViewsTree(groups, views, null, viewsRootNode); camerasRootNode.Expand(); } }
// Build views of specified parent private void BuildViewsTree(GroupCollection groups, ViewCollection views, Group parent, TreeNode parentNode) { // build all groups foreach (Group group in groups) { if (group.Parent == parent) { BuildViewsTree(groups, views, group, AddViewsGroup(group, parentNode)); } } // build all views foreach (View view in views) { if (view.Parent == parent) { AddView(view, parentNode); } } }