}
else
{
- _recorder.Stop(_config.RingBuffer == 0 || _confirmDialog.ShowDialog(this) != DialogResult.Yes);
+ _recorder.Stop();
+ if (_config.RingBuffer > 0)
+ {
+ if (_confirmDialog.ShowDialog(this) == DialogResult.Yes)
+ _recorder.SaveBuffer();
+ else
+ _recorder.DiscardBuffer();
+ }
AbortRecording();
}
}
TIME_PERIODIC | TIME_KILL_SYNCHRONOUS);
}
- public void Stop(bool discard = false)
+ public void Stop()
{
if (_timerId != 0)
timeKillEvent(_timerId);
- if (_config.RingBuffer == 0)
- return;
- if (discard)
- {
- _ringBuffer.Clear();
- return;
- }
+ }
+
+ public void SaveBuffer()
+ {
if (!SaveRingBuffer())
ReportCaptureResult(Resources.Recorder_IO_Error);
}
+ public void DiscardBuffer()
+ {
+ _ringBuffer.Clear();
+ }
+
[DllImport("winmm.dll")]
private static extern uint timeSetEvent(uint delay, uint resolution, TimeProc timeProc,
ref uint user, uint eventType);