Exemple #1
0
 public void format(myKanji word)
 {
     word.radical.zRadical = radical[0];
     word.radical.descr    = new myDefinition {
         text = meaning, bFormated = true
     };
 }
Exemple #2
0
        public List <myKanji> Search(string w)
        {
            List <myKanji> kanjis = new List <myKanji>();

            foreach (char key in w)
            {
                if (myDictBase.m_kanjis.ContainsKey(key))
                {
                    var     arr   = myDictBase.m_kanjis[key].Distinct();
                    myKanji kanji = new myKanji()
                    {
                        val = key
                    };
                    foreach (var rec in arr)
                    {
                        rec.format(kanji);
                    }
                    if (kanji.radical.zRadical == '\0')
                    {
                        IRecord rd = hvbt.Search(kanji.radical.iRadical);
                        rd.format(kanji);
                    }
                    kanjis.Add(kanji);
                }
            }
            return(kanjis);
        }
Exemple #3
0
            public void format(myKanji kanji)
            {
                myWord word = kanji.relatedWords.Find((w) => { return(w.term == this.kanji); });

                if (word == null)
                {
                    word = new myWord {
                        term = this.kanji, hn = hn,
                    };
                    kanji.relatedWords.Add(word);
                }
                word.definitions.Add(new myDefinition {
                    text = meaning, bFormated = true
                });
            }
Exemple #4
0
            public void format(myKanji word)
            {
                word.hn = hn;
                word.radical.iRadical = radical;
                word.extraStrokes     = extraStrokes;
                word.totalStrokes     = totalStrokes;
                word.simple           = simple.Length > 0?simple[0]:'\0';
                var arr = define.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);

                foreach (var def in arr)
                {
                    word.definitions.Add(new myDefinition {
                        text = def
                    });
                }
            }
Exemple #5
0
            public void format(myKanji kanji)
            {
                myWord word = kanji.relatedWords.Find((w) => { return(w.term == this.word); });

                if (word == null)
                {
                    word = new myWord {
                        term = this.word, hn = this.hn,
                    };
                    kanji.relatedWords.Add(word);
                }
                foreach (var d in def.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries))
                {
                    word.definitions.Add(new myDefinition {
                        text = d
                    });
                }
            }