Ejemplo n.º 1
0
        // ********************************************************************************
        /// <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);
        }
Ejemplo n.º 2
0
 // ********************************************************************************
 /// <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 EndCheckTokens(Pass.AddIn.Core.CPAIResource resource, Pass.AddIn.Core.CPAITokenCheck checker)
 {
     return(0);
 }