private void listView1_DoubleClick(object sender, EventArgs e) { if (listView1.SelectedItems.Count > 1) { return; } //Console.WriteLine($"Current Cluster Node: {currentClusterNode.Text}"); NodeTag nodeTag = (NodeTag)listView1.SelectedItems[0].Tag; switch (nodeTag.Type) { case NodeType.Dirent: DatabaseFile databaseFile = nodeTag.Tag as DatabaseFile; if (databaseFile.IsDirectory()) { PopulateListView(databaseFile.Children, databaseFile.GetParent()); } break; case NodeType.Cluster: List <DatabaseFile> dirents = nodeTag.Tag as List <DatabaseFile>; PopulateListView(dirents, null); break; } }
public void Save(string path, DatabaseFile databaseFile) { if (databaseFile.IsDirectory()) { SaveDirectory(databaseFile, path); } else { SaveFile(databaseFile, path); } }