private void PatchFirmwareImages(string PatchContainerFileName, List <string> ImagesToFlash) { BinaryPatcherLib.BinaryPatcher PatchEngine; for (int i = 0; i < ImagesToFlash.Count; i++) { if (File.Exists(".\\Patches\\" + PatchContainerFileName + "\\" + Path.GetFileNameWithoutExtension(ImagesToFlash[i]) + ".xml")) { PatchEngine = new BinaryPatcherLib.BinaryPatcher(ImagesToFlash[i], ".\\Patches\\" + PatchContainerFileName + "\\" + Path.GetFileNameWithoutExtension(ImagesToFlash[i]) + ".xml"); PatchEngine.ApplyPatchToFile(); } } }
private void btnPatchFile_Click(object sender, EventArgs e) { Patcher = new BinaryPatcherLib.BinaryPatcher(FilePath, PatchContainerPath); Patcher.ApplyPatchToFile(); }