资源简介
CefSharp v51 Net 4.5.2 封装谷歌浏览器
支持多标签、页面搜索、下载、后退、前进、首页
代码片段和文件信息
using System;
using System.Windows.Forms;
using System.Threading;
using System.Diagnostics;
using System.Configuration;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using CefSharp;
using CefSharp.WinForms;
using FarsiLibrary.Win;
using Timer = System.Windows.Forms.Timer;
using System.Drawing;
using System.Reflection;
namespace SharpBrowser {
///
/// The main SharpBrowser form supporting multiple tabs.
/// We used the x86 version of CefSharp V51 so the app works on 32-bit and 64-bit machines.
/// If you would only like to support 64-bit machines simply change the DLL references.
///
internal partial class MainForm : Form {
private string appPath = Path.GetDirectoryName(Application.ExecutablePath) + @“\“;
public static MainForm Instance;
public static string Branding = ““;
public static string UserAgent = “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/57.0.2987.110 Safari/537.36“;
public static string HomepageURL = “http://www.juhuiyin.com“;
public static string NewTabURL = “about:blank“;
public static string DownloadsURL = “sharpbrowser://storage/downloads.html“;
public static string FileNotFoundURL = “sharpbrowser://storage/errors/notFound.html“;
public static string CannotConnectURL = “sharpbrowser://storage/errors/cannotConnect.html“;
public static string SearchURL = “https://www.google.com/#q=“;
public bool WebSecurity = true;
public bool CrossDomainSecurity = true;
public bool WebGL = true;
public MainForm() {
Instance = this;
InitializeComponent();
InitBrowser();
SetFormtitle(null);
// LoadURL(“www.juhuiyin.com“);
}
private void MainForm_Load(object sender EventArgs e) {
InitAppIcon();
InitTooltips(this.Controls);
InitHotkeys();
}
#region App Icon
///
/// embedding the resource using the Visual Studio designer results in a blurry icon.
/// the best way to get a non-blurry icon for Windows 7 apps.
///
private void InitAppIcon() {
assembly = Assembly.GetAssembly(typeof(MainForm));
//Icon = new Icon(GetResourceStream(“sharpbrowser.ico“) new Size(64 64));
}
public static Assembly assembly = null;
public Stream GetResourceStream(string filename bool withNamespace = true) {
try {
return assembly.GetManifestResourceStream(“SharpBrowser.Resources.“ + filename);
} catch (System.Exception ex) { }
return null;
}
#endregion
#region Tooltips & Hotkeys
///
/// these hotkeys work when the user is focussed on the .NET form and its controls
/// AND when the user is focussed on the browser (CefSharp portion)
///
private void InitHotkeys() {
// browser hotkeys
KeyboardHandler.AddHotKey(this CloseActiveTab Keys.W true);
KeyboardHa
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-08-15 13:33 src\
目录 0 2018-08-14 11:41 src\.vs\
目录 0 2018-08-14 11:41 src\.vs\SharpBrowser\
目录 0 2018-08-14 11:44 src\.vs\SharpBrowser\v14\
文件 71680 2018-08-15 12:22 src\.vs\SharpBrowser\v14\.suo
文件 831 2018-08-14 13:41 src\1.ico
文件 416 2017-09-22 14:38 src\App.config
目录 0 2018-08-14 11:41 src\Data\
文件 45761 2017-09-22 14:38 src\Data\JSON.cs
目录 0 2018-08-15 12:19 src\Handlers\
文件 2577 2018-08-15 08:34 src\Handlers\CefLifeSpanHandler.cs
文件 3320 2017-09-22 14:38 src\Handlers\ContextMenuHandler.cs
文件 2572 2018-08-15 12:19 src\Handlers\DownloadHandler.cs
文件 958 2017-09-22 14:38 src\Handlers\HostHandler.cs
文件 1835 2017-09-22 14:38 src\Handlers\KeyboardHandler.cs
文件 8178 2018-08-15 09:21 src\Handlers\LifeSpanHandler.cs
文件 11760 2018-08-15 09:27 src\Handlers\RequestHandler.cs
文件 5569 2017-09-22 14:38 src\Handlers\SchemeHandler.cs
文件 305 2017-09-22 14:38 src\Handlers\SchemeHandlerFactory.cs
文件 21447 2018-08-15 12:21 src\MainForm.Designer.cs
文件 24986 2018-08-15 12:21 src\MainForm.cs
文件 17637 2018-08-15 12:21 src\MainForm.resx
文件 508 2018-08-14 15:08 src\Program.cs
目录 0 2018-08-14 11:41 src\Properties\
文件 1463 2017-09-22 14:38 src\Properties\AssemblyInfo.cs
文件 2866 2018-08-14 13:50 src\Properties\Resources.Designer.cs
文件 5698 2017-09-22 14:38 src\Properties\Resources.resx
文件 1113 2018-08-14 13:50 src\Properties\Settings.Designer.cs
文件 242 2017-09-22 14:38 src\Properties\Settings.settings
目录 0 2018-08-14 13:41 src\Resources\
文件 545 2017-09-22 14:38 src\Resources\blankpage.png
............此处省略120个文件信息
相关资源
- Axure RP Extension for Chrome0.6.2亲测可用
- Chrome插件-在Edge中安装Chrome扩展程序
- 谷歌浏览器插件Postman_4.1.3和安装流程
- IE-Tab_v10.9.8.1 for Chrome 离线安装包
- Chrome插件-Markdown一键转换到富文本格
- Postman for chrome-V5.4.0_0汉化版
- 谷歌浏览器插件 User-Agent Switcher
- Web Scraper 爬虫 网页抓取 Chrome插件
- Baidu Exporter For Chrome 0.8.8
- chromedriver
- chromedriver_2.38
- advanced rest client definitions.json
-
chromeFOR.COM_vxg-media-pla
yer_v1.8.41 - 谷歌浏览器原版
- Google Chrome 49.0.2623.110 便携版(免安装
- Chrome Proxy SwitchyOmega扩展程序
- Chrome插件SwitchyOmega自动切换备份文件
- (2020谷歌浏览器插件xpath).zip
- Chrome插件-XPath Helper 完成Bing每日壁纸
- eWebeditor 修正版 (解决在IE9-IE11 Chro
- Chrome浏览器,谷歌浏览器
- Sense插件Chrome浏览器
- chromedriver_win32适用于 72.0.3626.119正式版
- Chrome最新版本 67.0.3396.99正式版本版本
- chromedriver_win32_86.0.4240.22.zip
- Chrome扩展离线安装包crx
- Chrome扩展popup页面,content页面,还有
- PPAPI 开发接口
- IE Tab Multi (Enhance) for Chrome 1.0.0.1离
- Edit-This-Cookie-1.5.0 chrome插件
评论
共有 条评论