Commit ac3003d6 authored by tr's avatar tr

1、CEF实例:窗体Size与窗体实际大小不一致问题,仍未解决

parent 9033f3f0
......@@ -26,3 +26,12 @@ bin
/AppHome/UpdateExecuter.exe
/AppHome/db.json
/packages/TSF.TypeLib.1.0.1.0
/AppHome/GPUCache
/AppHome/x64
/AppHome/x86
*.log
/packages/cef.redist.x64.92.0.25
/packages/cef.redist.x86.92.0.25
/packages/CefSharp.Common.92.0.251
/packages/CefSharp.WinForms.92.0.251/lib/net452
/packages/CefSharp.WinForms.92.0.251
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="UpdateTime" value="2021-08-11 17:21:10.523" />
<add key="UpdateTime" value="2021-08-11 17:21:10.523"/>
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.3.2.10" newVersion="1.3.2.10" />
<assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.3.2.10" newVersion="1.3.2.10"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CefSharp.Core.Runtime" processorArchitecture="x86" publicKeyToken="40c4b6fc221f4138" culture="neutral"/>
<codeBase version="92.0.251.0" href="x86/CefSharp.Core.Runtime.dll"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CefSharp.Core.Runtime" processorArchitecture="amd64" publicKeyToken="40c4b6fc221f4138" culture="neutral"/>
<codeBase version="92.0.251.0" href="x64/CefSharp.Core.Runtime.dll"/>
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
......
......@@ -80,6 +80,46 @@ namespace Tools.Properties {
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap nav_left_green {
get {
object obj = ResourceManager.GetObject("nav_left_green", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap nav_plain_green {
get {
object obj = ResourceManager.GetObject("nav_plain_green", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap nav_plain_red {
get {
object obj = ResourceManager.GetObject("nav_plain_red", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap nav_right_green {
get {
object obj = ResourceManager.GetObject("nav_right_green", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
......
......@@ -124,6 +124,18 @@
<data name="Logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="nav_left_green" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\nav_left_green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="nav_plain_green" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\nav_plain_green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="nav_plain_red" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\nav_plain_red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="nav_right_green" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\nav_right_green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="node_audit" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\node_audit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\CefSharp.Common.92.0.251\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.92.0.251\build\CefSharp.Common.props')" />
<Import Project="..\packages\cef.redist.x86.92.0.25\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.92.0.25\build\cef.redist.x86.props')" />
<Import Project="..\packages\cef.redist.x64.92.0.25\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.92.0.25\build\cef.redist.x64.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
......@@ -44,6 +47,15 @@
<Reference Include="BouncyCastle.Crypto, Version=1.8.6.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
<HintPath>..\FunnyPick\packages\Portable.BouncyCastle.1.8.6\lib\net40\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="CefSharp, Version=92.0.251.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>..\packages\CefSharp.Common.92.0.251\lib\net452\CefSharp.dll</HintPath>
</Reference>
<Reference Include="CefSharp.Core, Version=92.0.251.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>..\packages\CefSharp.Common.92.0.251\lib\net452\CefSharp.Core.dll</HintPath>
</Reference>
<Reference Include="CefSharp.WinForms, Version=92.0.251.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
<HintPath>..\packages\CefSharp.WinForms.92.0.251\lib\net452\CefSharp.WinForms.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.2.10, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.3.2\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
......@@ -108,6 +120,12 @@
<Compile Include="MyUtils\DrawHelper.cs" />
<Compile Include="MyUtils\InputtingService.cs" />
<Compile Include="MyUtils\SegPicture.cs" />
<Compile Include="UI\wCefDemo.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\wCefDemo.Designer.cs">
<DependentUpon>wCefDemo.cs</DependentUpon>
</Compile>
<Compile Include="UI\Popups\wSelectTemplates.cs">
<SubType>Form</SubType>
</Compile>
......@@ -316,6 +334,9 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="UI\wCefDemo.resx">
<DependentUpon>wCefDemo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\Popups\wSelectTemplates.resx">
<DependentUpon>wSelectTemplates.cs</DependentUpon>
</EmbeddedResource>
......@@ -483,6 +504,10 @@
</ItemGroup>
<ItemGroup>
<Content Include="favior.ico" />
<None Include="Resources\nav_plain_red.png" />
<None Include="Resources\nav_plain_green.png" />
<None Include="Resources\nav_left_green.png" />
<None Include="Resources\nav_right_green.png" />
<None Include="Resources\压缩包.png" />
<None Include="Resources\空.png" />
<None Include="Resources\生成.png" />
......@@ -495,4 +520,14 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\cef.redist.x64.92.0.25\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.92.0.25\build\cef.redist.x64.props'))" />
<Error Condition="!Exists('..\packages\cef.redist.x86.92.0.25\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.92.0.25\build\cef.redist.x86.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.Common.92.0.251\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.92.0.251\build\CefSharp.Common.props'))" />
<Error Condition="!Exists('..\packages\CefSharp.Common.92.0.251\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.92.0.251\build\CefSharp.Common.targets'))" />
</Target>
<Import Project="..\packages\CefSharp.Common.92.0.251\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.92.0.251\build\CefSharp.Common.targets')" />
</Project>
\ No newline at end of file
namespace Tools.UI
{
partial class wCefDemo
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(wCefDemo));
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.文件ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiShowDevTools = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiExit = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.tsbBack = new System.Windows.Forms.ToolStripButton();
this.tsbForward = new System.Windows.Forms.ToolStripButton();
this.UrlTextBox = new System.Windows.Forms.ToolStripTextBox();
this.tsbGoButton = new System.Windows.Forms.ToolStripButton();
this.menuStrip1.SuspendLayout();
this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
this.toolStripContainer1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.文件ToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(697, 25);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
//
// 文件ToolStripMenuItem
//
this.文件ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsmiShowDevTools,
this.tsmiExit});
this.文件ToolStripMenuItem.Name = "文件ToolStripMenuItem";
this.文件ToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
this.文件ToolStripMenuItem.Text = "文件";
//
// tsmiShowDevTools
//
this.tsmiShowDevTools.Name = "tsmiShowDevTools";
this.tsmiShowDevTools.Size = new System.Drawing.Size(136, 22);
this.tsmiShowDevTools.Text = "开发者工具";
//
// tsmiExit
//
this.tsmiExit.Name = "tsmiExit";
this.tsmiExit.Size = new System.Drawing.Size(136, 22);
this.tsmiExit.Text = "退出";
//
// toolStripContainer1
//
//
// toolStripContainer1.ContentPanel
//
this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(697, 385);
this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.toolStripContainer1.Location = new System.Drawing.Point(0, 25);
this.toolStripContainer1.Name = "toolStripContainer1";
this.toolStripContainer1.Size = new System.Drawing.Size(697, 410);
this.toolStripContainer1.TabIndex = 1;
this.toolStripContainer1.Text = "toolStripContainer1";
//
// toolStripContainer1.TopToolStripPanel
//
this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1);
//
// toolStrip1
//
this.toolStrip1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbBack,
this.tsbForward,
this.UrlTextBox,
this.tsbGoButton});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(697, 25);
this.toolStrip1.Stretch = true;
this.toolStrip1.TabIndex = 0;
//
// tsbBack
//
this.tsbBack.AutoSize = false;
this.tsbBack.Image = global::Tools.Properties.Resources.nav_left_green;
this.tsbBack.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbBack.Name = "tsbBack";
this.tsbBack.Size = new System.Drawing.Size(52, 22);
this.tsbBack.Text = "后退";
//
// tsbForward
//
this.tsbForward.AutoSize = false;
this.tsbForward.Image = global::Tools.Properties.Resources.nav_right_green;
this.tsbForward.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbForward.Name = "tsbForward";
this.tsbForward.Size = new System.Drawing.Size(52, 22);
this.tsbForward.Text = "前进";
//
// UrlTextBox
//
this.UrlTextBox.AutoSize = false;
this.UrlTextBox.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
this.UrlTextBox.Name = "UrlTextBox";
this.UrlTextBox.Size = new System.Drawing.Size(500, 25);
//
// tsbGoButton
//
this.tsbGoButton.AutoSize = false;
this.tsbGoButton.Image = global::Tools.Properties.Resources.nav_plain_green;
this.tsbGoButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tsbGoButton.Name = "tsbGoButton";
this.tsbGoButton.Size = new System.Drawing.Size(52, 22);
this.tsbGoButton.Text = "重载";
//
// wCefDemo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(697, 435);
this.Controls.Add(this.toolStripContainer1);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Name = "wCefDemo";
this.Text = "Form1";
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false);
this.toolStripContainer1.TopToolStripPanel.PerformLayout();
this.toolStripContainer1.ResumeLayout(false);
this.toolStripContainer1.PerformLayout();
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem 文件ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem tsmiShowDevTools;
private System.Windows.Forms.ToolStripMenuItem tsmiExit;
private System.Windows.Forms.ToolStripContainer toolStripContainer1;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton tsbBack;
private System.Windows.Forms.ToolStripButton tsbForward;
private System.Windows.Forms.ToolStripTextBox UrlTextBox;
private System.Windows.Forms.ToolStripButton tsbGoButton;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
//
using CefSharp;
using CefSharp.WinForms;
//
using Tools.MyUtils;
namespace Tools.UI
{
public partial class wCefDemo : Form
{
private readonly ChromiumWebBrowser browser;
public wCefDemo()
{
InitializeComponent();
if (!this.DesignMode)
{
//窗体初始化
Text = "CefSharp";
StartPosition = FormStartPosition.CenterScreen;
WindowState = FormWindowState.Maximized;
//浏览器初始化
browser = new ChromiumWebBrowser("jhdsoft.gicp.net:21802/#/login?redirect=%2Fhome");
toolStripContainer1.ContentPanel.Controls.Add(browser);
//浏览器事件绑定
browser.IsBrowserInitializedChanged += OnIsBrowserInitializedChanged;
browser.LoadingStateChanged += OnLoadingStateChanged;
browser.TitleChanged += OnBrowserTitleChanged;
browser.AddressChanged += OnBrowserAddressChanged;
//菜单栏事件
this.tsmiShowDevTools.Click += TsmiShowDevTools_Click;
this.tsmiExit.Click += TsmiExit_Click;
//工具栏事件
this.toolStrip1.Layout += ToolStrip1_Layout;
this.tsbBack.Click += TsbBack_Click;
this.tsbForward.Click += TsbForward_Click;
this.tsbGoButton.Click += TsbGoButton_Click;
this.UrlTextBox.KeyUp += UrlTextBox_KeyUp;
}
}
#region 浏览器相关事件
//浏览器上的初始化是否已更改
private void OnIsBrowserInitializedChanged(object sender, EventArgs e)
{
var webBrowser = sender as ChromiumWebBrowser;
this.AsyncUI(() => webBrowser.Focus());
}
//加载状态改变
private void OnLoadingStateChanged(object sender, LoadingStateChangedEventArgs e)
{
this.AsyncUI(() => {
tsbBack.Enabled = e.CanGoBack;
tsbForward.Enabled = e.CanGoForward;
tsbGoButton.Text = e.CanReload ? "重载" : "停止";
tsbGoButton.Image = e.CanReload ? Properties.Resources.nav_plain_green : Properties.Resources.nav_plain_red;
//
this.HandleToolStripLayout();
});
}
//浏览器标题改变
private void OnBrowserTitleChanged(object sender, TitleChangedEventArgs e)
{
this.AsyncUI(() => this.Text = e.Title);
}
//浏览器地址改变
private void OnBrowserAddressChanged(object sender, AddressChangedEventArgs e)
{
this.AsyncUI(() => this.UrlTextBox.Text = e.Address);
}
#endregion
#region 菜单栏事件
//开发者工具
private void TsmiShowDevTools_Click(object sender, EventArgs e)
{
browser.ShowDevTools();
}
//退出
private void TsmiExit_Click(object sender, EventArgs e)
{
browser.Dispose();
Cef.Shutdown();
this.Close();
}
#endregion
#region 工具栏事件
//工具栏宽度适配(依赖:this.toolStrip1.Stretch = true)
private void ToolStrip1_Layout(object sender, LayoutEventArgs e)
{
this.HandleToolStripLayout();
}
//回退
private void TsbBack_Click(object sender, EventArgs e)
{
browser.Back();
}
//向前
private void TsbForward_Click(object sender, EventArgs e)
{
browser.Forward();
}
//进入
private void TsbGoButton_Click(object sender, EventArgs e)
{
LoadUrl(this.UrlTextBox.Text);
}
//地址栏:回车加载
private void UrlTextBox_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
LoadUrl(this.UrlTextBox.Text);
}
}
#endregion
#region 自定义方法
/// <summary>
/// 重置地址栏长度(依赖:ToolStripItem.AutoSize=false)
/// </summary>
private void HandleToolStripLayout()
{
var width = toolStrip1.Width;
foreach (ToolStripItem item in toolStrip1.Items)
{
if (item != UrlTextBox)
{
width -= item.Width - item.Margin.Horizontal;
}
}
this.UrlTextBox.Width = Math.Max(0, width - UrlTextBox.Margin.Horizontal - 18);
}
/// <summary>
/// 加载网页
/// </summary>
/// <param name="url"></param>
private void LoadUrl(string url)
{
if (Uri.IsWellFormedUriString(url, UriKind.RelativeOrAbsolute))
{
browser.Load(url);
}
}
#endregion
}
}
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.redist.x64" version="92.0.25" targetFramework="net48" />
<package id="cef.redist.x86" version="92.0.25" targetFramework="net48" />
<package id="CefSharp.Common" version="92.0.251" targetFramework="net48" />
<package id="CefSharp.WinForms" version="92.0.251" targetFramework="net48" />
<package id="NPOI" version="2.5.1" targetFramework="net461" />
<package id="Portable.BouncyCastle" version="1.8.6" targetFramework="net461" />
<package id="SharpZipLib" version="1.3.2" targetFramework="net461" />
......
......@@ -47,6 +47,7 @@ namespace Tools
//-------------------------------
this.CreateModule(Tools_demos, typeof(UI.wAuditDemo), "审批示例", "tr:一个审批程序的示例"),
this.CreateModule(Tools_demos, typeof(UI.wImageSearch), "图片搜索", "tr:一个图片搜索的示例"),
this.CreateModule(Tools_demos, typeof(UI.wCefDemo), "CEF示例", "tr:Winform内嵌谷歌浏览器示例"),
};
}
......
// Copyright (c) 2008-2020 Marshall A. Greenblatt. Portions Copyright (c)
// 2006-2009 Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment