Exemplo n.º 1
0
        private void InitComboBox()
        {
            var dirList = DirFilter.GetSelectDir();

            foreach (var dir in dirList)
            {
                comboBox.Items.Add(dir);
            }

            comboBox.SelectedIndex = comboBox.Items.IndexOf(DirFilter.defaultDir);
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
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);
                }
            }
        }
Exemplo n.º 4
0
 private void OnDirSelect(object sender, SelectionChangedEventArgs e)
 {
     DirFilter.SetSelectDir(comboBox.SelectedValue.ToString());
 }