public void setCurrentMode(ProgramMode mode) { lock (currentLock) { this.currentMode = mode; } this.currentIndex = 0; }
public void setBackgroundMode(ProgramMode mode) { lock (backgroundLock) { this.backgroundMode = mode; } this.currentIndex = 0; }
public void clearActiveMode() { this.currentIndex = 0; if (this.currentMode == null) { return; } this.currentMode = null; }
private void click(Point p, Boolean setClickAndDrag) { Point pt = form.PointToClient(p); // Check if the clicking point is inside the form bool inside = (pt.X >= 0 && pt.Y >= 0 && pt.X <= (form.Width) && pt.Y <= (form.Height)); //Should not click inside the mainForm, unless we are in the process of resizing it if (inside && (Form.ActiveForm == this.form) && (this.status.currentIndex == 0) && !setClickAndDrag) { return; } // Make sure the fetcher stays on top, since other applications could set themselves TopMost this.form.fetcher.TopMost = true; if (this.status.getActiveMode().isContext) { if (setClickAndDrag) { if (this.status.getCurrentMode() != ProgramMode.clickAndDrag) { this.status.setCurrentMode(ProgramMode.clickAndDrag); } } uiAutomationCheck(p); } // Get activeMode and perform the current actions for this time step ProgramMode activeMode = this.status.getActiveMode(); Debug.Print("Performing Click Action: " + activeMode.mode[this.status.currentIndex].ToString()); clickActions(activeMode.mode[this.status.currentIndex], p); Debug.Print("f"); // Increase the timestep and clear if done with current ProgramMode this.status.currentIndex++; if (this.status.currentIndex > activeMode.mode.Length - 1) { this.status.clearActiveMode(); this.form.setClickDefault(); } }
public void clearActiveMode() { this.currentIndex = 0; this.currentMode = null; }
public ClickStatus() { this.backgroundMode = ProgramMode.contextClick; this.currentMode = ProgramMode.contextClick; this.currentMode = null; }