public void return_url() { url = Link_URL.Text; char[] url_mass = url.ToCharArray(); bool[] temp_flag = new bool[7]; for (int i = 0; i < temp_flag.Length; i++) { temp_flag[i] = false; } if (url_mass[0] == 'h') { temp_flag[0] = true; if (url_mass[1] == 't') { temp_flag[1] = true; if (url_mass[2] == 't') { temp_flag[2] = true; if (url_mass[3] == 'p') { temp_flag[3] = true; if (url_mass[4] == ':') { temp_flag[4] = true; if (url_mass[5] == '/') { temp_flag[5] = true; if (url_mass[6] == '/') { temp_flag[7] = true; } } } } } } } else { url = "http://" + Link_URL.Text; Link_URL.Text = url; } try { Webform.Navigate(url); Link_URL.Text = (Webform.Source).ToString(); } catch (System.UriFormatException) { MessageBox.Show("Введён неправильный HTTP запрос"); } }
private void Button_Click_1(object sender, RoutedEventArgs e) { try { Webform.GoBack(); Link_URL.Text = (Webform.Source).ToString(); } catch (System.Runtime.InteropServices.COMException) { MessageBox.Show("error"); } }
private void PrintWebformInfo(Webform webform, int indent = 8) { var prefix = string.Empty.PadLeft(indent, ' '); Console.WriteResponse(ConsoleColor.Green, "{0}Type: {1}", prefix, webform.Type); Console.WriteResponse(ConsoleColor.Green, "{0}HTML source: {1}", prefix, webform.HtmlSourceLink); Console.WriteResponse(ConsoleColor.Green, "{0}JS source: {1}", prefix, webform.JavascriptSourceLink); Console.WriteResponse(ConsoleColor.Green, "{0}Displays: {1} ({2} unique)", prefix, webform.TotalDisplays, webform.TotalUniqueDisplays); Console.WriteResponse(ConsoleColor.Green, "{0}Submissions: {1}", prefix, webform.TotalSubmissions); Console.WriteResponse(ConsoleColor.Green, "{0}Conversion: {1}%", prefix, webform.ConversionPercentage); Console.WriteResponse(ConsoleColor.Green, "({0}% unique)", webform.UniqueConversionPercentage); }
public MainWindow() { InitializeComponent(); Webform.Navigate("http://google.com"); }
private void Refresh_Click(object sender, RoutedEventArgs e) { Webform.Refresh(); }