Ejemplo n.º 1
1
 public Partition( Device device, MBRPartitionEntry entry )
 {
     this.device         = device;
     partition_id        = entry.id;
     partition_start     = ( Int64 ) entry.start_lba * ( Int64 ) device.SectorSize;
     partition_length    = ( Int64 ) entry.size_lba * ( Int64 ) device.SectorSize;
 }
Ejemplo n.º 2
0
 public static FileSystem GetFileSystem( Device device, MBRPartitionEntry entry )
 {
     return new Ext( device, entry );
 }
Ejemplo n.º 3
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();
        }