public void Navigate(String url, Boolean addToHistoryList) { if (!String.IsNullOrEmpty(url)) { _browser.Navigate(url); _browser.Focus(); _addToHistoryList = addToHistoryList; } }
public void SelectTab(object sender, EventArgs e) { TabPage Me = Tabs.SelectedTab; if (Me.Name == "NewTab") { NewTab("", true); return; } WebTab = (Tab)Me; Browser = WebTab.Browser; SetUrl(); this.Text = Browser.DocumentTitle + " - " + Application.ProductName;; Browser.Focus(); }
public MainForm(string url, string tmpname) { InitializeComponent(); browser = new WebKitBrowser(); browser.Visible = true; browser.Dock = DockStyle.Fill; browser.Name = "browser"; browser.IsWebBrowserContextMenuEnabled = false; browser.IsScriptingEnabled = false; Controls.Add(browser); RegisterBrowserEvents(); fsw = new FileSystemWatcher(Path.GetDirectoryName(tmpname)); fsw.Created += new FileSystemEventHandler(fsw_Created); fsw.EnableRaisingEvents = true; temp_file_name = tmpname; browser.Navigate(url); browser.Focus(); }