private void afterSelectNode(object sender, TreeViewEventArgs e) { dc.listViewRows.Clear(); listView2.Items.Clear(); if (e.Node.Tag is HFSPlusCatalogFolder) { HFSPlusCatalogFolder details = (HFSPlusCatalogFolder)e.Node.Tag; propertyGrid1.SelectedObject = details; } else if (e.Node.Tag is HFSPlus.volumeHeader) { HFSPlus.volumeHeader details = (HFSPlus.volumeHeader)e.Node.Tag; propertyGrid1.SelectedObject = details; } else if (e.Node.Tag is absImageStream.imageProperties) { absImageStream.imageProperties details = (absImageStream.imageProperties)e.Node.Tag; propertyGrid1.SelectedObject = details; } dc.generateListViewContent(e.Node); foreach (ListViewItem row in dc.listViewRows) { listView2.Items.Add(row); } hashFileToolStripMenuItem.Enabled = true; }
public void getImageContents(string imagepath) { i = accessImage(imagepath); setFileTreeFromImage(i); fileTree.Text = i.bf.F.Name; absImageStream.imageProperties tag = new absImageStream.imageProperties(); tag.imagepath = i.bf.F.FullName; tag.componentSize = i.componentSize; tag.sectorSize = i.sectorSize; i.Position = 0; tag.scheme = i.scheme; tag.totalSize = i.Length; if (tag.scheme == absImageStream.schemeType.GPT) { tag.entries = new GPTScheme(i); } fileTree.Tag = tag; displayTree = stripFilesFromTree(fileTree); }
private void hashImageToolStripMenuItem_Click(object sender, EventArgs e) { dataOperations.hashValues hv = dc.addImageHash(); string[] hashStrings = dataOperations.buildHashStrings(hv); absImageStream.imageProperties tag = (absImageStream.imageProperties)directoryTree.Nodes[0].Tag; tag.hashMD5 = hashStrings[0]; tag.hashSHA1 = hashStrings[1]; directoryTree.Nodes[0].Tag = tag; propertyGrid1.SelectedObject = tag; }