public Form1() { InitializeComponent(); ChangeLoading(); WebBrowser wbVN = new WebBrowser(); wbVN.Height = 0; wbVN.Width = 0; wbVN.Visible = false; wbVN.ScriptErrorsSuppressed = true; this.Controls.Add(wbVN); wbVN.Navigate(Cons.VNLink); wbVN.DocumentCompleted += WbVN_DocumentCompleted; WebBrowser wbEng = new WebBrowser(); wbEng.Height = 0; wbEng.Width = 0; wbEng.Visible = false; wbEng.ScriptErrorsSuppressed = true; this.Controls.Add(wbEng); wbEng.Navigate(Cons.USLink); wbEng.DocumentCompleted += WbEng_DocumentCompleted; Vietnamese = new SpeakText(wbVN); English = new SpeakText(wbEng); cbWord.DisplayMember = "Key"; dictionary = new DictionaryManager(); dictionary.LoadDataToComboBox(cbWord); }
private void WbEn_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { //throw new NotImplementedException(); speakText = new SpeakText(webBrowser1); isLoading1 = false; ChangeLoading(); }