private void btnPack_Click(object sender, EventArgs e) { PackageDataManager.GetFormatAt(cbDataFormats.SelectedIndex).SaveData(inputPtr, unpackedInputPath); PluginPacker.GetFormatAt(cbPackerFormats.SelectedIndex).Pack(unpackedInputPath, tbOutputDir.Text); Directory.Delete(unpackedInputPath, true); Close(); }
private void btnPack_Click(object sender, EventArgs e) { for (int i = 0; i < unpackedInputPath.Length; i++) { string s = unpackedInputPath[i]; PackageDataManager.GetFormatAt(cbDataFormats.SelectedIndex).SaveData(inputPtr[i], s); string path = Path.Combine(tbOutputDir.Text, inputPtr[i].PluginName); Directory.CreateDirectory(path); PluginPacker.GetFormatAt(cbPackerFormats.SelectedIndex).Pack(s, path); Directory.Delete(unpackedInputPath[i], true); } Close(); }
private void PackerWindow_Load(object sender, EventArgs e) { if (PluginPacker.FormatCount == 0) { StyledMessageBox.Show( "Error", "Can not start the Packer GUI. There is no Plugin Package Format installed.", MessageBoxButtons.OK, SystemIcons.Error ); Close(); return; } if (PackageDataManager.FormatCount == 0) { StyledMessageBox.Show( "Error", "Can not start the Packer GUI. There is no Package Data Format installed.", MessageBoxButtons.OK, SystemIcons.Error ); Close(); return; } cbPackerFormats.Items.Clear(); for (int i = 0; i < PluginPacker.FormatCount; i++) { cbPackerFormats.Items.Add(PluginPacker.GetFormatAt(i)); } cbPackerFormats.SelectedIndex = 0; for (int i = 0; i < PackageDataManager.FormatCount; i++) { cbDataFormats.Items.Add(PackageDataManager.GetFormatAt(i)); } cbDataFormats.SelectedIndex = 0; }