コード例 #1
0
 public static void OpenVersionFolder(ref ModManager Instance)
 {
     if (Instance.VersionsListView.SelectedItem != null && Instance.VersionsListView.SelectedItem is AIRVersionListItem)
     {
         AIRVersionListItem item = Instance.VersionsListView.SelectedItem as AIRVersionListItem;
         Process.Start(item.FilePath);
     }
 }
コード例 #2
0
 public static void RemoveVersion(object version, ref ModManager Instance)
 {
     if (version != null && version is AIRVersionListItem)
     {
         AIRVersionListItem item = version as AIRVersionListItem;
         if (MessageBox.Show(Management.UserLanguage.RemoveVersion(item.Name), "", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == System.Windows.Forms.DialogResult.Yes)
         {
             try
             {
                 Management.FileManagement.WipeFolderContents(item.FilePath);
                 Directory.Delete(item.FilePath);
             }
             catch
             {
                 MessageBox.Show(Program.LanguageResource.GetString("UnableToRemoveVersion"), "", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
             Management.VersionManagement.RefreshVersionsList(ref Instance, true);
         }
     }
 }