コード例 #1
0
        private void ReadAllItemPages(string item, StoreCollectedItemData storeCollectedItemData)
        {
            ScreenBitmapCreator screenBitmapCreator = new ScreenBitmapCreator();
            List <string>       allItemNumbers      = new List <string>();
            List <string>       allItemPrices       = new List <string>();

            int  cnt = 0;
            bool isNextPage;

            do
            {
                Thread.Sleep(80);

                Bitmap screenBitmap = screenBitmapCreator.CreateScreenBitmap();

                string[] pageNumbers = ReadPageTexts(screenBitmap, new Point(994, 515), NVR);
                string[] pagePrices  = ReadPageTexts(screenBitmap, new Point(1089, 599), PVR);


                for (int i = 0; i < 6; i++)
                {
                    allItemNumbers.Add(pageNumbers[i]);
                    allItemPrices.Add(pagePrices[i]);
                }

                isNextPage = IsNextPageValid(screenBitmap);
                cnt++;


                MS.GoToNextPage();

                screenBitmap.Dispose();
            } while (isNextPage);

            storeCollectedItemData(item, allItemPrices, allItemNumbers);
        }