// ******************************************************************************** /// <summary> /// /// </summary> /// <param name="resource"></param> /// <param name="checker"></param> /// <returns></returns> /// <created>UPh,29.11.2015</created> /// <changed>UPh,29.11.2015</changed> // ******************************************************************************** public override uint BeginCheckTokens(Pass.AddIn.Core.CPAIResource resource, Pass.AddIn.Core.CPAITokenCheck checker) { if (_AddInComponent == null) { _AddInComponent = AddInInstance as EasyTermAddInComponent; if (_AddInComponent == null) { return(0); } _TermBaseSet = _AddInComponent._TermBaseSet; if (_TermBaseSet == null) { return(0); } _Query = _TermBaseSet.Query; } bCheckTermUsage = false; bCheckProhibitedTerms = false; if (_Query == null) { return(0); } var stringlist = checker.GetStringList(); if (stringlist == null) { return(0); } var listinfo = stringlist.GetListInfo(); if (listinfo == null) { return(0); } checker.GetOption(PslConstant.TCO_CUSTOM_0, ref bCheckTermUsage); checker.GetOption(PslConstant.TCO_CUSTOM_1, ref bCheckProhibitedTerms); if (!bCheckProhibitedTerms && !bCheckTermUsage) { return(0); } _Query.SetLanguagePair(listinfo.Lang1, listinfo.Lang2); return(0); }
// ******************************************************************************** /// <summary> /// /// </summary> /// <returns></returns> /// <created>UPh,07.11.2015</created> /// <changed>UPh,07.11.2015</changed> // ******************************************************************************** void InitializeTermbase() { _AddInComponent = AddInInstance as EasyTermAddInComponent; if (_AddInComponent == null) { return; } _TermBaseSet = _AddInComponent._TermBaseSet; _Query = _TermBaseSet.Query; _Query.TerminologyResult += Query_TerminologyResult; }
// ******************************************************************************** /// <summary> /// /// </summary> /// <param name="resource"></param> /// <param name="checker"></param> /// <returns></returns> /// <created>UPh,29.11.2015</created> /// <changed>UPh,29.11.2015</changed> // ******************************************************************************** public override uint BeginCheckTokens(Pass.AddIn.Core.CPAIResource resource, Pass.AddIn.Core.CPAITokenCheck checker) { if (_AddInComponent == null) { _AddInComponent = AddInInstance as EasyTermAddInComponent; if (_AddInComponent == null) return 0; _TermBaseSet = _AddInComponent._TermBaseSet; if (_TermBaseSet == null) return 0; _Query = _TermBaseSet.Query; } bCheckTermUsage = false; bCheckProhibitedTerms = false; if (_Query == null) return 0; var stringlist = checker.GetStringList(); if (stringlist == null) return 0; var listinfo = stringlist.GetListInfo(); if (listinfo == null) return 0; checker.GetOption(PslConstant.TCO_CUSTOM_0, ref bCheckTermUsage); checker.GetOption(PslConstant.TCO_CUSTOM_1, ref bCheckProhibitedTerms); if (!bCheckProhibitedTerms && !bCheckTermUsage) return 0; _Query.SetLanguagePair(listinfo.Lang1, listinfo.Lang2); return 0; }
// ******************************************************************************** /// <summary> /// /// </summary> /// <returns></returns> /// <created>UPh,07.11.2015</created> /// <changed>UPh,07.11.2015</changed> // ******************************************************************************** void InitializeTermbase() { _AddInComponent = AddInInstance as EasyTermAddInComponent; if (_AddInComponent == null) return; _TermBaseSet = _AddInComponent._TermBaseSet; _Query = _TermBaseSet.Query; _Query.TerminologyResult += Query_TerminologyResult; }