From 71ab81e11af26ee3c09edd408e1908ca6b1541ae Mon Sep 17 00:00:00 2001 From: "Valeriano A.R" Date: Sat, 2 Nov 2019 00:55:10 +0100 Subject: [PATCH] FrmScreenAutomation: Adjust timer to 10FPS. --- VAR.ScreenAutomation/FrmScreenAutomation.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/VAR.ScreenAutomation/FrmScreenAutomation.cs b/VAR.ScreenAutomation/FrmScreenAutomation.cs index 6156ae8..400b1ab 100644 --- a/VAR.ScreenAutomation/FrmScreenAutomation.cs +++ b/VAR.ScreenAutomation/FrmScreenAutomation.cs @@ -40,7 +40,7 @@ namespace VAR.ScreenAutomation if (components == null) { components = new Container(); } timTicker = new Timer(components) { - Interval = 16, + Interval = 100, }; timTicker.Tick += TimTicker_Tick; timTicker.Enabled = true; @@ -51,6 +51,7 @@ namespace VAR.ScreenAutomation private void TimTicker_Tick(object sender, EventArgs e) { + timTicker.Enabled = false; timTicker.Stop(); bmpScreen = Screenshoter.CaptureControl(picCapturer, bmpScreen); @@ -69,6 +70,7 @@ namespace VAR.ScreenAutomation } picPreview.ImageShow = bmpScreen; + timTicker.Enabled = true; timTicker.Start(); }