Exemplo n.º 1
0
        public override void SayTime(int sec)
        {
            int minutes = sec / 60;
            int seconds = sec % 60;

            if (minutes > 0)
            {
                SoundsQueuePlayer.AddSound(m_sndNormal[minutes]);
                SoundsQueuePlayer.AddSound(minutes == 1 ? m_sndMinute : m_sndMinutes);
            }
            if (seconds > 0)
            {
                if (seconds <= 19)
                {
                    SoundsQueuePlayer.AddSound(m_sndNormal[seconds]);
                }
                else
                {
                    int restSec = seconds % 10;
                    if (restSec > 0)
                    {
                        SoundsQueuePlayer.AddSound(m_sndNormal[restSec]);
                        SoundsQueuePlayer.AddSound(m_sndUnd);
                    }
                    int mulTen = (seconds / 10) * 10;
                    SoundsQueuePlayer.AddSound(m_sndNormal[mulTen]);
                }
                SoundsQueuePlayer.AddSound(m_sndSeconds);
            }
        }
Exemplo n.º 2
0
 public MainDlg()
 {
     InitializeComponent();
     iPlankMS = iStartingTime;
     UpdateTime();
     SoundsQueuePlayer.Start();
     lngCurrent = languages[0];
 }
Exemplo n.º 3
0
 private void MainDlg_FormClosing(object sender, FormClosingEventArgs e)
 {
     SoundsQueuePlayer.Stop();
 }
Exemplo n.º 4
0
 public void SayFinish()
 {
     SoundsQueuePlayer.AddSound(m_sndFinish);
 }
Exemplo n.º 5
0
 public void SayGo()
 {
     SoundsQueuePlayer.AddSound(m_sndGo);
 }
Exemplo n.º 6
0
 public void SayCountdown(int sec)
 {
     SoundsQueuePlayer.AddSound(countdown[sec]);
 }