private void RecorderOnAudioData(object sender, AudioDataEventArgs e) { var n = (int) (Math.Abs(e.MaxValue)*100f); if (n > 100) n = 100; if (n < 0) n = 0; progressBar1.Value = n; if (e.IsRecoring) labelRec.Text = Resources.Recording; else labelRec.Text = ""; OnAudioDataReceived(e); }
private void CtrlOnAudioDataReceived(object sender, AudioDataEventArgs e) { if (e.IsRecoring) { if (notifyIcon1.Tag == null) { notifyIcon1.Icon = Resources.Green; notifyIcon1.Tag = 1; } } else { if (notifyIcon1.Tag != null) { notifyIcon1.Icon = Resources.Blue; notifyIcon1.Tag = null; } } }
protected virtual void OnAudioData(AudioDataEventArgs e) { AudioData?.Invoke(this, e); }
protected virtual void OnAudioDataReceived(AudioDataEventArgs e) { AudioDataReceived?.Invoke(this, e); }