fix error in last commit

This commit is contained in:
Jaex 2014-06-22 05:11:58 +03:00
parent c3e49fbc10
commit 75357db19b
2 changed files with 3 additions and 3 deletions

View file

@ -160,8 +160,7 @@ public void StartRecording(TaskSettings TaskSettings)
string path = "";
regionForm = ScreenRegionForm.Start(captureRectangle);
regionForm.StopRequested += () => StopRecording();
regionForm = ScreenRegionForm.Start(captureRectangle, StopRecording);
TaskEx.Run(() =>
{

View file

@ -65,11 +65,12 @@ protected void OnStopRequested()
}
}
public static ScreenRegionForm Start(Rectangle captureRectangle)
public static ScreenRegionForm Start(Rectangle captureRectangle, Action stopRequested)
{
if (captureRectangle != CaptureHelpers.GetScreenBounds())
{
ScreenRegionForm regionForm = new ScreenRegionForm(captureRectangle);
regionForm.StopRequested += stopRequested;
regionForm.Show();
return regionForm;
}