Пример #1
0
 public static JointConfiguration ShowConfigurationForm(IWin32Window owner, JointConfiguration currentConfig)
 {
     ConfigurationForm configForm = new ConfigurationForm(currentConfig);
       configForm.ShowDialog(owner);
       JointConfiguration result = new JointConfiguration(configForm.m_engineConfiguration, configForm.m_clockConfiguration);
       configForm.Dispose();
       return result;
 }
Пример #2
0
        private void configurationMenu_Click(object sender, EventArgs e)
        {
            JointConfiguration jointConfig = new JointConfiguration(m_chessFacade.EngineConfiguration, m_chessFacade.ClockConfiguration);

            jointConfig = ConfigurationForm.ShowConfigurationForm(this, jointConfig);
            m_chessFacade.EngineConfiguration = jointConfig.EngineConfiguration;
            m_chessFacade.ClockConfiguration  = jointConfig.ClockConfiguration;
        }
Пример #3
0
        public static JointConfiguration ShowConfigurationForm(IWin32Window owner, JointConfiguration currentConfig)
        {
            ConfigurationForm configForm = new ConfigurationForm(currentConfig);

            configForm.ShowDialog(owner);
            JointConfiguration result = new JointConfiguration(configForm.m_engineConfiguration, configForm.m_clockConfiguration);

            configForm.Dispose();
            return(result);
        }
Пример #4
0
        private ConfigurationForm(JointConfiguration currentConfig)
        {
            InitializeComponent();

            m_comboBoxClockType.Items.Add(ClockType.Conventional);
            m_comboBoxClockType.Items.Add(ClockType.Incremental);
            m_comboBoxClockType.Items.Add(ClockType.None);

            m_engineConfiguration = currentConfig.EngineConfiguration;
            m_clockConfiguration  = currentConfig.ClockConfiguration;

            m_checkBoxEngine.Checked   = m_engineConfiguration.EngineAutoPlay;
            m_checkBoxBook.Checked     = m_engineConfiguration.UseBook;
            m_numericSearchTime.Value  = (decimal)m_engineConfiguration.MaxSearchTime.TotalSeconds;
            m_numericSearchDepth.Value = m_engineConfiguration.MaxSearchDepth;

            m_comboBoxClockType.SelectedItem   = m_clockConfiguration.ClockType;
            m_numericConventionalMoves.Value   = m_clockConfiguration.ConventionalMoves;
            m_numericConventionalMinutes.Value = (decimal)m_clockConfiguration.ConventionalTime.TotalMinutes;

            m_numericIncrementStart.Value = (decimal)m_clockConfiguration.IncrementStartTime.TotalMinutes;
            m_numericIncrementPlus.Value  = (decimal)m_clockConfiguration.IncrementPlusTime.TotalSeconds;
        }
Пример #5
0
        private ConfigurationForm(JointConfiguration currentConfig)
        {
            InitializeComponent();

              m_comboBoxClockType.Items.Add(ClockType.Conventional);
              m_comboBoxClockType.Items.Add(ClockType.Incremental);
              m_comboBoxClockType.Items.Add(ClockType.None);

              m_engineConfiguration = currentConfig.EngineConfiguration;
              m_clockConfiguration = currentConfig.ClockConfiguration;

              m_checkBoxEngine.Checked = m_engineConfiguration.EngineAutoPlay;
              m_checkBoxBook.Checked = m_engineConfiguration.UseBook;
              m_numericSearchTime.Value = (decimal)m_engineConfiguration.MaxSearchTime.TotalSeconds;
              m_numericSearchDepth.Value = m_engineConfiguration.MaxSearchDepth;

              m_comboBoxClockType.SelectedItem = m_clockConfiguration.ClockType;
              m_numericConventionalMoves.Value = m_clockConfiguration.ConventionalMoves;
              m_numericConventionalMinutes.Value = (decimal)m_clockConfiguration.ConventionalTime.TotalMinutes;

              m_numericIncrementStart.Value = (decimal)m_clockConfiguration.IncrementStartTime.TotalMinutes;
              m_numericIncrementPlus.Value = (decimal)m_clockConfiguration.IncrementPlusTime.TotalSeconds;
        }
Пример #6
0
 private void configurationMenu_Click(object sender, EventArgs e)
 {
     JointConfiguration jointConfig = new JointConfiguration(m_chessFacade.EngineConfiguration, m_chessFacade.ClockConfiguration);
       jointConfig = ConfigurationForm.ShowConfigurationForm(this, jointConfig);
       m_chessFacade.EngineConfiguration = jointConfig.EngineConfiguration;
       m_chessFacade.ClockConfiguration = jointConfig.ClockConfiguration;
 }