private void LoadPage() { string strFilePaht = ConfigurationSettings.AppSettings["FilesPath"]; string _url = string.Format("{0}Bar.html", strFilePaht); WB1.Navigate(new Uri(_url)); _url = string.Format("{0}Pie.html", strFilePaht); WB2.Navigate(new Uri(_url)); }
private void FinanceReport_Load(object sender, EventArgs e) { string strFilePaht = ConfigurationSettings.AppSettings["FilesPath"]; string _url = string.Format("{0}Receipted.html", strFilePaht); WB1.Navigate(new Uri(_url)); _url = string.Format("{0}Receivable.html", strFilePaht); WB2.Navigate(new Uri(_url)); _url = string.Format("{0}DepartmentFee.html", strFilePaht); WB3.Navigate(new Uri(_url)); _url = string.Format("{0}FinanceMonth.html", strFilePaht); WB4.Navigate(new Uri(_url)); }
private void WB1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { WB1.Refresh(); WB1.Visible = true; }
private void FrmFileShowDel_Shown(object sender, EventArgs e) { WB1.Visible = false; WB1.Navigate(new Uri(_url)); }
private void GO_b_Click(object sender, EventArgs e) { GO_b.Text = "Working..."; //all go code here if (Batches.SelectedItem == null || string.IsNullOrEmpty(REG_value.Text) || URL_value_box.SelectedItem == null || Starting_Year.SelectedItem == null) { Error.Text = "Some information is missing...check if any data-box in empty"; } else { Error.Text = "Proceeding....."; C_year = Int32.Parse(Starting_Year.Text); last_year = Int32.Parse(Starting_Year.Text) + 2; while (C_year <= last_year && !found_1) { WB1.Navigate(URL_value_box.Text); while (WB1.ReadyState != WebBrowserReadyState.Complete) { Application.DoEvents(); } Error.Text = "Loaded page"; WB1.Document.GetElementById("regno").SetAttribute("value", REG_value.Text); WB1.Document.GetElementById("cboclass").SetAttribute("value", Batches.Text); WB1.Document.GetElementById("cboyear1").SetAttribute("value", C_year.ToString()); if (C_Date < 10) { WB1.Document.GetElementById("cboday1").SetAttribute("value", "0" + C_Date.ToString()); } else { WB1.Document.GetElementById("cboday1").SetAttribute("value", C_Date.ToString()); } if (C_month < 10) { WB1.Document.GetElementById("cbomonth1").SetAttribute("value", "0" + C_month.ToString()); } else { WB1.Document.GetElementById("cbomonth1").SetAttribute("value", C_month.ToString()); } WB1.Document.GetElementById("Submit").InvokeMember("click"); while (check_1) { Application.DoEvents(); if (WB1.Url.ToString() == "http://seecs.nust.edu.pk/Student-Affairs/Results/fall-2015/result.php") { string file_all = WB1.DocumentText; string[] separators = { "<b>", "</b>", REG_value.Text }; string[] words = file_all.Split(separators, StringSplitOptions.RemoveEmptyEntries); if (words.Length >= 2) { if (words[1] == "Date of Birth is not matched with provided Registration No, unable to display result") { check_1 = false; } else { if (words.Length == 2) { found_1 = true; check_1 = false; } } } } } if (!found_1) { next_date(); } check_1 = true; } if (found_1) { Error.Text = "FOUND"; CGPA_value.Text = "On webpage"; Birth_value.Text = C_Date.ToString() + "/" + C_month.ToString() + "/" + C_year.ToString(); found_1 = false; } else { Error.Text = "notfound"; } C_Date = 1; C_month = 1; Error.Text = "Done"; } GO_b.Text = "GO"; }
private void toolStripMenuItem4_Click(object sender, EventArgs e) { WB1.Navigate("http://192.168.2.1/userRpm/StatusRpm.htm?Connect=连 接&wan=1"); }
private void textBox1_KeyDown(object sender, KeyEventArgs e) { WB1.Navigate(br1url.Text); }
private void FrmHelp_Shown(object sender, EventArgs e) { WB1.Navigate(new Uri(_url)); }
//<snippet10> private void Button1_Click(object sender, RoutedEventArgs e) { WB1.Navigate(new Uri("http://localhost/HTMLPage2.htm")); }
private void Button1_Click(object sender, RoutedEventArgs e) { object results = WB1.InvokeScript("LoadSearch", new string[] { "Silverlight" }); }