コード例 #1
0
 private void RefreshWords()
 {
     if (keyword == null)
     {
         if (dictTime >= DictService.updTimeAll)
         {
             return;
         }
         dictTime = DictService.updTimeAll;
         wgroups.Set(DictService.Words);
     }
     else
     {
         if (dictTime >= DictService.updTimeDetail)
         {
             return;
         }
         dictTime = DictService.updTimeDetail;
         var ms    = DictService.GetMeansByWord(keyword);
         var datas = (ms?.Cast <WordElement>()) ?? DictService.GetWordsByMean(keyword).Cast <WordElement>();
         words.ItemsSource = WordGroupHelper.MakeData(datas.Select(x => x.GetStr()));
         wcnt.Text         = $"生疏程度 :  {DictService.GetWordStat(keyword).wrong}";
     }
 }