资源简介
CefSharp是一个针对.NET(WPF和Windows) Chromium 57 内核的应用项目

代码片段和文件信息
// Copyright © 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
using CefSharp.OffScreen;
using System.Threading.Tasks;
namespace CefSharp.MinimalExample.OffScreen
{
public class Program
{
private static ChromiumWebBrowser browser;
public static void Main(string[] args)
{
const string testUrl = “https://www.google.com/“;
Console.WriteLine(“This example application will load {0} take a screenshot and save it to your desktop.“ testUrl);
Console.WriteLine(“You may see Chromium debugging output please wait...“);
Console.WriteLine();
var settings = new CefSettings()
{
//By default CefSharp will use an in-memory cache you need to specify a Cache Folder to persist data
CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) “CefSharp\\Cache“)
};
//Perform dependency check to make sure all relevant resources are in our output directory.
Cef.Initialize(settings performDependencyCheck: true browserProcessHandler: null);
// Create the offscreen Chromium browser.
browser = new ChromiumWebBrowser(testUrl);
// An event that is fired when the first page is finished loading.
// This returns to us from another thread.
browser.LoadingStateChanged += BrowserLoadingStateChanged;
// We have to wait for something otherwise the process will exit too soon.
Console.ReadKey();
// Clean up Chromium objects. You need to call this in your application otherwise
// you will get a crash when closing.
Cef.Shutdown();
}
private static void BrowserLoadingStateChanged(object sender LoadingStateChangedEventArgs e)
{
// Check to see if loading is complete - this event is called twice one when loading starts
// second time when it‘s finished
// (rather than an iframe within the main frame).
if (!e.IsLoading)
{
// Remove the load event handler because we only want one snapshot of the initial page.
browser.LoadingStateChanged -= BrowserLoadingStateChanged;
var scriptTask = browser.EvaluatescriptAsync(“document.getElementById(‘lst-ib‘).value = ‘CefSharp Was Here!‘“);
scriptTask.ContinueWith(t =>
{
//Give the browser a little time to render
Thread.Sleep(500);
// Wait for the screenshot to be taken.
var task = browser.ScreenshotAsync();
task.ContinueWith(x =>
{
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-04-21 22:55 CefSharp.MinimalExample-master\
文件 2518 2017-04-21 22:55 CefSharp.MinimalExample-master\.gitattributes
文件 1522 2017-04-21 22:55 CefSharp.MinimalExample-master\.gitignore
目录 0 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.OffScreen\
文件 4648 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.OffScreen\CefSharp.MinimalExample.OffScreen.csproj
文件 4235 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.OffScreen\Program.cs
目录 0 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.OffScreen\Properties\
文件 1259 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.OffScreen\Properties\AssemblyInfo.cs
文件 143 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.OffScreen\app.config
文件 2596 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.OffScreen\app.manifest
文件 383 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.OffScreen\packages.config
目录 0 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\
文件 10257 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\BrowserForm.Designer.cs
文件 4806 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\BrowserForm.cs
文件 43377 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\BrowserForm.resx
文件 5326 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\CefSharp.MinimalExample.WinForms.csproj
目录 0 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\Controls\
文件 821 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\Controls\ControlExtensions.cs
文件 1142 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\Program.cs
目录 0 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\Properties\
文件 1257 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\Properties\AssemblyInfo.cs
文件 4697 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\Properties\Resources.Designer.cs
文件 7109 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\Properties\Resources.resx
目录 0 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\Resources\
文件 47032 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\Resources\chromium-256.png
文件 948 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\Resources\nav_left_green.png
文件 864 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\Resources\nav_plain_green.png
文件 864 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\Resources\nav_plain_red.png
文件 960 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\Resources\nav_right_green.png
文件 143 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\app.config
文件 2513 2017-04-21 22:55 CefSharp.MinimalExample-master\CefSharp.MinimalExample.WinForms\app.manifest
............此处省略26个文件信息
相关资源
- WPF CEFSHARP 支持 MP4
- CefSharp.v75.1.143.0浏览器Demo的完全WPF版
- CefSharp 49.0.0.1 C#中的Google浏览器控件
- CefSharp.x86.84.4.1 支持Mp4
- CefSharp63 WPF 支持mp3、mp4、flansh、anyc
- CefSharp V63 支持MP4 winform版
- C#WinForm中CefSharp.WinformVS2010、.net4.0
- Winform中使用CefSharp和js互相调用方法
- CefSharp V63 demo
- winform插件cefsharp65最新版完美demo,完
- Winform集成CefSharp,CefSharp单独目录
- WinForm窗体程序中使用CefSharp获取加载
- CefSharp.WinForms 支援MP4 Cef 71.0.1.0
- Winform运用CefSharp简单样例
- VS中NuGet包离线安装CefSharp.WinForms.49.
- cefsharp使用简单用例,兼容XP解决方案
- CefSharp.WinForms.dll
- C#WinForm使用CefSharp内嵌
- CefSharp.WinForms 支持mp4
- VB.net中应用CefSharp.WinForms库构建Chrom
- CefSharp完美代码
- CefSharp源码含wpf以及winform
- CefSharp简单调用
- CefSharp-多标签-未完善
- WPF中嵌入CefSharp浏览器
- Cefsharp网盘搜索
-
pepflashpla
yer.dll 64位和32位(附使用教 - C#后台编写网页浏览器CefSharp
- WinForm浏览器开发(CefSharp.MinimalExamp
评论
共有 条评论