Exemplo n.º 1
0
 // ********************************************************************************
 /// <summary>
 /// Event Handler for results on TermInfo query
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 /// <returns></returns>
 /// <created>UPh,31.10.2015</created>
 /// <changed>UPh,31.10.2015</changed>
 // ********************************************************************************
 void TermBaseQuery_TermInfoResult(object sender, TermInfoResultArgs e)
 {
     if (InvokeRequired)
     {
         Invoke(_TermInfoResult, e);
         return;
     }
     else
     {
         OnTermInfoResult(e);
     }
 }
Exemplo n.º 2
0
 // ********************************************************************************
 /// <summary>
 /// Event Handler for results on TermInfo query
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 /// <returns></returns>
 /// <created>UPh,31.10.2015</created>
 /// <changed>UPh,31.10.2015</changed>
 // ********************************************************************************
 void TermBaseQuery_TermInfoResult(object sender, TermInfoResultArgs e)
 {
     if (InvokeRequired)
     {
         Invoke(_TermInfoResult, e);
         return;
     }
     else
     {
         OnTermInfoResult(e);
     }
 }
Exemplo n.º 3
0
        // ********************************************************************************
        /// <summary>
        /// 
        /// </summary>
        /// <param name="e"></param>
        /// <returns></returns>
        /// <created>UPh,31.10.2015</created>
        /// <changed>UPh,31.10.2015</changed>
        // ********************************************************************************
        void OnTermInfoResult(TermInfoResultArgs e)
        {
            string name = _TermbaseSet.GetDisplayName(e.TermBaseID);

            termInfoControl.SetData(name, e.Info);
        }
Exemplo n.º 4
0
        // ********************************************************************************
        /// <summary>
        ///
        /// </summary>
        /// <param name="e"></param>
        /// <returns></returns>
        /// <created>UPh,31.10.2015</created>
        /// <changed>UPh,31.10.2015</changed>
        // ********************************************************************************
        void OnTermInfoResult(TermInfoResultArgs e)
        {
            string name = _TermbaseSet.GetDisplayName(e.TermBaseID);

            termInfoControl.SetData(name, e.Info);
        }
Exemplo n.º 5
0
        // ********************************************************************************
        /// <summary>
        /// 
        /// </summary>
        /// <param name="term"></param>
        /// <param name="infos"></param>
        /// <returns></returns>
        /// <created>UPh,17.11.2015</created>
        /// <changed>UPh,17.11.2015</changed>
        // ********************************************************************************
        internal void HandleTermInfosRequest(string term, List<TermInfoResultArgs> result = null)
        {
            bool bSync = (result != null);

            // Build index if necessary
            if (_Index.LCID != _TermbaseQuery.LCID1)
            {
                TermListItems items = RetrieveTermList(true, false);
                if (!bSync && _shouldStop)
                    return;

                // Index from items
                _Index.BuildIndex(_TermbaseQuery.LCID1, items);
            }

            foreach (IndexItem match in _Index.Matches(term))
            {
                // Get TermInfo
                TermBase termbase = _TermBases.FindTermBase(match.TermBaseID);
                if (termbase == null)
                    continue;

                TermInfo terminfo = null;
                if (!termbase.GetTermInfo(match.TermID, out terminfo, this))
                    return;

                TermInfoResultArgs item = new TermInfoResultArgs();
                item.RequestID = 0;
                item.TermBaseID = match.TermBaseID;
                item.Info = terminfo;

                result.Add(item);
            }
        }