void OpenFromBookmark(string url) { indexTabBookmark = -1; tabControl1.SelectedTab.Controls.Clear(); page web = new page(tabControl1.SelectedIndex); web.DocumentCompleted += DocumentCompleted; web.NewWindow += NewWindow; tabControl1.SelectedTab.Controls.Add(web); web.Navigate(url); }
void AddTab(string url) { page web = new page(i); web.DocumentCompleted += DocumentCompleted; web.NewWindow += NewWindow; tabControl1.TabPages.Add("New Pages"); tabControl1.TabPages[i].Controls.Add(web); tabControl1.SelectTab(i); i += 1; web.Navigate(url); }
void AddHtmlTab(string nameFile) { page web = new page(i); web.NewWindow += NewWindow; tabControl1.TabPages.Add("История"); tabControl1.TabPages[i].Controls.Add(web); tabControl1.SelectTab(i); i += 1; web.DocumentCompleted += HtmlDocumentCompleted; streamHtml = new FileStream(nameFile, FileMode.Open); web.DocumentStream = streamHtml; }