Exemplo n.º 1
0
        private void listing(FileIndexor fi)
        {
            FileIndexorNode node = fi.GetRootNode();

            foreach (FileIndexorNode n in node.Nodes)
            {
                make_node(PathTree.Nodes, Path.GetFileName(n.Path.Remove(n.Path.Length - 1)));
                make_tree(n, PathTree.Nodes[PathTree.Nodes.Count - 1]);
            }
            foreach (FileInfo f in new DirectoryInfo(node.Path).GetFiles())
            {
                make_node(PathTree.Nodes, f.Name);
            }
        }
Exemplo n.º 2
0
        private async void bOpen_ClickAsync(object sender, EventArgs e)
        {
            fi = null;
            fi = new FileIndexor();
            PathTree.Nodes.Clear();
            AvailableList.Items.Clear();

            LogEssential.Instance.PushLog(() => $"[Fs Manager] Open directory '{tbPath.Text}'");
            await fi.ListingDirectoryAsync(tbPath.Text);

            LogEssential.Instance.PushLog(() => $"[Fs Manager] Complete open! DirCount={fi.Count}");

            listing(fi);
        }