private void onTimedEvent(object sender, EventArgs e)
        {
            SourceStream.StopRecording();

            SourceStream = null;
            waveWriter.Dispose();
            waveWriter = null;

            MessageBox.Show("recorded");
            int h = Convert.ToInt32(HourBox.Text);
            int m = Convert.ToInt32(MinBox.Text);
            int s = Convert.ToInt32(SecsBox.Text);

            int milliseconds = (h * 60 * 60 * 1000) + (m * 60 * 1000) + (s * 1000);

            if (milliseconds == 0)
            {
                PlayClass.playRecording();
            }
            else
            {
                playTimer          = new System.Timers.Timer();
                playTimer.Interval = milliseconds;
                playTimer.Elapsed += new System.Timers.ElapsedEventHandler(play);
                playTimer.Enabled  = true;
            }
        }
 private void play(object sender, EventArgs e)
 {
     playTimer.Enabled = false;
     PlayClass.playRecording();
 }