Esempio n. 1
0
        private void ts_open_Click(object sender, System.EventArgs e)
        {
            FileSelector file_selector = new FileSelector();

            if (file_selector.ShowDialog(this) != DialogResult.OK ||
                file_selector.Path == "")
            {
                return;
            }

            Device dev = new Device(file_selector.Path, file_selector.FileName, file_selector.SectorSize);

            tv_dirs.Nodes.Clear();
            TreeNode root_node = new TreeNode(dev.DeviceName);

            tv_dirs.Nodes.Add(root_node);
            List <FileSystem> filesystems = dev.GetFileSystems();

            foreach (FileSystem fs in filesystems)
            {
                FileNode node = new FileNode(fs.GetRootDir(), true);
                root_node.Nodes.Add(node);
            }
            root_node.Expand();
        }
Esempio n. 2
0
        private void ts_open_Click( object sender, System.EventArgs e )
        {
            FileSelector file_selector = new FileSelector();
            if ( file_selector.ShowDialog( this ) != DialogResult.OK ||
                 file_selector.Path == "" )
            {
                return;
            }

            Device dev = new Device( file_selector.Path, file_selector.FileName, file_selector.SectorSize );
            tv_dirs.Nodes.Clear();
            TreeNode root_node = new TreeNode( dev.DeviceName );
            tv_dirs.Nodes.Add( root_node );
            List< FileSystem > filesystems = dev.GetFileSystems();

            foreach ( FileSystem fs in filesystems )
            {
                FileNode node = new FileNode( fs.GetRootDir(), true );
                root_node.Nodes.Add( node );
            }
            root_node.Expand();
        }