Esempio n. 1
0
        private Bitmap ChupAnhDiemSo(string deviceID)
        {
            KAutoHelper.ADBHelper.Tap(deviceID, 85, 780);
            Common.Delay(1);
            Bitmap BMP = KAutoHelper.ADBHelper.ScreenShoot(deviceID);

            QuayLai1Lan(deviceID);
            HanhDong.KeoXuongFind(deviceID);
            clickNew(deviceID);
            return(BMP);
        }
Esempio n. 2
0
        //return true là đã tìm thấy và click được
        private bool findNewAndClick(string deviceID, ref int solanlap, ref int demsolanchay, Process processName)
        {
            int i = 0;

            while (i < 10)
            {
                if (clickNew(deviceID))
                {
                    GhiLog.Write(deviceID, $"Tìm thấy bài báo mới tiếp theo ---- dọc bài báo mới");
                    solanlap = 0;
                    demsolanchay++;
                    return(true);
                }
                HanhDong.KeoXuongFind(deviceID);
                HanhDong.KeoXuongFind(deviceID);
                HanhDong.KeoXuongFind(deviceID);
                HanhDong.KeoXuongFind(deviceID);
                HanhDong.KeoXuongFind(deviceID);
                HanhDong.KeoXuongFind(deviceID);
                i++;
            }
            while (i < 12)
            {
                if (clickNew(deviceID))
                {
                    GhiLog.Write(deviceID, $"Tìm thấy bài báo mới tiếp theo ---- dọc bài báo mới");
                    solanlap = 0;
                    demsolanchay++;
                    return(true);
                }
                HanhDong.KeoLenFind(deviceID);
                HanhDong.KeoLenFind(deviceID);
                HanhDong.KeoLenFind(deviceID);
                i++;
            }
            // tắt app gonews và click gonews chạy lại
            GhiLog.Write(deviceID, $"Không tìn thấy bài báo mới tắt gải lập đi chạy lại ------ ");
            GhiLog.GhiFileList(deviceID, pathListAccount, "notfinish", true);
            TatGiaLapvaChayLai(deviceID, processName);
            return(false);
        }