Ejemplo n.º 1
0
        public static async Task BringUpToDate(string branch, string expectedVersion, string updateReason)
        {
            string currentVersion = versionRegistry.GetString("VersionGuid");

            if (currentVersion != expectedVersion)
            {
                DialogResult check = MessageBox.Show
                                     (
                    "Roblox Studio is out of date!\n"
                    + updateReason +
                    "\nWould you like to update now?",

                    "Out of date!",
                    MessageBoxButtons.YesNo,
                    MessageBoxIcon.Warning
                                     );

                if (check == DialogResult.Yes)
                {
                    RobloxStudioInstaller installer = new RobloxStudioInstaller(false);

                    await installer.RunInstaller(branch);

                    installer.Dispose();
                }
            }
        }