Start scrolling recording 1 second later instead of using scroll delay for first tick

This commit is contained in:
Jaex 2015-09-27 09:21:36 +03:00
parent c363abdf22
commit 2861dc0cff
2 changed files with 10 additions and 6 deletions

View file

@ -170,7 +170,7 @@ private void StartCapture()
firstCapture = true;
Clean();
selectedWindow.Activate();
captureTimer.Interval = Options.ScrollDelay;
captureTimer.Interval = 1000;
captureTimer.Start();
}
@ -238,11 +238,16 @@ private void RemoveDuplicates()
private void captureTimer_Tick(object sender, EventArgs e)
{
if (Options.ScrollTopBeforeCapture && firstCapture)
if (firstCapture)
{
firstCapture = false;
InputHelpers.SendKeyPress(VirtualKeyCode.HOME);
Thread.Sleep(Options.ScrollDelay);
captureTimer.Interval = Options.ScrollDelay;
if (Options.ScrollTopBeforeCapture)
{
InputHelpers.SendKeyPress(VirtualKeyCode.HOME);
return;
}
}
Screenshot.CaptureCursor = false;
@ -268,7 +273,6 @@ private void captureTimer_Tick(object sender, EventArgs e)
break;
case ScrollingCaptureScrollMethod.KeyPressPageDown:
InputHelpers.SendKeyPress(VirtualKeyCode.NEXT);
//NativeMethods.SendMessage(selectedWindow.Handle, (int)WindowsMessages.KEYDOWN, (int)VirtualKeyCode.NEXT, 0);
break;
case ScrollingCaptureScrollMethod.MouseWheel:
InputHelpers.SendMouseWheel(-120);

View file

@ -34,7 +34,7 @@ namespace ShareX
public class ScrollingCaptureOptions
{
public ScrollingCaptureScrollMethod ScrollMethod { get; set; } = ScrollingCaptureScrollMethod.Automatic;
public int ScrollDelay { get; set; } = 250;
public int ScrollDelay { get; set; } = 500;
public int MaximumScrollCount { get; set; } = 20;
public bool StartSelectionAutomatically { get; set; } = true;
public bool StartCaptureAutomatically { get; set; } = false;