private void onSartRec(object sender, RoutedEventArgs e) { // 开始录制 if (myMicrophone.State != MicrophoneState.Started) { myMicrophone.Start(); } SBRecoder.Begin(); BtnStart.IsEnabled = false; Dispatcher.BeginInvoke(() => BtnStop.IsEnabled = true); Dispatcher.BeginInvoke(() => txbRecording.Text = "录音...."); }
public test() { InitializeComponent(); Dispatcher.BeginInvoke(() => SBRecoder.Begin()); DoubleAnimation DoubleAnimation = new DoubleAnimation(); }