private bool SeekXminSwitch(bool AxisDirection, int byX, int byY, int TriesPeriod) { var success = true; var maxTries = GlobalProperties.numStepsPerTurns; while ((USB.MinXswitch == AxisDirection) && USB.IsOpen && (maxTries > 0)) { USB.MoveBy(byX, byY); maxTries--; Thread.Sleep(TriesPeriod); USB.Transfer(); success = maxTries >= 0; } return(success && (USB.MinXswitch != AxisDirection)); }
private void PlusXbutton_Click(object sender, EventArgs e) { USB.MoveBy(AxisOffsetCount, 0); }