We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I created a form to control the browser. Logic:
Question.
Form1.cs `namespace CefSharpWinFormsAndSharpBrowser { public partial class Form1 : Form { BrowserService browserService = new BrowserService();
public Form1() { InitializeComponent(); // Form1Tests form1Tests = new Form1Tests(this); // form1Tests.Owner = this; } /// <summary> /// Open browser /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sender, EventArgs e) { browserService.OpenBrowser(); } /// <summary> /// Goto URL /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button10_Click(object sender, EventArgs e) { List<string> urls = new List<string>() { "github.com", "stackoverflow.com", "habr.com" }; foreach (string url in urls) { browserService.AddNewBrowser(url); // browserService.LoadURL(url); } } }
} `
BrowserService.cs `using SharpBrowser; using SharpBrowser.BrowserTabStrip;
using System.IO;
namespace CefSharpWinFormsAndSharpBrowser.Services { public class BrowserService { // Form _formBrowser;
MainForm mainForm = new MainForm(); SharpTab SharpTab = new SharpTab(); FileService fileService = new FileService(); private SharpBrowser.BrowserTabStrip.BrowserTabStrip TabPages = new SharpBrowser.BrowserTabStrip.BrowserTabStrip(); public BrowserService() { } public void OpenBrowser() { mainForm.Show(); } public void AddNewBrowser(string url) { mainForm.AddNewBrowserTab(url); } public void LoadURL(string url) { mainForm.LoadURLPublic(url); } }
}`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How do I get a notification from each tab that a page is loaded?
I created a form to control the browser.
Logic:
Question.
Form1.cs
`namespace CefSharpWinFormsAndSharpBrowser
{
public partial class Form1 : Form
{
BrowserService browserService = new BrowserService();
}
`
BrowserService.cs
`using SharpBrowser;
using SharpBrowser.BrowserTabStrip;
using System.IO;
namespace CefSharpWinFormsAndSharpBrowser.Services
{
public class BrowserService
{
// Form _formBrowser;
}`
The text was updated successfully, but these errors were encountered: