Esempio n. 1
0
        private static void StartAutoClicker(AutoClickerWorker clickerWorker, string processName, Coordinates coordinates, int interval)
        {
            var autoClicker = new AutoClicker
            {
                Active      = true,
                Coordinates = coordinates,
                Interval    = interval,
                ProcessName = processName,
            };

            try
            {
                autoClicker.Init();

                clickerWorker.AutoClicker = autoClicker;

                ConsoleHelper.WriteMessage("Autoclicker started!");
            }
            catch (Exception exception)
            {
                clickerWorker.Picnic();

                ConsoleHelper.WriteError("Something went wrong when trying to start the autoclicker!", exception);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Closes the started autoclicker
        /// </summary>
        /// <param name="clickerWorker"></param>
        private static void Picnic(AutoClickerWorker clickerWorker)
        {
            clickerWorker.Picnic();

            ConsoleHelper.WriteMessage("Autoclicker stopped!");
        }