资源简介

注意,要求.net版本至少在4.5.2,且是64位的解决方案,解决方案生成平台选anycpu是不行的,支持32位的我后续可能会上传; 该版本为cefsharp65,目前为止最新的版本,已集成好flash支持和支持摄像头调用,希望对你有用。ps(开发工具为vs2012)

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CefSharp;

namespace CefSharpDemo
{
    public static class CefExample
    {
        public const string DefaultUrl = “http://www.google.com/“;
        private static readonly bool DebuggingSubProcess = Debugger.IsAttached;

        public static void Init()
        {
            var settings = new CefSettings();
            settings.RemoteDebuggingPort = 8088;
            settings.Locale = “zh-CN“;
            settings.CefCommandLineArgs.Add(“ppapi-flash-path“ System.AppDomain.CurrentDomain.baseDirectory + “pepflashplayer.dll“); //指定flash的版本,不使用系统安装的flash版本
            settings.CefCommandLineArgs.Add(“ppapi-flash-version“ “29.0.0.171“);
            settings.CefCommandLineArgs.Add(“enable-media-stream“ “enable-media-stream“);
            settings.IgnoreCertificateErrors = true;
            settings.LogSeverity = LogSeverity.Verbose;

            if (DebuggingSubProcess)
            {
                //var architecture = Environment.Is64BitProcess ? “x64“ : “x86“;
                //settings.BrowserSubprocessPath = “..\\..\\..\\..\\CefSharp.BrowserSubprocess\\bin\\“ + architecture + “\\Debug\\CefSharp.BrowserSubprocess.exe“;
            }

            //settings.RegisterScheme(new CefCustomScheme
            //{
            //    SchemeName = CefSharpSchemeHandlerFactory.SchemeName
            //    SchemeHandlerFactory = new CefSharpSchemeHandlerFactory()
            //});

            if (!Cef.Initialize(settings))
            {
                if (Environment.GetCommandLineArgs().Contains(“--type=renderer“))
                {
                    Environment.Exit(0);
                }
                else
                {
                    return;
                }
            }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        189  2018-07-25 09:42  CefSharpDemo\CefSharpDemo\App.config

     文件        189  2018-07-25 09:42  CefSharpDemo\CefSharpDemo\bin\Debug\CefSharpDemo.exe.config

     文件      22984  2018-07-25 09:42  CefSharpDemo\CefSharpDemo\bin\Debug\CefSharpDemo.vshost.exe

     文件        189  2018-07-25 09:42  CefSharpDemo\CefSharpDemo\bin\Debug\CefSharpDemo.vshost.exe.config

     文件        490  2014-01-13 21:31  CefSharpDemo\CefSharpDemo\bin\Debug\CefSharpDemo.vshost.exe.manifest

     文件    3873893  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\cef.pak

     文件    1086976  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharp.BrowserSubprocess.Core.dll

     文件    5353472  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharp.BrowserSubprocess.Core.pdb

     文件       8704  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharp.BrowserSubprocess.exe

     文件      15872  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharp.BrowserSubprocess.pdb

     文件    1619456  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharp.Core.dll

     文件    6631424  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharp.Core.pdb

     文件      60734  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharp.Core.xml

     文件     190464  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharp.dll

     文件     407040  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharp.pdb

     文件      27648  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharp.WinForms.dll

     文件      52736  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharp.WinForms.pdb

     文件      41680  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharp.WinForms.xml

     文件     455763  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharp.xml

     文件       8704  2018-07-25 09:52  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharpDemo.exe

     文件        189  2018-07-25 09:42  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharpDemo.exe.config

     文件      26112  2018-07-25 09:52  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharpDemo.pdb

     文件      22472  2018-07-25 09:43  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharpDemo.vshost.exe

     文件        189  2018-07-25 09:42  CefSharpDemo\CefSharpDemo\bin\x64\Debug\CefSharpDemo.vshost.exe.config

     文件     655157  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\cef_100_percent.pak

     文件     760961  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\cef_200_percent.pak

     文件    1877906  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\cef_extensions.pak

     文件     582656  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\chrome_elf.dll

     文件    4310328  2018-07-17 14:57  CefSharpDemo\CefSharpDemo\bin\x64\Debug\d3dcompiler_47.dll

     文件     987451  2018-07-25 09:52  CefSharpDemo\CefSharpDemo\bin\x64\Debug\debug.log

............此处省略126个文件信息

评论

共有 条评论