private void ButtonTabRemove_Click(object sender, EventArgs e) { var selectedTabPage = BrowserTabs.SelectedTab; if (BrowserTabs.TabPages.Count > 1) { BrowserTabs.TabPages.Remove(selectedTabPage); selectedTabPage = BrowserTabs.TabPages[BrowserTabs.TabPages.Count - 1]; BrowserTabs.SelectTab(selectedTabPage); SyncAddressBarToUrl(); } }
public void AddBrowserTab() { tp = new TabPage(); tp.Text = "New Tab"; BrowserTabs.TabPages.Add(tp); var browser = new ChromiumWebBrowser(waterskyHome); tp.Controls.Add(browser); browser.Dock = DockStyle.Fill; chromeBrowser = browser; chromeBrowser.TitleChanged += ChromeBrowser_TitleChanged; chromeBrowser.AddressChanged += ChromeBrowser_AddressChanged; BrowserTabs.SelectTab(tp); }
private void AdicionarAba(ImovelDTO imovel, bool doLogin = true) { TabPage tab = new TabPage("OLX(" + imovel.IdImovel.ToString() + ")"); NavegadorUC navegador = new NavegadorUC(); navegador.Dock = DockStyle.Fill; tab.Controls.Add(navegador); BrowserTabs.TabPages.Add(tab); BrowserTabs.SelectTab(tab); navegador.Usuario = OlxUsuarioText.Text; navegador.Senha = OlxSenhaText.Text; navegador.Imovel = imovel; if (doLogin) { navegador.abrirLoginOlx(); } else { navegador.abrirInserirOlx(); } }
public void OpenBrowserSettings() { BrowserTabs.TabPages.Add(settingsTab); BrowserTabs.SelectTab(settingsTab); menu.Hide(); }