public bool isDinoInventoryVisible()
{
if (ScreenCaptureProcess == null)
{
Process[] p = Process.GetProcessesByName(screenCaptureApplicationName);
if (p.Length > 0)
{
ScreenCaptureProcess = p[0];
}
else
{
return(false);
}
}
float[] finalValues = new float[1] {
0
};
Bitmap screenshotbmp = null;// = (Bitmap)Bitmap.FromFile(@"D:\ScreenshotsArk\Clipboard12.png");
if (Win32Stuff.GetForegroundWindow() != ScreenCaptureProcess.MainWindowHandle)
{
return(false);
}
screenshotbmp = Win32Stuff.GetSreenshotOfProcess(screenCaptureApplicationName, waitBeforeScreenCapture);
if (screenshotbmp == null)
{
return(false);
}
if (!setResolution(screenshotbmp))
{
return(false);
}
string statName = "Level";
Rectangle rec = ocrConfig.labelRectangles[ocrConfig.labelNameIndices[statName]];
Bitmap testbmp = SubImage(screenshotbmp, rec.X, rec.Y, rec.Width, rec.Height);
string statOCR = readImage(testbmp, true, true);
Regex r = new Regex(@":\d+$");
MatchCollection mc = r.Matches(statOCR);
if (mc.Count != 0)
{
return(true);
}
return(false);
}