FrmScreenAutomation: Adjust timer to 10FPS.

This commit is contained in:
2019-11-02 00:55:10 +01:00
parent 1a46040210
commit 71ab81e11a

View File

@@ -40,7 +40,7 @@ namespace VAR.ScreenAutomation
if (components == null) { components = new Container(); } if (components == null) { components = new Container(); }
timTicker = new Timer(components) timTicker = new Timer(components)
{ {
Interval = 16, Interval = 100,
}; };
timTicker.Tick += TimTicker_Tick; timTicker.Tick += TimTicker_Tick;
timTicker.Enabled = true; timTicker.Enabled = true;
@@ -51,6 +51,7 @@ namespace VAR.ScreenAutomation
private void TimTicker_Tick(object sender, EventArgs e) private void TimTicker_Tick(object sender, EventArgs e)
{ {
timTicker.Enabled = false;
timTicker.Stop(); timTicker.Stop();
bmpScreen = Screenshoter.CaptureControl(picCapturer, bmpScreen); bmpScreen = Screenshoter.CaptureControl(picCapturer, bmpScreen);
@@ -69,6 +70,7 @@ namespace VAR.ScreenAutomation
} }
picPreview.ImageShow = bmpScreen; picPreview.ImageShow = bmpScreen;
timTicker.Enabled = true;
timTicker.Start(); timTicker.Start();
} }