예제 #1
0
        private bool ApplyFilter(string filterString, bool checkedState)
        {
            if (filterString.Length > 0)
            {
                // Load and iterate through the exclusions
                string[] parts = filterString.Split(",;".ToCharArray());
                if (parts != null && parts.Length > 0)
                {
                    foreach (string filter in parts)
                    {
                        // Find the node
                        TreeNode node = ClassificationTreeView.DrillToNodePath(filter);
                        if (node != null)
                        {
                            // Set the checked state
                            node.Checked = checkedState;
                            if (node.Parent != null)
                            {
                                node.Collapse();
                            }
                        }
                    }
                }

                return(true);
            }

            return(false);
        }
예제 #2
0
 private void DrillToClassification()
 {
     if (!String.IsNullOrEmpty(Classification))
     {
         TreeNode node = ClassificationTreeView.DrillToNodePath(Classification);
         if (node != null)
         {
             ClassificationTreeView.SelectedNode = node;
         }
     }
 }