private void showModInExplorerToolStripMenuItem_Click(object sender, EventArgs e) { if (listViewHmods.SelectedItems.Count > 0) { Hmod selectedHmod = (Hmod)(listViewHmods.SelectedItems[0].Tag); if (selectedHmod.PresentInUserMods()) { string args = $"/select, \"{selectedHmod.HmodPath}\""; Process.Start("explorer.exe", args); } } }
private void deleteModFromDiskToolStripMenuItem_Click(object sender, EventArgs e) { foreach (ListViewItem selectedItem in listViewHmods.SelectedItems) { Hmod selectedHmod = (Hmod)(selectedItem.Tag); if (selectedHmod.PresentInUserMods()) { if (selectedHmod.isFile) { File.Delete(selectedHmod.HmodPath); } else { Directory.Delete(selectedHmod.HmodPath, true); } hmods.Remove(selectedHmod); } } populateList(); }