private async void CoordinatesAcceptMatchButton()
        {
            bool championSearchbox = false;
            bool acceptButton      = false;

            while (!championSearchbox)
            {
                TakeFullDesktopScreenShot();
                if (!championSearchbox)
                {
                    championSearchbox = await ImageRecognition.AutoFindChampionSearchTextboxImageRecognition();
                }

                TakeFullDesktopScreenShot();
                if (!acceptButton)
                {
                    acceptButton = await ImageRecognition.AutoAcceptImageRecognition();
                }
                if (acceptButton)
                {
                    Actions.ClickAcceptButton();
                    SetLiveStatusText("Accepted Match", Color.Green);
                }
            }
        }
Пример #2
0
        private async void AcceptMatchButton()
        {
            bool championSearchbox = false;
            bool accepted          = false;

            while (!championSearchbox)
            {
                TakeFullDesktopScreenShot();
                if (!championSearchbox)
                {
                    championSearchbox = await ImageRecognition.AutoFindChampionSearchTextboxImageRecognition();
                }

                TakeFullDesktopScreenShot();
                if (!accepted)
                {
                    accepted = await ImageRecognition.AutoAcceptImageRecognition();
                }
                if (accepted)
                {
                    int[] coordinates = HelpFile.GetXYCoordinatesRegex(Options.AutoAcceptButtonCoordinates);
                    MouseEvent.MoveMouseXYToAndClick(coordinates[0], coordinates[1]);
                    HelpFile.Log("Auto Accept: Clicked Accept Button X:" + coordinates[0] + ", Y:" + coordinates[1] + ".");

                    SetLiveStatusText("Accepted Match", Color.Green);
                }
            }
        }