// // GUI events // #region GUI events // Start button private void StartButton_Click(object sender, EventArgs e) { // Disable GUI on start DisableGuiOnStart(); // Minimize to tray bar if requested if (MinimizeToTrayBarBox.Checked) { MinimizeWindowToTrayBar(); } // Set status SetStatus(STATUS_RUNNING_STR); // Initialize auto mouse mover class mAutoMouseMover.Initialize((int)MovingPixelBox.Value); // Set timer interval and start it CursorTimer.Interval = ((int)MovingPeriodBox.Value) * 1000; CursorTimer.Start(); }
// Close button in tray bar context menu private void TrayBarMenuClose_Click(object sender, EventArgs e) { CursorTimer.Stop(); Close(); }
// Stop button private void StopButton_Click(object sender, EventArgs e) { SetStatus(STATUS_IDLE_STR); EnableGuiOnStop(); CursorTimer.Stop(); }