private void btnOption_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "单词表文件.wrd|*.wrd"; if (ofd.ShowDialog() == DialogResult.OK) { wordList = EnglishList.GetEnglishList(ofd.FileName); } }
public FrmMain(string src) { InitializeComponent(); try { this.wordList = EnglishList.GetEnglishList(src); } catch (Exception ex) { MessageBox.Show(ex.Message); } }