private void buttonDS4UpdateNow_Click(object sender, EventArgs e) { if (Functions.CheckIsWowRunning()) { MessageBox.Show(Resources.STRING_MESSAGE_CLOSE_WOW, "WoWmapper", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } var dsVer = Github.GetLatestRelease2("topher-au", "WoWmapper"); DownloadForm dlf; try { dlf = new DownloadForm(dsVer.assets[0].browser_download_url); } catch { MessageBox.Show("Error", "", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (dlf.DialogResult == DialogResult.Cancel) return; var outFile = dlf.OutputFile; FastZip fz = new FastZip(); try { fz.ExtractZip(outFile, ".", "WoWmapper_Updater.exe"); } catch { MessageBox.Show("Error extracting WoWmapper updater"); } Process updater = new Process(); updater.StartInfo.FileName = "WoWmapper_Updater.exe"; updater.StartInfo.Arguments = string.Format("-update \"{0}\"", outFile); updater.StartInfo.UseShellExecute = false; updater.Start(); ExitApp(); }
private void buttonCPUpdateNow_Click(object sender, EventArgs e) { if (Functions.CheckIsWowRunning()) { MessageBox.Show(Resources.STRING_MESSAGE_CLOSE_WOW, "WoWmapper", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } var cpVer = Github.GetLatestRelease2("seblindfors", "ConsolePort"); DownloadForm dlf = new DownloadForm(cpVer.assets[0].browser_download_url); if (dlf.DialogResult == DialogResult.Cancel) return; var outFile = dlf.OutputFile; Functions.InstallAddOn(outFile); MessageBox.Show(string.Format(Resources.STRING_MESSAGE_CP_UPDATE_SUCCESS, cpVer.tag_name), "WoWmapper", MessageBoxButtons.OK, MessageBoxIcon.Information); File.Delete(outFile); var vCheck = DoVersionCheck(); }