From 97298dc2bccba463a3591858c04300eaf5ce12f2 Mon Sep 17 00:00:00 2001 From: amaitland Date: Thu, 20 Aug 2015 11:54:49 +1000 Subject: [PATCH] Update example as API had changed --- CefSharp.MinimalExample.OffScreen/Program.cs | 2 +- CefSharp.MinimalExample.WinForms/BrowserForm.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CefSharp.MinimalExample.OffScreen/Program.cs b/CefSharp.MinimalExample.OffScreen/Program.cs index f538be0..252f786 100644 --- a/CefSharp.MinimalExample.OffScreen/Program.cs +++ b/CefSharp.MinimalExample.OffScreen/Program.cs @@ -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; diff --git a/CefSharp.MinimalExample.WinForms/BrowserForm.cs b/CefSharp.MinimalExample.WinForms/BrowserForm.cs index b9d60a2..e291a94 100644 --- a/CefSharp.MinimalExample.WinForms/BrowserForm.cs +++ b/CefSharp.MinimalExample.WinForms/BrowserForm.cs @@ -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);