Exemplo n.º 1
0
        private void M_compositionHandler_eventComposition(refCompositionEventArgs comp)
        {
            label_CompCaret.Text = string.Format("Comp CaretPos: {0} ", comp.m_lCaretPos);

            storedStr += comp.m_strCommit;
            compStr    = comp.m_strComposition;

            label_DisplayStr.Text = storedStr + compStr;
        }
Exemplo n.º 2
0
        private static void IMEControl_CompositionEvent(refCompositionEventArgs comp)
        {
            switch (comp.m_state)
            {
            case refCompositionState.StartComposition:
            case refCompositionState.EndComposition:
            case refCompositionState.Composing:
                KeyboardInput_.comp.caret = comp.m_lCaretPos;
                KeyboardInput_.comp.text  = comp.m_strComposition;
                break;

            case refCompositionState.Commit:
                foreach (char ch in comp.m_strCommit)
                {
                    CharEntered?.Invoke(null, new CharacterEventArgs(ch, 0));
                }
                break;

            default:
                break;
            }
        }