コード例 #1
0
        /// <summary>
        /// Constructor for Simple Data
        /// </summary>
        public BlindTimerWindow(TimeSpan blindTime, BlindLevel currentLevel)
        {
            InitializeComponent();
            BlindTime     = blindTime;
            _currentLevel = currentLevel;
            _uiUpdater    = new DispatcherTimer {
                Interval = new TimeSpan(0, 0, 1)
            };                                                                   //Create the UiUpdater
            _uiUpdater.Tick += UiUpdater_Tick;

            _blindTimer = new DispatcherTimer {
                Interval = blindTime
            };
            _blindTimer.Tick += BlindTimer_Tick;
        }
コード例 #2
0
        private void BlindTimer_Tick(object sender, EventArgs e)
        {
            _blindTimer.Stop();
            _secondsPassed = 0;
            if (_nextLevel != null)
            {
                _currentLevel = _nextLevel;
            }
            _nextLevel = _currentTournament?.TournamentStructure.GetNextLevel(_currentLevel);


            _blindTimer.Start();
            //PlayNextLevelSound
            throw new NotImplementedException();
        }
コード例 #3
0
        private void AddBlindButton_Click(object sender, RoutedEventArgs e)
        {
            var addLevel = new BlindLevel();

            if (!int.TryParse(BigBlindBox.Text, out addLevel.BigBlind) ||
                !int.TryParse(SmallBlindBox.Text, out addLevel.SmallBlind))
            {
                return;
            }
            if (CurrentBlindsDisplayed.Any(x => x.SmallBlind == addLevel.BigBlind))
            {
                return;
            }
            int.TryParse(AnteBox.Text, out addLevel.Ante);
            CurrentBlindsDisplayed.Add(addLevel);
            CurrentBlindsDisplayed.Sort();
            BlindsListBox.ItemsSource = CurrentBlindsDisplayed;
        }
コード例 #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="nextLevel"></param>
 public void SetNextBlindLevel(BlindLevel nextLevel)
 {
     _nextLevel = nextLevel;
 }