コード例 #1
0
        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
ファイル: AutoClicker.cs プロジェクト: MrUsefull/AutoClicker
 public AutoClicker()
 {
     InitializeComponent();
     clicker = new Clicker();
 }
コード例 #9
0
ファイル: frmMain.cs プロジェクト: nikaido/AutoClicker
 private void frmMain_Load(object sender, EventArgs e)
 {
     setWindowTitle();
       clicker = new Clicker();
 }