Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 private void btFKeyScroll_Click(object sender, EventArgs e)
 {
     WaitForUserKeyPress = true;
     actionToAssignKey   = ActionToBePerformed.Scroll;
     lbFKeyFeedback.Text = "please press a key";
 }
Exemplo n.º 4
0
 private void btnSetMicOff_Click(object sender, EventArgs e)
 {
     WaitForUserKeyPress = true;
     actionToAssignKey   = ActionToBePerformed.MicInputOff;
     lbFKeyFeedback.Text = "please press a key";
 }
Exemplo n.º 5
0
 public void SetAction(ActionToBePerformed action)
 {
     SystemFlags.actionButtonSelected = true;
     SystemFlags.actionToBePerformed  = action;
 }