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 = getSelectedBranch();

                Enabled       = false;
                UseWaitCursor = true;

                ClientVersionInfo info = await StudioBootstrapper.GetCurrentVersionInfo(branch);

                Hide();

                await StudioBootstrapper.BringUpToDate(branch, info.Guid, "某些新参数可能无法在旧版本使用!");

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

                Show();
                BringToFront();

                Enabled       = true;
                UseWaitCursor = false;
            }
        }
Пример #3
0
        private async void editExplorerIcons_Click(object sender, EventArgs e)
        {
            Enabled       = false;
            UseWaitCursor = true;

            string            branch = (string)branchSelect.SelectedItem;
            ClientVersionInfo info   = await StudioBootstrapper.GetCurrentVersionInfo(branch);

            Hide();
            await StudioBootstrapper.BringUpToDate(branch, info.Guid, "The class icons may have received an update.");

            var editor = new ClassIconEditor(branch);

            editor.ShowDialog();

            Show();
            BringToFront();

            Enabled       = true;
            UseWaitCursor = false;
        }
Пример #4
0
        private async void editExplorerIcons_Click(object sender, EventArgs e)
        {
            Enabled       = false;
            UseWaitCursor = true;

            string branch = (string)branchSelect.SelectedItem;

            Hide();

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

            var updateTask = BootstrapperForm.BringUpToDate(branch, info.VersionGuid, "The class icons may have received an update.");
            await updateTask.ConfigureAwait(true);

            using (var editor = new ClassIconEditor())
                editor.ShowDialog();

            Show();
            BringToFront();

            Enabled       = true;
            UseWaitCursor = false;
        }