Esempio n. 1
0
 public void Loop1()
 {
     //    MessageBox.Show(Index.ToString() + ProcessCount.ToString());
     lblWord.Text = WordList[Index].KeyWord;
     if (WordList[Index].Translations.Count == 0)
     {
         WordList[Index].LearnTimes = 1;
         Word word = Clawler.DownLoad(WordList[Index].KeyWord);
         WordList[Index].Annotation   = word.Annotation;
         WordList[Index].Examples     = word.Examples;
         WordList[Index].Collocations = word.Collocations;
         WordList[Index].Translations = word.Translations;
         WordList[Index].Phonetics    = word.Phonetics;
     }
     WordList[Index].Translations.ForEach(a => ShowStr = ShowStr + a + " \n");
     lblEng.Text            = WordList[Index].Phonetics.EngPhonetic;
     lblAmeri.Text          = WordList[Index].Phonetics.AmeriPhonetic;
     this.richTextBox1.Text = ShowStr;
     this.richTextBox1.Refresh();
     if (Index < WordList.Count)
     {
         this.axWindowsMediaPlayer1.URL = WordList[Index].KeyWord + "_EngLish.mp3";
         this.axWindowsMediaPlayer1.Ctlcontrols.play();
     }
 }
Esempio n. 2
0
 public ShowWordForm(MainWindow mainWindow, Word searchWord)
 {
     InitializeComponent();
     this.searchWord = searchWord;
     //searchWord是单词
     MainWin = mainWindow;
     if (searchWord.Translations.Count == 0)
     {
         this.searchWord = Clawler.DownLoad(searchWord.KeyWord);
     }
     ShowInfo();
     if (MainWin.User != null)
     {
         RecordService.ShowUserWords(MainWin.User, 3).ForEach(w =>
         {
             if (w.KeyWord == searchWord.KeyWord)
             {
                 button5.Text = "移出单词本";
             }
         });
     }
 }
Esempio n. 3
0
        //显示左边单词框中的信息
        public void showTheInfo()
        {
            string show = studyWord + ":\n ";

            searchWord = Clawler.DownLoad(studyWord);
            searchWord.Translations.ForEach(x => show = show + x + "\n");
            this.richTextBox2.Text = show;
            lblKeyword.Text        = studyWord;
            lblEng.Text            = searchWord.Phonetics.EngPhonetic;
            lblAmeri.Text          = searchWord.Phonetics.AmeriPhonetic;
            try
            {
                this.pictureBox1.Load(studyWord + ".png");
            }
            catch
            {
                this.pictureBox1.Load("./../../Resources/empty.jpg");
            }
            finally
            {
                this.pictureBox1.Refresh();
            }
        }