private void CompletePath() { Signature sig = mViewInfo.CurrentSignature; InputAction inputAction = Arrangement.GetAction(sig); switch (inputAction.Type) { /* * case InputAction.ActionType.Lock: * LockMode = !LockMode; * break; * case InputAction.ActionType.ToggleArrangementMode: * // Cycle through ArrangementModes * Mode = Mode == ArrangementMode.LowerCase ? ArrangementMode.UpperCase : * Mode == ArrangementMode.UpperCase ? ArrangementMode.NumbersAndSymbols : * ArrangementMode.LowerCase; * break;*/ case InputAction.ActionType.Upper: Mode = ArrangementMode.UpperCase; break; case InputAction.ActionType.Lower: Mode = ArrangementMode.LowerCase; break; default: // For everything else, just raise an event with the selected action ActionChosenEventArgs args = new ActionChosenEventArgs(); args.Action = inputAction; OnActionChosen(args); break; } }
protected virtual void OnActionChosen(ActionChosenEventArgs e) { if (e.Action.Type == InputAction.ActionType.TypeCharacter) { mPreviousCharacter = e.Action.Character; } EventHandler <ActionChosenEventArgs> handler = ActionChosen; if (handler != null) { handler(this, e); } }