private void OptionsButton_Click(object sender, EventArgs e)
        {
            var selection = profilesListBox.SelectedItem;

            if (selection != null)
            {
                var profileName = (string)selection;
                var profile     = GetProfileByName(profileName);
                var engine      = new UciEngineProxy(profile);
                using (var optionsForm = new EngineOptionsForm(engine.ScratchOptions))
                {
                    optionsForm.ShowDialog();

                    if (!optionsForm.Discard)
                    {
                        engine.UpdateUciOptions();
                    }
                }

                engine.Quit();
            }
        }
Example #2
0
        private void AfterEngineLoaded()
        {
            Engine.AnalysisStarted += OnAnalysisStarted;

            FillEngineIdInfo();

            EmbeddedControl.ToggleAnalysisButton.Enabled = true;
            toggleAnalyzeButton.Enabled      = true;
            optionsToolStripMenuItem.Enabled = true;
            closeToolStripMenuItem.Enabled   = true;
            if (EmbeddedHandler != null)
            {
                embedButton.Enabled = true;
            }
            UpdateAnalysisButtonName();

            OptionsForm                 = new EngineOptionsForm(Engine.ScratchOptions, false);
            OptionsForm.FormClosing    += OnOptionsFormClosing;
            OptionsForm.VisibleChanged += OnOptionsFormVisibilityChanged;

            AnalysisData.Clear();
        }