mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-07-15 13:08:09 +00:00
Update ScreenMatch.cs
This commit is contained in:
parent
e1d4df74b9
commit
feb85625c5
|
@ -465,16 +465,33 @@ public class ScreenMatch
|
||||||
// If the index value is negative, retrieve and use an outdated image from the queue
|
// If the index value is negative, retrieve and use an outdated image from the queue
|
||||||
if (nextTemplateInfo.Index < 0)
|
if (nextTemplateInfo.Index < 0)
|
||||||
{
|
{
|
||||||
// Dequeue the oldest image from the sampleOutdated queue
|
parent.Log($"Review and find the last data of {nextTemplateInfo.FileName}...");
|
||||||
|
|
||||||
Bitmap outdatedImage = null;
|
Bitmap outdatedImage = null;
|
||||||
while (outdatedSamples.Count > 0)
|
|
||||||
|
// Dequeue the oldest image from the sampleOutdated queue
|
||||||
|
try
|
||||||
{
|
{
|
||||||
outdatedImage = outdatedSamples.Dequeue();
|
while (outdatedSamples.Count > 0)
|
||||||
if (outdatedImage.Tag != null && ((SampleInfo)outdatedImage.Tag).FileName == nextTemplateInfo.FileName)
|
|
||||||
{
|
{
|
||||||
break;
|
outdatedImage = outdatedSamples.Dequeue();
|
||||||
|
|
||||||
|
if (outdatedImage.Tag != null)
|
||||||
|
{
|
||||||
|
parent.Log($"Reviewing... {((SampleInfo)outdatedImage.Tag).FileName}");
|
||||||
|
|
||||||
|
if (((SampleInfo)outdatedImage.Tag).FileName == nextTemplateInfo.FileName)
|
||||||
|
{
|
||||||
|
parent.Log($"Found the last data of {nextTemplateInfo.FileName}");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
parent.Log($"Error while reviewing the data: {ex.Message}");
|
||||||
|
}
|
||||||
|
|
||||||
// Find the matching positions of the outdated image in the main image
|
// Find the matching positions of the outdated image in the main image
|
||||||
if (outdatedImage != null) {
|
if (outdatedImage != null) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user