예제 #1
0
 /// ------------------------------------------------------------------------------------
 protected virtual void OnPlaybackStopped(WaveControlBasic ctrl, TimeSpan start, TimeSpan end)
 {
     if (_closeDlgRequested)
     {
         Close();
     }
     else
     {
         UpdateDisplay();
     }
 }
예제 #2
0
        /// ------------------------------------------------------------------------------------
        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;
        }
예제 #3
0
        /// ------------------------------------------------------------------------------------
        public void PlaySource(WaveControlBasic waveControl, Action <WaveControlBasic> play)
        {
            waveControl.PlaybackStopped -= OnPlaybackStopped;
            waveControl.PlaybackStopped += OnPlaybackStopped;

            if (_recordingDeviceIndicator != null)
            {
                _recordingDeviceIndicator.MicCheckingEnabled = false;
            }

            play(waveControl);
        }
예제 #4
0
 /// ------------------------------------------------------------------------------------
 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);
     }
 }
예제 #5
0
 /// ------------------------------------------------------------------------------------
 protected virtual void PlaybackShortPortionUpToBoundary(WaveControlBasic ctrl,
                                                         TimeSpan time1, TimeSpan time2)
 {
     _waveControl.PlaybackStopped -= PlaybackShortPortionUpToBoundary;
 }
예제 #6
0
 /// ------------------------------------------------------------------------------------
 protected virtual void OnPlaybackStarted(WaveControlBasic ctrl, TimeSpan start, TimeSpan end)
 {
     UpdateDisplay();
 }
예제 #7
0
 /// ------------------------------------------------------------------------------------
 protected override void PlaybackShortPortionUpToBoundary(WaveControlBasic ctrl,
                                                          TimeSpan time1, TimeSpan time2)
 {
     base.PlaybackShortPortionUpToBoundary(ctrl, time1, time2);
     _waveControl.SetCursor(_startTimeOfSegmentWhoseEndIsMoving);
 }