Esempio n. 1
0
 private void RecordButton_Click(object sender, RoutedEventArgs e)
 {
     if (isRecording)
     {
         isRecording = false;
         recorder.StopRecording();
     }
     else
     {
         isRecording = true;
         recorder.StartRecording();
     }
 }
Esempio n. 2
0
        private void RecordButton_Click(object sender, RoutedEventArgs e)
        {
            Button recordButton = e.Source as Button;

            if (recorder.IsRecording)
            {
                recorder.StopRecording();
                recordButton.Content = Properties.Resources.recordButtonString;
            }
            else
            {
                recorder.StartRecord(Constants.AUDIO_FILENAME);
                recordButton.Content = Properties.Resources.stopRecordingButtonString;
            }
        }