private void Mic2_Stop_Click(object sender, RoutedEventArgs e) { MicrophoneConstruct mic = (MicrophoneConstruct)(Microphone1_ComboBox.SelectedItem); service.stopRecording(mic); Mic2_Rec.IsEnabled = true; Mic2_Stop.IsEnabled = false; }
public void startRecording(MicrophoneConstruct i) { //try { microphones.StartRecording(i); //port.PingBiopac(); //} //catch (Exception ex) //{ // throw ex; //} }
public void StopFullRecording() { if (Microphone1_ComboBox.SelectedIndex != -1) { MicrophoneConstruct mic = (MicrophoneConstruct)(Microphone1_ComboBox.SelectedItem); service.stopRecording(mic); Mic1_Rec.IsEnabled = true; Mic1_Stop.IsEnabled = false; } if (Microphone2_ComboBox.SelectedIndex != -1) { MicrophoneConstruct mic = (MicrophoneConstruct)(Microphone2_ComboBox.SelectedItem); service.stopRecording(mic); Mic2_Rec.IsEnabled = true; Mic2_Stop.IsEnabled = false; } }
private void StartFullRecording() { if (Microphone1_ComboBox.SelectedIndex != -1) { MicrophoneConstruct mic = (MicrophoneConstruct)(Microphone1_ComboBox.SelectedItem); service.startRecording(mic); //To-Do PIng AUdio start Mic1_Rec.IsEnabled = false; Mic1_Stop.IsEnabled = true; } if (Microphone2_ComboBox.SelectedIndex != -1) { MicrophoneConstruct mic = (MicrophoneConstruct)(Microphone2_ComboBox.SelectedItem); service.startRecording(mic); //To-Do PIng AUdio start Mic2_Rec.IsEnabled = false; Mic2_Stop.IsEnabled = true; } }
private void Microphone2_ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { try { if (((ComboBox)sender).SelectedIndex > -1) { if (mic2PrevVal != null) { service.stopRecording(mic2PrevVal); } bool active = service.ListenToMicrophone(((ComboBox)sender).SelectedIndex, 2); Mic2_Rec.IsEnabled = true; } mic2PrevVal = (MicrophoneConstruct)((ComboBox)sender).SelectedValue; } catch (Exception Ex) { Xceed.Wpf.Toolkit.MessageBox.Show(Ex.Message); Microphone2_ComboBox.SelectedIndex = -1; } }
public MicItem(MicrophoneConstruct mic) { this.mic = mic; }
public void stopRecording(MicrophoneConstruct i) { microphones.StopRecording(i); }