Update example as API had changed

This commit is contained in:
amaitland 2015-08-20 11:54:49 +10:00
parent 1871a24e91
commit 97298dc2bc
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ namespace CefSharp.MinimalExample.OffScreen
{
// Check to ensure it is the main frame which has finished loading
// (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.
browser.FrameLoadEnd -= BrowserFrameLoadEnd;

View File

@ -26,7 +26,7 @@ namespace CefSharp.MinimalExample.WinForms
};
toolStripContainer.ContentPanel.Controls.Add(browser);
browser.NavStateChanged += OnBrowserNavStateChanged;
browser.LoadingStateChanged += OnLoadingStateChanged;
browser.ConsoleMessage += OnBrowserConsoleMessage;
browser.StatusMessage += OnBrowserStatusMessage;
browser.TitleChanged += OnBrowserTitleChanged;
@ -47,7 +47,7 @@ namespace CefSharp.MinimalExample.WinForms
this.InvokeOnUiThreadIfRequired(() => statusLabel.Text = args.Value);
}
private void OnBrowserNavStateChanged(object sender, NavStateChangedEventArgs args)
private void OnLoadingStateChanged(object sender, LoadingStateChangedEventArgs args)
{
SetCanGoBack(args.CanGoBack);
SetCanGoForward(args.CanGoForward);