Exemplo n.º 1
0
        public static string[] GetPhrasesPages(string word, NetworkSetting networkSetting)
        {
            List <string> result = new List <string>();

            ulif.dictlib service = GetService(networkSetting);
            CheckVersion(service);
            bool found;

            bool SearchWordResultSpecified;
            bool rSpecified;
            int  word_idx;

            service.SearchWord(word, gldescdic.PHRAS_DIC,
                               true, true, true, out word_idx, out SearchWordResultSpecified,
                               out found, out rSpecified);

            if (!found)
            {
                return(result.ToArray());
            }

            int word_uid;

            service.ReestrGetID(word_idx, true, gldescdic.PHRAS_DIC, true, true, true, out word_uid, out rSpecified);


            phrasdictphraseology[] phraseologies;
            byte[] first_res = service.phrasPrepare(word_uid, true, out phraseologies);

            List <KeyValuePair <int, sbyte> > used_aid = new List <KeyValuePair <int, sbyte> >();


            for (int i = 0; i < phraseologies.Length; i++)
            {
                KeyValuePair <int, sbyte> kvp = new KeyValuePair <int, sbyte>(phraseologies[i].aid, phraseologies[i].l);
                if (!used_aid.Contains(kvp))
                {
                    result.Add(service.getpharticle2(phraseologies[i].aid, true, phraseologies[i].l, true, "style2_2.css", true, true));
                    used_aid.Add(kvp);
                }
            }

            return(result.ToArray());
        }
Exemplo n.º 2
0
        public static string GetSynonymsPage(string word, NetworkSetting networkSetting)
        {
            ulif.dictlib service = GetService(networkSetting);
            CheckVersion(service);
            bool found;
            bool SearchWordResultSpecified;
            bool rSpecified;
            int  word_idx;

            service.SearchWord(word, gldescdic.SYN_DIC,
                               true, true, true, out word_idx, out SearchWordResultSpecified,
                               out found, out rSpecified);
            if (!found)
            {
                return("");
            }

            int word_uid;

            service.ReestrGetID(word_idx, true, gldescdic.SYN_DIC, true, true, true, out word_uid, out rSpecified);

            return(service.DictPrepare2(word_uid, true, "", "style2_2.css", gldescdic.SYN_DIC, true, true, true));
        }