/// ------------------------------------------------------------------------------------ protected virtual void OnPlaybackStopped(WaveControlBasic ctrl, TimeSpan start, TimeSpan end) { if (_closeDlgRequested) { Close(); } else { UpdateDisplay(); } }
/// ------------------------------------------------------------------------------------ private void OnPlaybackStopped(WaveControlBasic ctrl, TimeSpan start, TimeSpan end) { // Restore checking for recording device if (_recordingDeviceIndicator != null) { _recordingDeviceIndicator.MicCheckingEnabled = false; } // Remove this handler ctrl.PlaybackStopped -= OnPlaybackStopped; }
/// ------------------------------------------------------------------------------------ public void PlaySource(WaveControlBasic waveControl, Action <WaveControlBasic> play) { waveControl.PlaybackStopped -= OnPlaybackStopped; waveControl.PlaybackStopped += OnPlaybackStopped; if (_recordingDeviceIndicator != null) { _recordingDeviceIndicator.MicCheckingEnabled = false; } play(waveControl); }
/// ------------------------------------------------------------------------------------ protected virtual void OnPlayingback(WaveControlBasic ctrl, TimeSpan current, TimeSpan total) { if (InvokeRequired) { Invoke(new Action(() => OnPlayingback(ctrl, current, total))); } else { _labelTimeDisplay.Text = MediaPlayerViewModel.GetTimeDisplay( (float)current.TotalSeconds, (float)total.TotalSeconds); } }
/// ------------------------------------------------------------------------------------ protected virtual void PlaybackShortPortionUpToBoundary(WaveControlBasic ctrl, TimeSpan time1, TimeSpan time2) { _waveControl.PlaybackStopped -= PlaybackShortPortionUpToBoundary; }
/// ------------------------------------------------------------------------------------ protected virtual void OnPlaybackStarted(WaveControlBasic ctrl, TimeSpan start, TimeSpan end) { UpdateDisplay(); }
/// ------------------------------------------------------------------------------------ protected override void PlaybackShortPortionUpToBoundary(WaveControlBasic ctrl, TimeSpan time1, TimeSpan time2) { base.PlaybackShortPortionUpToBoundary(ctrl, time1, time2); _waveControl.SetCursor(_startTimeOfSegmentWhoseEndIsMoving); }