Esempio n. 1
0
        public HRESULT ActivateEx(ITfThreadMgr pThreadMgr, uint tfClientId, TF_TMAE dwFlags)
        {
            _pThreadMgr      = pThreadMgr;
            _tfClientId      = tfClientId;
            _dwActivateFlags = dwFlags;

            try
            {
                if (!_InitThreadMgrEventSink())
                {
                    throw new Exception();
                }

                if (pThreadMgr.GetFocus(out ITfDocumentMgr pDocMgrFocus).Succeeded&& pDocMgrFocus != null)
                {
                    _InitTextEditSink(pDocMgrFocus);
                }

                if (!_InitKeyEventSink())
                {
                    throw new Exception();
                }

                if (!_InitActiveLanguageProfileNotifySink())
                {
                    throw new Exception();
                }

                if (!_InitThreadFocusSink())
                {
                    throw new Exception();
                }

                if (!_InitDisplayAttributeGuidAtom())
                {
                    throw new Exception();
                }

                if (!_InitFunctionProviderSink())
                {
                    throw new Exception();
                }

                if (!_AddTextProcessorEngine())
                {
                    throw new Exception();
                }

                return(new HRESULT {
                    Code = 0
                });
            }
            catch (Exception err)
            {
                Deactivate();
                throw err;
            }
        }
Esempio n. 2
0
        public HRESULT ActivateEx(ITfThreadMgr ptim, uint tid, TF_TMAE dwFlags)
        {
            _candidateManager   = new YimeCandidateManager();
            _compositionManager = new YimeCompositionManager();
            _threadmgr          = ptim;
            _clientid           = tid;
            _flag = dwFlags;
            InitThreadMgrEventSink();
            InitThreadFocusSink();
            InitKeyEventSink(_compositionManager, _clientid);

            return(new HRESULT()
            {
                Code = 0
            });
        }
Esempio n. 3
0
 HRESULT ITfTextInputProcessorEx.ActivateEx(ITfThreadMgr ptim, uint tid, TF_TMAE dwFlags)
 {
     throw new NotImplementedException();
 }