private void OnNewRecording(object sender, RecordingEventArgs e) { if (this.recordingEntry == null) return; CommandBindingViewModel entry; lock (this.inputSync) { if (this.recordingEntry == null) return; e.Provider.NewRecording -= OnNewRecording; e.Provider.EndRecord(); entry = Interlocked.Exchange (ref this.recordingEntry, null); entry.Input = e.RecordedInput; entry.ProviderType = e.Provider.GetType().Name; entry.Recording = false; } IsRecording = false; }
private void OnNewRecording(RecordingEventArgs e) { EventHandler<RecordingEventArgs> handler = NewRecording; if (handler != null) handler (this, e); }