private void browser_Navigated(object sender, Gecko.GeckoNavigatedEventArgs e) { // Show that the application is loading... // e.g. Invoke the progress bar //Text = e.Uri.ToString(); }
//lưu lịch sử ở các newtab private void WebTab_Navigated(object sender, Gecko.GeckoNavigatedEventArgs e) { String t = webTab.Url.ToString(); String them; kn.Open(); them = "INSERT INTO dbo.history VALUES('" + t + "','" + DateTime.Now.ToString("hh:mm:ss") + "','" + DateTime.Now.ToString("MM/dd/yyyy") + "')"; SqlCommand commandthem = new SqlCommand(them, kn); commandthem.ExecuteNonQuery(); kn.Close(); }
private void geckoWebBrowser1_Navigated(object sender, Gecko.GeckoNavigatedEventArgs e) { String t = geckoWebBrowser1.Url.ToString(); SqlConnection kn = new SqlConnection(@"Data Source=DESKTOP-VGNG2FP;Initial Catalog=lichsuweb;Integrated Security=True"); String them; kn.Open(); them = "INSERT INTO dbo.history VALUES('" + t + "','" + DateTime.Now.ToString("hh:mm:ss") + "','" + DateTime.Now.ToString("dd/MM/yyyy") + "')"; SqlCommand commandthem = new SqlCommand(them, kn); commandthem.ExecuteNonQuery(); }
private void webBrowser1_Navigated(object sender, Gecko.GeckoNavigatedEventArgs e) { try { Bitmap bm = Utils.GetFavicon(webBrowser1.Url); if (bm != null) { faviconbtn.Image = bm; } } catch { } }