Пример #1
0
        private async void btn_download_updates_Click(object sender, EventArgs e)
        {
            if (installed)
            {
                btn_download_updates.Enabled = false;
                btn_play.Enabled             = false;
                btn_download_updates.Text    = "Updating...";
                pictureBox1.Image            = AoM_Launcher.Properties.Resources.miller_walk_1__1_;
                await DownloadTools.downloadOrUpdate(wc);

                pictureBox1.Image = AoM_Launcher.Properties.Resources.miller;
                DownloadTools.restart();
            }
        }
Пример #2
0
        private async void btn_play_Click(object sender, EventArgs e)
        {
            if (installed)
            {
                Process.Start(install_directory + "Millers Adventures in TinLand.exe");
                Application.Exit();
            }

            else
            {
                btn_play.Enabled  = false;
                btn_play.Text     = "Installing...";
                pictureBox1.Image = AoM_Launcher.Properties.Resources.miller_walk;
                await DownloadTools.downloadOrUpdate(wc);

                pictureBox1.Image = AoM_Launcher.Properties.Resources.miller;
                DownloadTools.restart();
                btn_play.Text    = "Play!";
                btn_play.Enabled = true;
                installed        = true;
            }
        }