void updateLabel(String newKey, ActionToBePerformed functiontoAssign) { switch (functiontoAssign) { case ActionToBePerformed.LeftClick: lbLeft.Text = newKey; break; case ActionToBePerformed.RightClick: lbRight.Text = newKey; break; case ActionToBePerformed.Scroll: lbScroll.Text = newKey; break; case ActionToBePerformed.DoubleClick: lbDouble.Text = newKey; break; case ActionToBePerformed.MicInput: lbMicOn.Text = newKey; break; case ActionToBePerformed.MicInputOff: lbMicOff.Text = newKey; break; } }
public bool AttemptToggle(ActionToBePerformed action) { bool isScroll = (SystemFlags.currentState == SystemState.ApplyAction || SystemFlags.currentState == SystemState.ScrollWait) && (action == ActionToBePerformed.Scroll); if (SystemFlags.currentState == SystemState.ActionButtonSelected || SystemFlags.currentState == SystemState.ZoomWait || isScroll) { if (SystemFlags.actionToBePerformed == action) { resetButtonsColor(); stateManager.EnterWaitState(); //special scrolling case if (isScroll) { SystemFlags.scrolling = false; stateManager.scrollWorker.stopScroll(); } return(true); } } return(false); }
private void btFKeyScroll_Click(object sender, EventArgs e) { WaitForUserKeyPress = true; actionToAssignKey = ActionToBePerformed.Scroll; lbFKeyFeedback.Text = "please press a key"; }
private void btnSetMicOff_Click(object sender, EventArgs e) { WaitForUserKeyPress = true; actionToAssignKey = ActionToBePerformed.MicInputOff; lbFKeyFeedback.Text = "please press a key"; }
public void SetAction(ActionToBePerformed action) { SystemFlags.actionButtonSelected = true; SystemFlags.actionToBePerformed = action; }