Update example as API had changed
This commit is contained in:
parent
1871a24e91
commit
97298dc2bc
@ -42,7 +42,7 @@ namespace CefSharp.MinimalExample.OffScreen
|
|||||||
{
|
{
|
||||||
// Check to ensure it is the main frame which has finished loading
|
// Check to ensure it is the main frame which has finished loading
|
||||||
// (rather than an iframe within the main frame).
|
// (rather than an iframe within the main frame).
|
||||||
if (e.IsMainFrame)
|
if (e.Frame.IsMain)
|
||||||
{
|
{
|
||||||
// Remove the load event handler, because we only want one snapshot of the initial page.
|
// Remove the load event handler, because we only want one snapshot of the initial page.
|
||||||
browser.FrameLoadEnd -= BrowserFrameLoadEnd;
|
browser.FrameLoadEnd -= BrowserFrameLoadEnd;
|
||||||
|
@ -26,7 +26,7 @@ namespace CefSharp.MinimalExample.WinForms
|
|||||||
};
|
};
|
||||||
toolStripContainer.ContentPanel.Controls.Add(browser);
|
toolStripContainer.ContentPanel.Controls.Add(browser);
|
||||||
|
|
||||||
browser.NavStateChanged += OnBrowserNavStateChanged;
|
browser.LoadingStateChanged += OnLoadingStateChanged;
|
||||||
browser.ConsoleMessage += OnBrowserConsoleMessage;
|
browser.ConsoleMessage += OnBrowserConsoleMessage;
|
||||||
browser.StatusMessage += OnBrowserStatusMessage;
|
browser.StatusMessage += OnBrowserStatusMessage;
|
||||||
browser.TitleChanged += OnBrowserTitleChanged;
|
browser.TitleChanged += OnBrowserTitleChanged;
|
||||||
@ -47,7 +47,7 @@ namespace CefSharp.MinimalExample.WinForms
|
|||||||
this.InvokeOnUiThreadIfRequired(() => statusLabel.Text = args.Value);
|
this.InvokeOnUiThreadIfRequired(() => statusLabel.Text = args.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnBrowserNavStateChanged(object sender, NavStateChangedEventArgs args)
|
private void OnLoadingStateChanged(object sender, LoadingStateChangedEventArgs args)
|
||||||
{
|
{
|
||||||
SetCanGoBack(args.CanGoBack);
|
SetCanGoBack(args.CanGoBack);
|
||||||
SetCanGoForward(args.CanGoForward);
|
SetCanGoForward(args.CanGoForward);
|
||||||
|
Loading…
Reference in New Issue
Block a user