Ejemplo n.º 1
0
        /// <summary>
        /// main overriden method used to perform this script event
        /// </summary>
        public override void DoEvent()
        {
            // update the status label on the main form
            //
            Status = $"Mouse move to colour: {SearchColour} in area: {ColourSearchArea.PrintArea()}.";

            // perform the mouse move method
            //
            MoveMouseToColour(ColourSearchArea, SearchColour);
        }
 /// <summary>
 /// returns a string which is added to the listbox to give information about the event which was added to the event list
 /// </summary>
 /// <returns></returns>
 public override string GetEventListBoxString()
 {
     if (GroupID == -1)
     {
         return("Pause while colour " + SearchColour + " exists in area " + ColourSearchArea.PrintArea() + ".");
     }
     else
     {
         return("[Group " + GroupID + " Repeat x" + NumberOfCycles + "] Pause while colour " + SearchColour + " exists in area " + ColourSearchArea.PrintArea() + ".");
     }
 }
        /// <summary>
        /// main overriden method used to perform this script event
        /// </summary>
        public override void DoEvent()
        {
            while (ColourExistsInArea(ColourSearchArea, SearchColour))
            {
                // update the status label on the main form
                //
                Status = $"Pause while colour: {SearchColour} is found in area: {ColourSearchArea.PrintArea()}, waiting {ReSearchPause} seconds before re-searching.";

                Thread.Sleep(TimeSpan.FromSeconds(ReSearchPause));
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// returns a string which is added to the listbox to give information about the event which was added to the event list
 /// </summary>
 /// <returns></returns>
 public override string GetEventListBoxString()
 {
     if (GroupID == -1)
     {
         return("Move mouse to random pixel of colour " + SearchColour + " in area " + ColourSearchArea.PrintArea() + ".");
     }
     else
     {
         return("[Group " + GroupID + " Repeat x" + NumberOfCycles + "] Move mouse to random pixel of colour " + SearchColour + " in area " + ColourSearchArea.PrintArea() + ".");
     }
 }