Beispiel #1
0
        // Binds graphic elements with current configuration.
        private void BindConfiguration()
        {
            CbbChrono.ItemsSource   = GraphicTools.GetChronoDisplayValues();
            CbbChrono.SelectedIndex = Properties.Settings.Default.ChronoSpeed;

            CbbCpuSpeed.ItemsSource   = GraphicTools.GetCpuSpeedDisplayValues();
            CbbCpuSpeed.SelectedIndex = Properties.Settings.Default.CpuSpeed;

            ChkSounds.IsChecked            = Properties.Settings.Default.PlaySounds;
            ChkRiichiAutoDiscard.IsChecked = Properties.Settings.Default.AutoDiscardAfterRiichi;
            ChkAutoTsumoRon.IsChecked      = Properties.Settings.Default.AutoCallMahjong;
        }
Beispiel #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public IntroWindow()
        {
            InitializeComponent();

#if DEBUG
            GrbDebugOptions.Visibility = Visibility.Visible;
#endif

            LoadConfiguration();

            CbbEndOfGameRule.ItemsSource = GraphicTools.GetEndOfGameRuleDisplayValue();
            CbbPointsRule.ItemsSource    = GraphicTools.GetInitialPointsRuleDisplayValue();
            CbbChronoSpeed.ItemsSource   = GraphicTools.GetChronoDisplayValues();
            CbbCpuSpeed.ItemsSource      = GraphicTools.GetCpuSpeedDisplayValues();
        }