private void PronunToolStripMenuItem_Click(object sender, EventArgs e)
 {
     foreach (DataGridViewRow row in dgvUnknownWords.SelectedRows)
     {
         var word = row.Cells[0].Value.ToString();
         PronunciationDownloader.DownloadAndPlay(word);
     }
 }
Ejemplo n.º 2
0
 private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 3) //双击单词本身
     {
         string word = dataGridView1.Rows[e.RowIndex].Cells["Word"].Value.ToString();
         PronunciationDownloader.DownloadAndPlay(word);
     }
 }
 private void dgvUnknownWords_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         string word = dgvUnknownWords.Rows[e.RowIndex].Cells[1].Value.ToString();
         PronunciationDownloader.DownloadAndPlay(word);
     }
     catch (Exception ex)
     {
     }
 }