Ejemplo n.º 1
0
        private void buttonCalibrate_Click(object sender, EventArgs e)
        {
            Bitmap bmp = ScreenCapturer.CaptureHealthArea();

            if (bmp != null)
            {
                bmp.Save("test.bmp", ImageFormat.Bmp);
            }
        }
Ejemplo n.º 2
0
        private static void timerTask(Object source, ElapsedEventArgs e)
        {
            int    tick   = Environment.TickCount;
            Bitmap bitmap = ScreenCapturer.CaptureHealthArea();

            if (bitmap != null)
            {
                int hp = NumberParser.ParseNumber(bitmap);
            }
            Console.WriteLine("Took " + (Environment.TickCount - tick) + "ms.");
        }