public void CheckReadyFactoryItemAndCollect(int n) { int x = 358 + 142 * n; int y = 675; int status = touch.CheckFactorySlotStatus(x, y); if (status == 1) //ready { touch.ClickAt(new Point(x, y)); //collect Bot.BotApplication.Wait(250); if (n % 5 == 0) { touch.Swipe(Constants.GetPoint(Bot.Location.ButtonLeftInner1), Constants.GetPoint(Bot.Location.CentreMap)); // procedure } if (n % 5 == 1) { touch.Swipe(Constants.GetPoint(Bot.Location.ButtonRightInner1), Constants.GetPoint(Bot.Location.CentreMap)); // procedure } if (n % 5 == 2) { touch.Swipe(Constants.GetPoint(Bot.Location.ButtonLeftInner3), Constants.GetPoint(Bot.Location.CentreMap)); // procedure } if (n % 5 == 3) { touch.Swipe(Constants.GetPoint(Bot.Location.ButtonRightInner2), Constants.GetPoint(Bot.Location.CentreMap)); // procedure } else { touch.Swipe(Constants.GetPoint(Bot.Location.ButtonLeftInner2), Constants.GetPoint(Bot.Location.CentreMap)); // procedure } } if (status == 0) //empty { touch.Swipe(Constants.GetPoint(Bot.Location.ButtonLeftInner3), Constants.GetPoint(Bot.Location.CentreMap)); // procedure } if (status == -1) //processing { // donothing // touch.Swipe(Constants.GetPoint(Bot.Location.ButtonLeftInner2), Constants.GetPoint(Bot.Location.CentreMap)); // procedure } }