private void btnDownloadInstall_Click(object sender, EventArgs e) { string downloadUrl = LauncherSettings.GetWebValue(LauncherSettings.INSTALLER_URL); string filename = downloadUrl.Substring(downloadUrl.LastIndexOf('/') + 1); string tempPath = Path.Combine(LauncherSettings.TempDir, filename); KillProcess(filename); /* * try * { * WebClient wc = new WebClient(); * wc.DownloadFile(downloadUrl, tempPath); * } * catch(Exception ex) * { * MessageBox.Show($"Failed to download {downloadUrl}\n\n{ex}"); * } * * try * { * Process.Start(tempPath); * } * catch { } //eat it */ DownloadFile(downloadUrl, tempPath, null); }
private void btnDownloadInstall_Click(object sender, EventArgs e) { string downloadUrl = LauncherSettings.GetWebValue(LauncherSettings.INSTALLER_URL); string filename = downloadUrl.Substring(downloadUrl.LastIndexOf('/') + 1); string tempPath = Path.Combine(LauncherSettings.TempDir, filename); KillProcess(filename); DownloadForm.DownloadFile(downloadUrl, tempPath, null); }
private void btnOpenGuide2_Click(object sender, EventArgs e) { string guideUrl = LauncherSettings.GetWebValue(LauncherSettings.GAME_GUIDE); if (string.IsNullOrEmpty(guideUrl)) { MessageBox.Show("Could not fetch the guide url"); return; } Process.Start(guideUrl); }
private void btnGithub_Click(object sender, EventArgs e) { string githubUrl = LauncherSettings.GetWebValue(LauncherSettings.GITHUB_REPO); if (string.IsNullOrEmpty(githubUrl)) { MessageBox.Show("Could not fetch the github url"); return; } Process.Start(githubUrl); }
private void btnTranslation_Click(object sender, EventArgs e) { string Url = LauncherSettings.GetWebValue(LauncherSettings.TRANSLATE_LINK); if (string.IsNullOrEmpty(Url)) { MessageBox.Show("Could not fetch the translation url"); return; } Process.Start(Url); }
private void btnDiscord_Click(object sender, EventArgs e) { string Url = LauncherSettings.GetWebValue(LauncherSettings.DISCORD_LINK); if (string.IsNullOrEmpty(Url)) { MessageBox.Show("Could not fetch the discord url"); return; } Process.Start(Url); }
private void btnGetKRFont_Click(object sender, EventArgs e) { string Url = LauncherSettings.GetWebValue(LauncherSettings.GOOGLE_FONT); if (string.IsNullOrEmpty(Url)) { MessageBox.Show("Could not fetch the font url"); return; } Process.Start(Url); }