コード例 #1
0
        private async void editFVariables_Click(object sender, EventArgs e)
        {
            bool allow = true;

            // Create a warning prompt if the user hasn't disabled this warning.
            var warningDisabled = Program.GetBool("Disable Flag Warning");

            if (!warningDisabled)
            {
                SystemSounds.Hand.Play();
                allow = false;

                using (Form warningPrompt = createFlagWarningPrompt())
                {
                    warningPrompt.ShowDialog();

                    if (warningPrompt.DialogResult == DialogResult.Yes)
                    {
                        Program.SetValue("Disable Flag Warning", warningPrompt.Enabled);
                        allow = true;
                    }
                }
            }

            if (allow)
            {
                string branch = getSelectedBranch();

                Enabled       = false;
                UseWaitCursor = true;

                var infoTask = StudioBootstrapper.GetCurrentVersionInfo(branch);
                var info     = await infoTask.ConfigureAwait(true);

                Hide();

                var updateTask = BootstrapperForm.BringUpToDate(branch, info.Guid, "Some newer flags might be missing.");
                await updateTask.ConfigureAwait(true);

                using (FlagEditor editor = new FlagEditor())
                    editor.ShowDialog();

                Show();
                BringToFront();

                Enabled       = true;
                UseWaitCursor = false;
            }
        }
コード例 #2
0
        private async void editFVariables_Click(object sender, EventArgs e)
        {
            bool allow = true;

            // Create a warning prompt if the user hasn't disabled this warning.
            var warningDisabled = Program.GetBool("Disable Flag Warning");

            if (!warningDisabled)
            {
                SystemSounds.Hand.Play();
                allow = false;

                Form warningPrompt = createFlagWarningPrompt();
                warningPrompt.ShowDialog();

                DialogResult result = warningPrompt.DialogResult;

                if (result == DialogResult.Yes)
                {
                    Program.SetValue("Disable Flag Warning", warningPrompt.Enabled);
                    allow = true;
                }
            }

            if (allow)
            {
                string branch = (string)branchSelect.SelectedItem;

                Enabled       = false;
                UseWaitCursor = true;

                ClientVersionInfo info = await RobloxStudioInstaller.GetCurrentVersionInfo(branch);

                Hide();

                await RobloxStudioInstaller.BringUpToDate(branch, info.Guid, "Some newer flags might be missing.");

                FlagEditor editor = new FlagEditor(branch);
                editor.ShowDialog();

                Show();
                BringToFront();

                Enabled       = true;
                UseWaitCursor = false;
            }
        }