示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }
示例#5
0
        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);
        }
示例#6
0
        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);
        }
示例#7
0
        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);
        }