Пример #1
0
        private void OneKeyAdd(object sender, RoutedEventArgs e)
        {
            var list = Utils.GetModifyList();

            TreeNode._rev = 1;

            for (var i = 0; i < list.Count; i++)
            {
                var node = _rootNode.FindNodeInChild(list[i]);
                if (node != null && !DirFilter.IsSkipDir(node.Path))
                {
                    node.IsOn = true;
                }
            }

            TreeNode._rev = 0;
            NodeCheckedChanged(null);
        }
Пример #2
0
        public static void AddErrorBin(List <String> excelNames, ref TreeNode node)
        {
            if (!node.IsFile && node.Child != null)
            {
                for (int i = 0; i < node.Child.Count; i++)
                {
                    TreeNode childNode = node.Child[i];

                    foreach (var excelName in excelNames)
                    {
                        if (childNode.MatchSearch(excelName) && !DirFilter.IsSkipDir(childNode.Path))
                        {
                            Utils.DebugLog(childNode.Name);
                            Utils.DebugLog(childNode.Path);
                            childNode.IsOn = true;
                            break;
                        }
                    }

                    AddErrorBin(excelNames, ref childNode);
                }
            }
        }