internal Clicker StartClicking(IntPtr minecraftHandle)
        {
            var delay   = cbHold.Checked ? 0 : (int)numDelay.Value;
            var clicker = new Clicker(_buttonDownCode, _buttonUpCode, minecraftHandle);

            clicker.Start(delay);
            return(clicker);
        }
예제 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            betweenClickMin.Text = Settings.Default.BetweenClickMin.ToString();
            betweenClickMax.Text = Settings.Default.BetweenClickMax.ToString();
            holdDownMin.Text     = Settings.Default.HoldDownMin.ToString();
            holdDownMax.Text     = Settings.Default.HoldDownMax.ToString();
            activationKey.Text   = Settings.Default.ActivationKey.ToString();

            clicker = new Clicker(Settings.Default.BetweenClickMin, Settings.Default.BetweenClickMax, Settings.Default.HoldDownMin,
                                  Settings.Default.HoldDownMax, Settings.Default.ActivationKey);
        }
예제 #3
0
 private void AddToInstanceClickers(Process mcProcess, Clicker clicker)
 {
     if (instanceClickers.ContainsKey(mcProcess))
     {
         instanceClickers[mcProcess].Add(clicker);
     }
     else
     {
         instanceClickers.Add(mcProcess, new List <Clicker> {
             clicker
         });
     }
 }
예제 #4
0
        internal Clicker StartClicking(IntPtr minecraftHandle)
        {
            if (!initialized)
            {
                throw new Exception($"{nameof(ButtonInputs)}.{cbButtonEnable.Text} is not initialized!");
            }
            int delay = cbHold.Checked ? 0 : (int)numDelay.Value;

            var clicker = new Clicker(buttonDownCode, buttonUpCode, minecraftHandle);

            clicker.Start(delay);

            return(clicker);
        }
예제 #5
0
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            clicker   = new Clicker();
            viewModel = new ViewModel(clicker);

            Frame rootFrame = Window.Current.Content as Frame;

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: Load state from previously suspended application
                }

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            if (e.PrelaunchActivated == false)
            {
                if (rootFrame.Content == null)
                {
                    // When the navigation stack isn't restored navigate to the first page,
                    // configuring the new page by passing required information as a navigation
                    // parameter
                    rootFrame.Navigate(typeof(MainPage), e.Arguments);
                }
                // Ensure the current window is active
                Window.Current.Activate();
            }

            if (rootFrame.CurrentSourcePageType == typeof(MainPage))
            {
                MainPage page = (MainPage)rootFrame.Content;
                page.ViewModel = viewModel;
            }
        }
예제 #6
0
 public ViewModel(Clicker clicker)
 {
     this.clicker = clicker;
 }
예제 #7
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     Clicker.Dispose();
     Application.Exit();
 }
예제 #8
0
 public AutoClicker()
 {
     InitializeComponent();
     clicker = new Clicker();
 }
예제 #9
0
 private void frmMain_Load(object sender, EventArgs e)
 {
     setWindowTitle();
       clicker = new Clicker();
 }