From 70dd2ea3cc6e4d5b371a2820b40fc77c79e4e227 Mon Sep 17 00:00:00 2001 From: Per Lundberg Date: Wed, 13 Nov 2013 17:49:40 +0200 Subject: [PATCH] #210 Apparently, I had only renamed the project; the assembly name and the namespace was still wrong. --- CefSharp.WinForms.Example/Browser.cs | 2 +- CefSharp.WinForms/CefSharp.WinForms.csproj | 4 ++-- CefSharp.WinForms/WebView.cs | 21 +++++++++++++-------- CefSharp/AssemblyInfo.cpp | 2 +- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/CefSharp.WinForms.Example/Browser.cs b/CefSharp.WinForms.Example/Browser.cs index 2b9b9f406..0ef746fef 100644 --- a/CefSharp.WinForms.Example/Browser.cs +++ b/CefSharp.WinForms.Example/Browser.cs @@ -1,7 +1,7 @@ using System; using System.Windows.Forms; using CefSharp.Example; -using CefSharp.WinForm; +using CefSharp.WinForms; namespace CefSharp.WinForms.Example { diff --git a/CefSharp.WinForms/CefSharp.WinForms.csproj b/CefSharp.WinForms/CefSharp.WinForms.csproj index d9834401c..e7f967109 100644 --- a/CefSharp.WinForms/CefSharp.WinForms.csproj +++ b/CefSharp.WinForms/CefSharp.WinForms.csproj @@ -7,8 +7,8 @@ {882505AD-246D-402A-8414-347EFB8E2C8D} Library Properties - CefSharp.WinForm - CefSharp.WinForm + CefSharp.WinForms + CefSharp.WinForms v4.0 512 Client diff --git a/CefSharp.WinForms/WebView.cs b/CefSharp.WinForms/WebView.cs index b91db124d..ba7f1324d 100644 --- a/CefSharp.WinForms/WebView.cs +++ b/CefSharp.WinForms/WebView.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Windows.Forms; -namespace CefSharp.WinForm +namespace CefSharp.WinForms { // TODO: Should not implement IRenderWebBrowser straight away, since it means we have to add a bunch of boilerplate properties // TODO: which aren't even used. The proper way would be to add another interface, which is only used for WinForms (which the @@ -74,17 +74,22 @@ namespace CefSharp.WinForm public void ExecuteScriptAsync(string script) { - throw new NotImplementedException(); - } - - public object EvaluateScript(string script, TimeSpan? timeout) - { - throw new NotImplementedException(); + managedCefBrowserAdapter.ExecuteScriptAsync(script); } public object EvaluateScript(string script) { - throw new NotImplementedException(); + return EvaluateScript(script, timeout: null); + } + + public object EvaluateScript(string script, TimeSpan? timeout) + { + if (timeout == null) + { + timeout = TimeSpan.MaxValue; + } + + return managedCefBrowserAdapter.EvaluateScript(script, timeout.Value); } public event LoadErrorEventHandler LoadError; diff --git a/CefSharp/AssemblyInfo.cpp b/CefSharp/AssemblyInfo.cpp index f4bc65d65..033b699a2 100644 --- a/CefSharp/AssemblyInfo.cpp +++ b/CefSharp/AssemblyInfo.cpp @@ -23,7 +23,7 @@ using namespace System::Security::Permissions; "4a33cceaf8b8ba1800b7d7bff67b72b90837271491b61c91ef6d667be0521ce171f77e114fc2bb" "cfd185d3" )]; -[assembly:InternalsVisibleTo("CefSharp.WinForm, PublicKey=" +[assembly:InternalsVisibleTo("CefSharp.WinForms, PublicKey=" "0024000004800000940000000602000000240000525341310004000001000100c5ddf5d063ca8e" "695d4b8b5ad76634f148db9a41badaed8850868b75f916e313f15abb62601d658ce2bed877d733" "14d5ed202019156c21033983fed80ce994a325b5d4d93b0f63a86a1d7db49800aa5638bb3fd98f"