private void BtnPatchOnClick(object sender, EventArgs e) { Patcher patcher = new Patcher(ExtrasWindow.AntiPiracy, ExtrasWindow.Banner); ErrorCode result = AskForFiles(patcher); if (!result.IsValid()) { MessageErrorDialog errorDialog = new MessageErrorDialog(result); errorDialog.ShowDialog(this); errorDialog.Dispose(); return; } // Add animation if (!Animation.Instance.Contains(bgBottom, termito)) { Animation.Instance.Add(bgBottom, termito); } // Start animation termito.Position = new Point(-29, 30); PatchProgressChanged(0); termito.AutoDisable = false; termito.Enabled = true; // Disable button btnPatch.Enabled = false; btnShowExtras.Enabled = false; // Patch patcher.ProgressChanged += PatchProgressChanged; patcher.Finished += PatchFinished; patcher.Patch(); }
public static void Show(ErrorCode error, IWin32Window parent) { MessageErrorDialog dialog = new MessageErrorDialog(error); dialog.ShowDialog(parent); dialog.Dispose(); }