/// <summary> /// Packages a mod into an auto-install ZIP file /// </summary> /// <param name="info">The mod information to be edited</param> /// <param name="path">The path of the mod info file</param> public static void PackageMod(ModInfo info, string path) { #region Sanity checks if (info == null) { throw new ArgumentNullException(nameof(info)); } if (string.IsNullOrEmpty(path)) { throw new ArgumentNullException(nameof(path)); } #endregion var dialog = new ModPackageDialog { _modProjectFile = path, _modDirPath = Path.GetDirectoryName(path), saveFileDialog = { FileName = info.Name + FileExt } }; dialog.ShowDialog(); }
private void menuFilePackageMod_Click(object sender, EventArgs e) { ModPackageDialog.PackageMod(ModInfo.Current, ModInfo.CurrentLocation); }