ARKBreedingStats.ArkOCR.isDinoInventoryVisible C# (CSharp) Method

isDinoInventoryVisible() public method

public isDinoInventoryVisible ( ) : bool
return bool
        public bool isDinoInventoryVisible()
        {
            if (ARKProcess == null)
                return false;

            float[] finalValues = new float[1] { 0 };

            Bitmap screenshotbmp = null;// = (Bitmap)Bitmap.FromFile(@"D:\ScreenshotsArk\Clipboard12.png");
            Bitmap testbmp;

            if (Win32Stuff.GetForegroundWindow() != ARKProcess.MainWindowHandle)
                return false;

            screenshotbmp = Win32Stuff.GetSreenshotOfProcess("ShooterGame");

            if (screenshotbmp == null)
                return false;
            if (!calibrate(screenshotbmp))
                return false;

            string statName = "NameAndLevel";
            testbmp = SubImage(screenshotbmp, statPositions[statName].X, statPositions[statName].Y, 500, 30);
            string statOCR = readImage(currentResolution, testbmp, true, false);

            Regex r = new Regex(@"(.*)-?Lv[liI](\d*)Eq");
            MatchCollection mc = r.Matches(statOCR);

            if (mc.Count != 0)
                return true;

            return false;
        }