Untitled
unknown
csharp
10 months ago
1.8 kB
5
Indexable
private ContinuousRegionMatcher matcher;
private void InitializeMatcher()
{
matcher = new ContinuousRegionMatcher();
// Bölgeleri tanımla
matcher.AddRegion(
regionId: 1,
new Rectangle(870, 920, 262, 102),
@"C:\Resources",
0.85
);
matcher.AddRegion(
regionId: 2,
new Rectangle(120, 830, 63, 31),
@"C:\Region2",
0.86
); //hata mesajı
matcher.AddRegion(
regionId: 3,
new Rectangle(526, 125, 219, 63),
@"C:\Region6",
0.85
); //protection kontrolü
matcher.AddRegion(
regionId: 4,
new Rectangle(475, 58, 50, 30),
@"C:\\Region4",
0.9
); //dps kontrolü
// Eşleştirmeyi başlat
matcher.Start();
checkTimer.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
if (ContinuousRegionMatcher.Region1Result)
{
// Örnek: Klavye tuşuna bas
// Console.WriteLine("Bölge 1 te eşleşme bulundu: " + DateTime.Now);
}
// Bölge 2 kontrolü
if (ContinuousRegionMatcher.Region2Result)
{
Console.WriteLine("Bölge 2 te eşleşme bulundu: " + DateTime.Now);
}
// Bölge 3 kontrolü
if (ContinuousRegionMatcher.Region3Result)
{
Console.WriteLine("Bölge 3 te eşleşme bulundu: " + DateTime.Now);
}
// Bölge 4 kontrolü
if (ContinuousRegionMatcher.Region4Result)
{
// Örnek: Log yaz
// Console.WriteLine("Bölge 4'te eşleşme bulundu: " + DateTime.Now);
}
}Editor is loading...
Leave a Comment