Esempio n. 1
0
 private void CountControlButtonOnClick(object sender, RoutedEventArgs e)
 {
     if (m_countTimer.IsRunning)
     {
         m_countTimer.Stop();
     }
     else
     {
         m_countTimer.Start();
     }
 }
Esempio n. 2
0
        //cap

        void CountTimer_Tick(object sender, EventArgs e)
        {
            CurPollSeconds--;
            if (CurPollSeconds < 0)
            {
                CurPollSeconds = PollSeconds;

                CountTimer.Stop();
                if (!string.IsNullOrEmpty(StreamerNick))
                {
                    switch (_CounterSource)
                    {
                    case CounterSource.Twitch:
                        GetTwitchCount();
                        break;

                    case CounterSource.Cybergame:
                        GetCyberCount();
                        break;
                    }
                }
                else
                {
                    CountTimer.Start();
                }
            }
        }