Пример #1
0
 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);
         }
     }
 }
Пример #2
0
 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();
 }