Compare commits

...

2 Commits

Author SHA1 Message Date
1548532443 update 2023-12-13 20:52:33 +08:00
b2ff15478e 更新 2023-12-13 20:51:48 +08:00
86 changed files with 1580 additions and 1889 deletions

Binary file not shown.

Binary file not shown.

View File

@ -5,28 +5,62 @@ VisualStudioVersion = 17.5.33516.290
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestWordAddIn1", "TestWordAddIn1\TestWordAddIn1.csproj", "{E12FB108-CC54-49E3-B606-872B9805F9FA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Webview2WinFormsApp", "Webview2WinFormsApp\Webview2WinFormsApp.csproj", "{283CE9EF-73B6-478A-B177-1B9174220C35}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UtilLib", "UtilLib\UtilLib.csproj", "{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Debug|ARM.ActiveCfg = Debug|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Debug|ARM.Build.0 = Debug|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Debug|ARM64.Build.0 = Debug|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Debug|x64.ActiveCfg = Debug|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Debug|x64.Build.0 = Debug|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Debug|x86.ActiveCfg = Debug|Win32
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Debug|x86.Build.0 = Debug|Win32
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Release|Any CPU.Build.0 = Release|Any CPU
{283CE9EF-73B6-478A-B177-1B9174220C35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{283CE9EF-73B6-478A-B177-1B9174220C35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{283CE9EF-73B6-478A-B177-1B9174220C35}.Release|Any CPU.ActiveCfg = Release|Any CPU
{283CE9EF-73B6-478A-B177-1B9174220C35}.Release|Any CPU.Build.0 = Release|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Release|ARM.ActiveCfg = Release|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Release|ARM.Build.0 = Release|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Release|ARM64.ActiveCfg = Release|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Release|ARM64.Build.0 = Release|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Release|x64.ActiveCfg = Release|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Release|x64.Build.0 = Release|Any CPU
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Release|x86.ActiveCfg = Release|Win32
{E12FB108-CC54-49E3-B606-872B9805F9FA}.Release|x86.Build.0 = Release|Win32
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Debug|ARM.ActiveCfg = Debug|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Debug|ARM.Build.0 = Debug|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Debug|ARM64.Build.0 = Debug|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Debug|x64.ActiveCfg = Debug|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Debug|x64.Build.0 = Debug|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Debug|x86.ActiveCfg = Debug|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Debug|x86.Build.0 = Debug|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Release|Any CPU.Build.0 = Release|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Release|ARM.ActiveCfg = Release|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Release|ARM.Build.0 = Release|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Release|ARM64.ActiveCfg = Release|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Release|ARM64.Build.0 = Release|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Release|x64.ActiveCfg = Release|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Release|x64.Build.0 = Release|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Release|x86.ActiveCfg = Release|Any CPU
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -12,11 +12,12 @@ namespace TestWordAddIn1
private readonly Color BG_NORMAL = Colors.FromHex("f9f8f8");
private readonly Color BG_HOVER = Colors.FromHex("b7dde8");
private readonly Color BG_ACTIVE = Colors.FromHex("b7dde8");
private DiffItem diffItem;
public DiffItem diffItem;
private int currentStart;
private Microsoft.Office.Tools.Word.Document document;
private Microsoft.Office.Tools.Word.Bookmark bookmark;
private bool processed = false;
private bool Selected = false;
public ProofreadItem()
{
@ -29,16 +30,27 @@ namespace TestWordAddIn1
private void ProofreadItem_MouseEnter(object sender, EventArgs e)
{
this.BackColor = BG_HOVER;
SetSelect();
Console.WriteLine("ProofreadItem_MouseEnter");
}
public void SetSelect()
{
this.BackColor = BG_HOVER;
}
public void SetNormal()
{
this.BackColor = BG_NORMAL;
}
private void ProofreadItem_MouseLeave(object sender, EventArgs e)
{
this.BackColor = BG_NORMAL;
SetNormal();
Console.WriteLine("ProofreadItem_MouseLeave");
}
public event EventHandler BookmarkClick;
private void AddBookmark(Color color)
{
int rangeStart = this.currentStart + this.diffItem.Start,
@ -56,7 +68,10 @@ namespace TestWordAddIn1
private void Bookmark_Selected(object sender, Microsoft.Office.Tools.Word.SelectionEventArgs e)
{
this.BackColor = BG_ACTIVE;
if(this.BookmarkClick != null)
{
this.BookmarkClick(this, null);
}
}
private void ProofreadItem_Click1(object sender, EventArgs e)
{
@ -70,8 +85,8 @@ namespace TestWordAddIn1
{
return;
}
this.bookmark.Select();
this.BackColor = BG_ACTIVE;
try { this.bookmark.Select(); }catch(Exception ex) { }
}
public void SetProofreadItem(DiffItem it, int start)

View File

@ -44,7 +44,7 @@ namespace TestWordAddIn1
//
this.origin.AutoSize = true;
this.origin.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.origin.Location = new System.Drawing.Point(18, 10);
this.origin.Location = new System.Drawing.Point(24, 11);
this.origin.Name = "origin";
this.origin.Size = new System.Drawing.Size(49, 20);
this.origin.TabIndex = 0;
@ -54,7 +54,7 @@ namespace TestWordAddIn1
//
this.type.AutoSize = true;
this.type.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.type.Location = new System.Drawing.Point(69, 11);
this.type.Location = new System.Drawing.Point(83, 12);
this.type.Name = "type";
this.type.Size = new System.Drawing.Size(38, 20);
this.type.TabIndex = 1;
@ -64,7 +64,7 @@ namespace TestWordAddIn1
//
this.description.AutoSize = true;
this.description.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.description.Location = new System.Drawing.Point(12, 36);
this.description.Location = new System.Drawing.Point(18, 43);
this.description.Name = "description";
this.description.Size = new System.Drawing.Size(84, 20);
this.description.TabIndex = 2;
@ -75,7 +75,7 @@ namespace TestWordAddIn1
this.btnAccept.BackgroundImage = global::TestWordAddIn1.Properties.Resources.check;
this.btnAccept.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnAccept.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnAccept.Location = new System.Drawing.Point(222, 13);
this.btnAccept.Location = new System.Drawing.Point(210, 13);
this.btnAccept.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.btnAccept.Name = "btnAccept";
this.btnAccept.Size = new System.Drawing.Size(26, 26);
@ -88,7 +88,7 @@ namespace TestWordAddIn1
this.btnIgnore.BackgroundImage = global::TestWordAddIn1.Properties.Resources.minus_bold;
this.btnIgnore.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.btnIgnore.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnIgnore.Location = new System.Drawing.Point(258, 13);
this.btnIgnore.Location = new System.Drawing.Point(253, 13);
this.btnIgnore.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.btnIgnore.Name = "btnIgnore";
this.btnIgnore.Size = new System.Drawing.Size(26, 26);
@ -101,14 +101,14 @@ namespace TestWordAddIn1
this.typePanel.BackColor = System.Drawing.Color.Black;
this.typePanel.Location = new System.Drawing.Point(0, 0);
this.typePanel.Name = "typePanel";
this.typePanel.Size = new System.Drawing.Size(4, 70);
this.typePanel.Size = new System.Drawing.Size(4, 80);
this.typePanel.TabIndex = 5;
//
// processStatus
//
this.processStatus.AutoSize = true;
this.processStatus.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.processStatus.Location = new System.Drawing.Point(222, 18);
this.processStatus.Location = new System.Drawing.Point(210, 18);
this.processStatus.Name = "processStatus";
this.processStatus.Size = new System.Drawing.Size(50, 20);
this.processStatus.TabIndex = 6;
@ -119,6 +119,7 @@ namespace TestWordAddIn1
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.WhiteSmoke;
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.Controls.Add(this.processStatus);
this.Controls.Add(this.typePanel);
this.Controls.Add(this.btnIgnore);
@ -128,7 +129,7 @@ namespace TestWordAddIn1
this.Controls.Add(this.origin);
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "ProofreadItem";
this.Size = new System.Drawing.Size(300, 70);
this.Size = new System.Drawing.Size(298, 78);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -35,6 +35,7 @@
// button1
//
this.button1.BackColor = System.Drawing.SystemColors.HotTrack;
this.button1.Cursor = System.Windows.Forms.Cursors.Hand;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.ForeColor = System.Drawing.Color.White;
this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;

View File

@ -21,7 +21,7 @@ namespace TestWordAddIn1
{
private CoreWebView2Environment env;
private readonly int ItemHeight = 75;
private readonly int ItemHeight = 80;
private readonly List<ProofreadItem> Items = new List<ProofreadItem>();
public ProofreadPanel()
{
@ -115,17 +115,30 @@ namespace TestWordAddIn1
ProofreadItem item = new ProofreadItem();
item.SetProofreadItem(it, correct.Offset);
Items.Add(item);
if (it.Tag == "d")
{
var curg = doc.Range(correct.Offset + it.Start, correct.Offset + it.End);
// 设置玄宗效果
}
item.Location = new System.Drawing.Point(10, (ItemHeight + 10) * index);
item.Click += Item_Click;
item.BookmarkClick += Item_Click;
item.Location = new System.Drawing.Point(0, (ItemHeight + 10) * index);
panel1.Controls.Add(item);
index++;
}
}
}
}
private void Item_Click(object sender, EventArgs e)
{
ProofreadItem item = (ProofreadItem)sender;
foreach (var it in Items)
{
if(it == item)
{
it.SetSelect();
}
else
{
it.SetNormal();
}
}
}
}
}

View File

@ -1 +1 @@
487d1bb5458f1f46fd33ce520a82e0b8d2655794
a3ad00bd0ddb575174c8895e1aaa2c9990d59410

View File

@ -12,3 +12,20 @@ C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Release\TestWor
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Release\TestWordAddIn1.csproj.CopyComplete
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Release\TestWordAddIn1.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Release\TestWordAddIn1.pdb
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\runtimes\win-x86\native\WebView2Loader.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\runtimes\win-x64\native\WebView2Loader.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\runtimes\win-arm64\native\WebView2Loader.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\web\index.html
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\Microsoft.Web.WebView2.Core.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\Microsoft.Web.WebView2.WinForms.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\Microsoft.Web.WebView2.Wpf.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\Newtonsoft.Json.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\UtilLib.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\UtilLib.pdb
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\UtilLib.dll.config
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\Microsoft.Web.WebView2.Core.xml
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\Microsoft.Web.WebView2.WinForms.xml
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\Microsoft.Web.WebView2.Wpf.xml
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\Newtonsoft.Json.xml
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Release\TestWordAddIn1.ProofreadItem.resources
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Release\TestWordAddIn1.ProofreadPanel.resources

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]

View File

@ -0,0 +1 @@
3f222d0b1a955228eb96992979b1394ce44aaaea

View File

@ -0,0 +1,10 @@
C:\Users\home-dev\source\repos\TestWordAddIn1\UtilLib\bin\Release\UtilLib.dll.config
C:\Users\home-dev\source\repos\TestWordAddIn1\UtilLib\bin\Release\UtilLib.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\UtilLib\bin\Release\UtilLib.pdb
C:\Users\home-dev\source\repos\TestWordAddIn1\UtilLib\bin\Release\Newtonsoft.Json.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\UtilLib\bin\Release\Newtonsoft.Json.xml
C:\Users\home-dev\source\repos\TestWordAddIn1\UtilLib\obj\Release\UtilLib.csproj.AssemblyReference.cache
C:\Users\home-dev\source\repos\TestWordAddIn1\UtilLib\obj\Release\UtilLib.csproj.CoreCompileInputs.cache
C:\Users\home-dev\source\repos\TestWordAddIn1\UtilLib\obj\Release\UtilLib.csproj.CopyComplete
C:\Users\home-dev\source\repos\TestWordAddIn1\UtilLib\obj\Release\UtilLib.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\UtilLib\obj\Release\UtilLib.pdb

Binary file not shown.

Binary file not shown.

View File

@ -1,119 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
//using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace Webview2WinFormsApp
{
class AutoAdaptWindowsSize //窗口缩放对象
{
double formOriginalWidth;//窗体高度原始宽度
double formOriginalHeight;//窗体原始
double scaleX;//水平缩放比例
double scaleY;//垂直缩放比例
readonly Dictionary<string, string> ControlsInfo = new Dictionary<string, string>();//控件中心Left,Top,控件Width,控件Height,控件字体Size
private Form _form;
Panel Win_Panel1 = new Panel();
public AutoAdaptWindowsSize(Form form)
{
_form = form;
//代码生成一个容器panel1添加至窗体
_form.Controls.Add(Win_Panel1);
Win_Panel1.BorderStyle = BorderStyle.None; //容器border样式
Win_Panel1.Dock = DockStyle.Fill; //设置填充,下面添加控件至容器完成后,容器会填充窗口
Win_Panel1.BackColor = Color.Transparent; // 这里默认的背景颜色是form的背景颜色如果form页面时图片需要将这里的颜色设置成透明否则会被覆盖。
//将窗体所有控件添加至panel1
while (_form.Controls[0].Name.Trim() != "")
{
foreach (Control item in _form.Controls)
{
if (item.Name.Trim() != "" && item.Name.Trim() != Win_Panel1.Name.Trim())
{
Win_Panel1.Controls.Add(item);
}
}
}
//保存窗体和控件初始大小
InitControlsInfo(Win_Panel1);
}
public void InitControlsInfo(Control ctrlContainer)
{
if (ctrlContainer.Parent == _form)//获取窗体的高度和宽度
{
formOriginalWidth = Convert.ToDouble(ctrlContainer.Width);
formOriginalHeight = Convert.ToDouble(ctrlContainer.Height);
}
foreach (Control item in ctrlContainer.Controls)
{
if (item.Name.Trim() != "")
{
//添加信息:键值:控件名,内容:据左边距离,距顶部距离,控件宽度,控件高度,控件字体。
ControlsInfo.Add(item.Name, (item.Left + item.Width / 2) + "," + (item.Top + item.Height / 2) + "," + item.Width + "," + item.Height + "," + item.Font.Size);
}
if ((item as UserControl) == null && item.Controls.Count > 0)
{
InitControlsInfo(item);
}
}
}
public void FormSizeChanged()
{
try
{
if (ControlsInfo.Count > 0)//如果字典中有数据,即窗体改变
{
ControlsZoomScale(Win_Panel1);//表示pannel控件
ControlsChange(Win_Panel1);
}
}
catch { }
}
private void ControlsZoomScale(Control ctrlContainer)
{
scaleX = (Convert.ToDouble(ctrlContainer.Width) / formOriginalWidth);
scaleY = (Convert.ToDouble(ctrlContainer.Height) / formOriginalHeight);
}
// 改变控件大小
private void ControlsChange(Control ctrlContainer)
{
double[] pos = new double[5];//pos数组保存当前控件中心Left,Top,控件Width,控件Height,控件字体Size
foreach (Control item in ctrlContainer.Controls)//遍历控件
{
if (item.Name.Trim() != "")//如果控件名不是空,则执行
{
if ((item as UserControl) == null && item.Controls.Count > 0)//如果不是自定义控件
{
ControlsChange(item);//循环执行
}
string[] strs = ControlsInfo[item.Name].Split(',');//从字典中查出的数据,以‘,’分割成字符串组
for (int i = 0; i < 5; i++)
{
pos[i] = Convert.ToDouble(strs[i]);//添加到临时数组
}
double itemWidth = pos[2] * scaleX; //计算控件宽度double类型
double itemHeight = pos[3] * scaleY; //计算控件高度
item.Left = Convert.ToInt32(pos[0] * scaleX - itemWidth / 2);//计算控件距离左边距离
item.Top = Convert.ToInt32(pos[1] * scaleY - itemHeight / 2);//计算控件距离顶部距离
item.Width = Convert.ToInt32(itemWidth);//控件宽度int类型
item.Height = Convert.ToInt32(itemHeight);//控件高度
if (float.Parse((pos[4] * Math.Min(scaleX, scaleY)).ToString()) != 0) //缩放字体大小不能为0
{ item.Font = new Font(item.Font.Name, float.Parse((pos[4] * Math.Min(scaleX, scaleY)).ToString())); } //字体
}
}
}
}
}

View File

@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Webview2WinFormsApp
{
public class Bridge
{
public void Test()
{
System.Windows.Forms.MessageBox.Show("Webview2WinFormsApp.Bridge.Test()!");
}
}
}

View File

@ -1,106 +0,0 @@
namespace Webview2WinFormsApp
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
webView21 = new Microsoft.Web.WebView2.WinForms.WebView2();
menuStrip1 = new MenuStrip();
ToolStripMenuItem = new ToolStripMenuItem();
ToolStripMenuItem = new ToolStripMenuItem();
ToolStripMenuItem = new ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)webView21).BeginInit();
menuStrip1.SuspendLayout();
SuspendLayout();
//
// webView21
//
webView21.AllowExternalDrop = true;
webView21.CreationProperties = null;
webView21.DefaultBackgroundColor = Color.White;
webView21.Dock = DockStyle.Fill;
webView21.Location = new Point(0, 25);
webView21.Name = "webView21";
webView21.Size = new Size(998, 600);
webView21.TabIndex = 0;
webView21.ZoomFactor = 1D;
webView21.CoreWebView2InitializationCompleted += webView21_CoreWebView2InitializationCompleted;
//
// menuStrip1
//
menuStrip1.Items.AddRange(new ToolStripItem[] { ToolStripMenuItem, ToolStripMenuItem, ToolStripMenuItem });
menuStrip1.Location = new Point(0, 0);
menuStrip1.Name = "menuStrip1";
menuStrip1.Size = new Size(998, 25);
menuStrip1.TabIndex = 1;
menuStrip1.Text = "menuStrip1";
//
// 文件ToolStripMenuItem
//
ToolStripMenuItem.Name = "文件ToolStripMenuItem";
ToolStripMenuItem.Size = new Size(44, 21);
ToolStripMenuItem.Text = "文件";
//
// 编辑ToolStripMenuItem
//
ToolStripMenuItem.Name = "编辑ToolStripMenuItem";
ToolStripMenuItem.Size = new Size(44, 21);
ToolStripMenuItem.Text = "编辑";
//
// 视图ToolStripMenuItem
//
ToolStripMenuItem.Name = "视图ToolStripMenuItem";
ToolStripMenuItem.Size = new Size(44, 21);
ToolStripMenuItem.Text = "视图";
//
// Form1
//
AutoScaleDimensions = new SizeF(7F, 17F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(998, 625);
Controls.Add(webView21);
Controls.Add(menuStrip1);
MainMenuStrip = menuStrip1;
Name = "Form1";
Text = "Form1";
Load += Form1_Load;
((System.ComponentModel.ISupportInitialize)webView21).EndInit();
menuStrip1.ResumeLayout(false);
menuStrip1.PerformLayout();
ResumeLayout(false);
PerformLayout();
}
#endregion
private Microsoft.Web.WebView2.WinForms.WebView2 webView21;
private MenuStrip menuStrip1;
private ToolStripMenuItem ToolStripMenuItem;
private ToolStripMenuItem ToolStripMenuItem;
private ToolStripMenuItem ToolStripMenuItem;
}
}

View File

@ -1,41 +0,0 @@
namespace Webview2WinFormsApp
{
public partial class Form1 : Form
{
/// <summary>
/// https://www.bilibili.com/read/cv23844020/
/// </summary>
private AutoAdaptWindowsSize autoSize;
public Form1()
{
InitializeComponent();
autoSize = new AutoAdaptWindowsSize(this);
this.SizeChanged += Form1_SizeChanged;
}
private void Form1_SizeChanged(object? sender, EventArgs e)
{
if (autoSize != null) // 一定加这个判断电脑缩放布局不是100%的时候,会报错
{
autoSize.FormSizeChanged();
}
}
private void Form1_Load(object sender, EventArgs e)
{
webView21.Source = new Uri(AppDomain.CurrentDomain.BaseDirectory + "\\web\\index.html");
}
private void webView21_CoreWebView2InitializationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs e)
{
if (e.IsSuccess)
{
Console.WriteLine("webView21_CoreWebView2InitializationCompleted");
var bridge = new Bridge();
//
webView21.CoreWebView2.AddHostObjectToScript("bridge", bridge);
webView21.Source = new Uri(AppDomain.CurrentDomain.BaseDirectory + "\\web\\index.html");
}
}
}
}

View File

@ -1,123 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -1,61 +0,0 @@
namespace Webview2WinFormsApp
{
partial class Form2
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
panel1 = new Panel();
SuspendLayout();
//
// panel1
//
panel1.AutoScroll = true;
panel1.Dock = DockStyle.Fill;
panel1.Location = new Point(0, 0);
panel1.Name = "panel1";
panel1.Padding = new Padding(10);
panel1.Size = new Size(878, 699);
panel1.TabIndex = 0;
//
// Form2
//
AutoScaleDimensions = new SizeF(7F, 17F);
AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.White;
ClientSize = new Size(878, 699);
Controls.Add(panel1);
Name = "Form2";
Text = "Form2";
Load += Form2_Load;
ResumeLayout(false);
}
#endregion
private Panel panel1;
}
}

View File

@ -1,46 +0,0 @@
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 UtilLib;
namespace Webview2WinFormsApp
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private readonly int ItemHeight = 90;
private readonly List<ProofreadItem> Items = new List<ProofreadItem>();
private void Form2_Load(object sender, EventArgs e)
{
panel1.AutoScroll = true;
var result = API.GetProofreadResult();
int index = 0;
foreach (var correct in result.CorrectedSet)
{
if (correct.Diffs != null)
{
foreach (var it in correct.Diffs)
{
ProofreadItem item = new ProofreadItem();
item.SetProofreadItem(it);
Items.Add(item);
item.Location = new Point(10, (ItemHeight + 10) * index);
panel1.Controls.Add(item);
index++;
}
}
}
}
}
}

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,70 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TestWordAddIn1
{
internal class Model
{
}
internal class DiffItem
{
}
internal class Correct
{
public string Key { get; set; }
public int Offset { get; set; }
public string New_text { get; set; }
public string Insert { get; set; }
public int Insert_len { get; set; }
public List<DiffItem> Diffs { get; set; }
}
internal class ProofreadResult
{
public object AbnormalCount { get; set; }
public List<Correct> CorrectedSet { get; set; }
public object History { get; set; }
/*
"id": 1326,
"isBlackWord": true,
"isOrigin": 2,
"isWhiteWord": true,
"name": "失业在家的日子-最新",
"status": 3
*/
public int Id { get; set; }
public bool IsBlackWord { get; set; }
public int IsOrigin { get; set; }
public bool IsWhiteWord { get; set; }
public int Status { get; set; }
public string Name { get; set; }
}
internal class Response<T>
{
public int Code { get; set; }
public string Msg { get; set; }
public T Data { get; set; }
}
internal class WebActionMessage
{
public WebActionMessage()
{ }
public WebActionMessage(string action, object data)
{
Action = action;
Data = data;
}
public string Action { get; set; }
public object Data { get; set; }
}
}

View File

@ -1,17 +0,0 @@
namespace Webview2WinFormsApp
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new Form2());
}
}
}

View File

@ -1,115 +0,0 @@
namespace Webview2WinFormsApp
{
partial class ProofreadItem
{
/// <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
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
origin = new Label();
type = new Label();
description = new Label();
button1 = new Button();
button2 = new Button();
SuspendLayout();
//
// origin
//
origin.AutoSize = true;
origin.Location = new Point(21, 17);
origin.Name = "origin";
origin.Size = new Size(42, 17);
origin.TabIndex = 0;
origin.Text = "origin";
//
// type
//
type.AutoSize = true;
type.Location = new Point(80, 18);
type.Name = "type";
type.Size = new Size(33, 17);
type.TabIndex = 1;
type.Text = "type";
//
// description
//
description.AutoSize = true;
description.Location = new Point(14, 48);
description.Name = "description";
description.Size = new Size(73, 17);
description.TabIndex = 2;
description.Text = "description";
//
// button1
//
button1.BackgroundImage = Properties.Resources.check;
button1.BackgroundImageLayout = ImageLayout.Stretch;
button1.Cursor = Cursors.Hand;
button1.Location = new Point(269, 18);
button1.Name = "button1";
button1.Size = new Size(26, 26);
button1.TabIndex = 3;
button1.UseVisualStyleBackColor = true;
//
// button2
//
button2.BackgroundImage = Properties.Resources.minus_bold;
button2.BackgroundImageLayout = ImageLayout.Stretch;
button2.Cursor = Cursors.Hand;
button2.Location = new Point(301, 18);
button2.Name = "button2";
button2.Size = new Size(26, 26);
button2.TabIndex = 4;
button2.UseVisualStyleBackColor = true;
//
// ProofreadItem
//
AutoScaleDimensions = new SizeF(7F, 17F);
AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.WhiteSmoke;
Controls.Add(button2);
Controls.Add(button1);
Controls.Add(description);
Controls.Add(type);
Controls.Add(origin);
Name = "ProofreadItem";
Size = new Size(350, 90);
Load += ProofreadItem_Load;
Click += ProofreadItem_Click;
MouseEnter += ProofreadItem_MouseEnter;
MouseLeave += ProofreadItem_MouseLeave;
ResumeLayout(false);
PerformLayout();
}
#endregion
private Label origin;
private Label type;
private Label description;
private Button button1;
private Button button2;
}
}

View File

@ -1,82 +0,0 @@
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 UtilLib;
namespace Webview2WinFormsApp
{
public partial class ProofreadItem : UserControl
{
private readonly Color BG_NORMAL = Color.WhiteSmoke;
private readonly Color BG_HOVER = Color.AliceBlue;
private readonly Color BG_ACTIVE = Color.AliceBlue;
public ProofreadItem()
{
InitializeComponent();
this.BackColor = BG_NORMAL;
}
private void ProofreadItem_MouseEnter(object sender, EventArgs e)
{
this.BackColor = BG_HOVER;
Console.WriteLine("ProofreadItem_MouseEnter");
}
private void ProofreadItem_MouseLeave(object sender, EventArgs e)
{
this.BackColor = BG_NORMAL;
Console.WriteLine("ProofreadItem_MouseLeave");
}
private void ProofreadItem_Click(object sender, EventArgs e)
{
this.BackColor = BG_ACTIVE;
Console.WriteLine("ProofreadItem_Click");
}
public void SetProofreadItem(DiffItem it)
{
var typeConfig = TypeConfig.Get(it.Type);
type.Text = typeConfig.Text;
type.Visible = false;
if (it.Type == ProofreadType.blackWord
|| it.Type == ProofreadType.blackWordBlock
|| it.Type == ProofreadType.sensitive)
{
description.Text = "【敏感词】建议查看";
}
else
{
if (it.Tag == "r")
{
origin.Text = it.Origin + ">" + it.Text;
description.Text = string.Format("【{0}】建议选用“{1}”", typeConfig.Text, it.Text);
}
else if (it.Tag == "i")
{
origin.Text = it.Text + " 新增";
description.Text = string.Format("【{0}】建议新增", typeConfig.Text);
}
else
{
origin.Text = it.Origin + " 删除";
description.Text = string.Format("【{0}】建议删除", typeConfig.Text);
}
}
}
private void ProofreadItem_Load(object sender, EventArgs e)
{
}
}
}

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,83 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Webview2WinFormsApp.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Webview2WinFormsApp.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap check {
get {
object obj = ResourceManager.GetObject("check", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap minus_bold {
get {
object obj = ResourceManager.GetObject("minus-bold", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@ -1,127 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="check" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\check.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="minus-bold" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\minus-bold.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 B

View File

@ -1,44 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<None Remove="web\index.html" />
</ItemGroup>
<ItemGroup>
<Content Include="web\index.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2151.40" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\UtilLib\UtilLib.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Compile Update="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="Form2.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="ProofreadItem.cs">
<SubType>UserControl</SubType>
</Compile>
</ItemGroup>
</Project>

View File

@ -1,25 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Webview2WinFormsApp")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Webview2WinFormsApp")]
[assembly: System.Reflection.AssemblyTitleAttribute("Webview2WinFormsApp")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// 由 MSBuild WriteCodeFragment 类生成。

View File

@ -1 +0,0 @@
1a63871452e65bc94ef13afede3643178c1c9f7d

View File

@ -1,17 +0,0 @@
is_global = true
build_property.ApplicationManifest =
build_property.StartupObject =
build_property.ApplicationDefaultFont =
build_property.ApplicationHighDpiMode =
build_property.ApplicationUseCompatibleTextRendering =
build_property.ApplicationVisualStyles =
build_property.TargetFramework = net6.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Webview2WinFormsApp
build_property.ProjectDir = C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\

View File

@ -1,10 +0,0 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.Drawing;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;
global using global::System.Windows.Forms;

View File

@ -1 +0,0 @@
4cd1f286d0017333667f4d97371733f92f4cbe53

View File

@ -1,33 +0,0 @@
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\runtimes\win-x86\native\WebView2Loader.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\runtimes\win-x64\native\WebView2Loader.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\runtimes\win-arm64\native\WebView2Loader.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\Webview2WinFormsApp.exe
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\web\index.html
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\Webview2WinFormsApp.deps.json
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\Webview2WinFormsApp.runtimeconfig.json
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\Webview2WinFormsApp.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\Webview2WinFormsApp.pdb
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\Microsoft.Web.WebView2.Core.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\Microsoft.Web.WebView2.WinForms.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\Microsoft.Web.WebView2.Wpf.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\Webview2WinFormsApp.csproj.AssemblyReference.cache
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\Webview2WinFormsApp.Form1.resources
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\Webview2WinFormsApp.csproj.GenerateResource.cache
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\Webview2WinFormsApp.GeneratedMSBuildEditorConfig.editorconfig
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\Webview2WinFormsApp.AssemblyInfoInputs.cache
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\Webview2WinFormsApp.AssemblyInfo.cs
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\Webview2WinFormsApp.csproj.CoreCompileInputs.cache
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\Webview2WinFormsApp.csproj.CopyComplete
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\Webview2WinFormsApp.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\refint\Webview2WinFormsApp.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\Webview2WinFormsApp.pdb
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\Webview2WinFormsApp.genruntimeconfig.cache
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\ref\Webview2WinFormsApp.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\Webview2WinFormsApp.Form2.resources
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\Webview2WinFormsApp.ProofreadItem.resources
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\UtilLib.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\Newtonsoft.Json.dll
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\UtilLib.pdb
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\UtilLib.dll.config
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\bin\Debug\net6.0-windows\Newtonsoft.Json.xml
C:\Users\home-dev\source\repos\TestWordAddIn1\Webview2WinFormsApp\obj\Debug\net6.0-windows\Webview2WinFormsApp.Properties.Resources.resources

View File

@ -1,53 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"Microsoft.Web.WebView2/1.0.2151.40": {
"runtime": {
"lib/netcoreapp3.0/Microsoft.Web.WebView2.Core.dll": {
"assemblyVersion": "1.0.2151.40",
"fileVersion": "1.0.2151.40"
},
"lib/netcoreapp3.0/Microsoft.Web.WebView2.WinForms.dll": {
"assemblyVersion": "1.0.2151.40",
"fileVersion": "1.0.2151.40"
},
"lib/netcoreapp3.0/Microsoft.Web.WebView2.Wpf.dll": {
"assemblyVersion": "1.0.2151.40",
"fileVersion": "1.0.2151.40"
}
},
"runtimeTargets": {
"runtimes/win-arm64/native/WebView2Loader.dll": {
"rid": "win-arm64",
"assetType": "native",
"fileVersion": "1.0.2151.40"
},
"runtimes/win-x64/native/WebView2Loader.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "1.0.2151.40"
},
"runtimes/win-x86/native/WebView2Loader.dll": {
"rid": "win-x86",
"assetType": "native",
"fileVersion": "1.0.2151.40"
}
}
}
}
},
"libraries": {
"Microsoft.Web.WebView2/1.0.2151.40": {
"type": "package",
"serviceable": true,
"sha512": "sha512-OPWjZVJvYhDm4Jq+7QdsQfEgv2QHrkaqUkdk4i9FahatsOJ4cIaVLfnDHGsKjcxGqCVX+Lo4mi4Lqh5hcgfsdw==",
"path": "microsoft.web.webview2/1.0.2151.40",
"hashPath": "microsoft.web.webview2.1.0.2151.40.nupkg.sha512"
}
}
}

View File

@ -1,23 +0,0 @@
{
"runtimeOptions": {
"tfm": "net6.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
},
{
"name": "Microsoft.WindowsDesktop.App",
"version": "6.0.0"
}
],
"additionalProbingPaths": [
"C:\\Users\\home-dev\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\home-dev\\.nuget\\packages",
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configProperties": {
"Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true
}
}
}

View File

@ -1 +0,0 @@
f35f4eea98af1b290b9a74644878e14f5712b444

View File

@ -1,95 +0,0 @@
{
"format": 1,
"restore": {
"C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\Webview2WinFormsApp\\Webview2WinFormsApp.csproj": {}
},
"projects": {
"C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\UtilLib\\UtilLib.csproj": {
"restore": {
"projectUniqueName": "C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\UtilLib\\UtilLib.csproj",
"projectName": "UtilLib",
"projectPath": "C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\UtilLib\\UtilLib.csproj",
"frameworks": {
"net462": {
"projectReferences": {}
}
}
},
"frameworks": {
"net462": {}
}
},
"C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\Webview2WinFormsApp\\Webview2WinFormsApp.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\Webview2WinFormsApp\\Webview2WinFormsApp.csproj",
"projectName": "Webview2WinFormsApp",
"projectPath": "C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\Webview2WinFormsApp\\Webview2WinFormsApp.csproj",
"packagesPath": "C:\\Users\\home-dev\\.nuget\\packages\\",
"outputPath": "C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\Webview2WinFormsApp\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\home-dev\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net6.0-windows"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0-windows7.0": {
"targetAlias": "net6.0-windows",
"projectReferences": {
"C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\UtilLib\\UtilLib.csproj": {
"projectPath": "C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\UtilLib\\UtilLib.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net6.0-windows7.0": {
"targetAlias": "net6.0-windows",
"dependencies": {
"Microsoft.Web.WebView2": {
"target": "Package",
"version": "[1.0.2151.40, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
},
"Microsoft.WindowsDesktop.App.WindowsForms": {
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.403\\RuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\home-dev\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.7.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\home-dev\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<PkgMicrosoft_Web_WebView2 Condition=" '$(PkgMicrosoft_Web_WebView2)' == '' ">C:\Users\home-dev\.nuget\packages\microsoft.web.webview2\1.0.2151.40</PkgMicrosoft_Web_WebView2>
</PropertyGroup>
</Project>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.web.webview2\1.0.2151.40\build\Microsoft.Web.WebView2.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.web.webview2\1.0.2151.40\build\Microsoft.Web.WebView2.targets')" />
</ImportGroup>
</Project>

View File

@ -1,239 +0,0 @@
{
"version": 3,
"targets": {
"net6.0-windows7.0": {
"Microsoft.Web.WebView2/1.0.2151.40": {
"type": "package",
"compile": {
"lib/netcoreapp3.0/Microsoft.Web.WebView2.Core.dll": {
"related": ".xml"
},
"lib/netcoreapp3.0/Microsoft.Web.WebView2.WinForms.dll": {
"related": ".xml"
},
"lib/netcoreapp3.0/Microsoft.Web.WebView2.Wpf.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/netcoreapp3.0/Microsoft.Web.WebView2.Core.dll": {
"related": ".xml"
},
"lib/netcoreapp3.0/Microsoft.Web.WebView2.WinForms.dll": {
"related": ".xml"
},
"lib/netcoreapp3.0/Microsoft.Web.WebView2.Wpf.dll": {
"related": ".xml"
}
},
"build": {
"build/Microsoft.Web.WebView2.targets": {}
},
"runtimeTargets": {
"runtimes/win-arm64/native/WebView2Loader.dll": {
"assetType": "native",
"rid": "win-arm64"
},
"runtimes/win-x64/native/WebView2Loader.dll": {
"assetType": "native",
"rid": "win-x64"
},
"runtimes/win-x86/native/WebView2Loader.dll": {
"assetType": "native",
"rid": "win-x86"
}
}
},
"UtilLib/1.0.0": {
"type": "project",
"compile": {
"bin/placeholder/UtilLib.dll": {}
},
"runtime": {
"bin/placeholder/UtilLib.dll": {}
}
}
}
},
"libraries": {
"Microsoft.Web.WebView2/1.0.2151.40": {
"sha512": "OPWjZVJvYhDm4Jq+7QdsQfEgv2QHrkaqUkdk4i9FahatsOJ4cIaVLfnDHGsKjcxGqCVX+Lo4mi4Lqh5hcgfsdw==",
"type": "package",
"path": "microsoft.web.webview2/1.0.2151.40",
"hasTools": true,
"files": [
".nupkg.metadata",
".signature.p7s",
"LICENSE.txt",
"NOTICE.txt",
"WebView2.idl",
"WebView2.tlb",
"build/Common.targets",
"build/Microsoft.Web.WebView2.targets",
"build/WebView2Rules.Project.xml",
"build/native/Microsoft.Web.WebView2.targets",
"build/native/arm64/WebView2Loader.dll",
"build/native/arm64/WebView2Loader.dll.lib",
"build/native/arm64/WebView2LoaderStatic.lib",
"build/native/include-winrt/WebView2Interop.h",
"build/native/include-winrt/WebView2Interop.idl",
"build/native/include-winrt/WebView2Interop.tlb",
"build/native/include/WebView2.h",
"build/native/include/WebView2EnvironmentOptions.h",
"build/native/x64/WebView2Loader.dll",
"build/native/x64/WebView2Loader.dll.lib",
"build/native/x64/WebView2LoaderStatic.lib",
"build/native/x86/WebView2Loader.dll",
"build/native/x86/WebView2Loader.dll.lib",
"build/native/x86/WebView2LoaderStatic.lib",
"build/wv2winrt.targets",
"lib/Microsoft.Web.WebView2.Core.winmd",
"lib/net45/Microsoft.Web.WebView2.Core.dll",
"lib/net45/Microsoft.Web.WebView2.Core.xml",
"lib/net45/Microsoft.Web.WebView2.WinForms.dll",
"lib/net45/Microsoft.Web.WebView2.WinForms.xml",
"lib/net45/Microsoft.Web.WebView2.Wpf.dll",
"lib/net45/Microsoft.Web.WebView2.Wpf.xml",
"lib/netcoreapp3.0/Microsoft.Web.WebView2.Core.dll",
"lib/netcoreapp3.0/Microsoft.Web.WebView2.Core.xml",
"lib/netcoreapp3.0/Microsoft.Web.WebView2.WinForms.dll",
"lib/netcoreapp3.0/Microsoft.Web.WebView2.WinForms.xml",
"lib/netcoreapp3.0/Microsoft.Web.WebView2.Wpf.dll",
"lib/netcoreapp3.0/Microsoft.Web.WebView2.Wpf.xml",
"microsoft.web.webview2.1.0.2151.40.nupkg.sha512",
"microsoft.web.webview2.nuspec",
"runtimes/win-arm64/native/WebView2Loader.dll",
"runtimes/win-arm64/native_uap/Microsoft.Web.WebView2.Core.dll",
"runtimes/win-x64/native/WebView2Loader.dll",
"runtimes/win-x64/native_uap/Microsoft.Web.WebView2.Core.dll",
"runtimes/win-x86/native/WebView2Loader.dll",
"runtimes/win-x86/native_uap/Microsoft.Web.WebView2.Core.dll",
"tools/VisualStudioToolsManifest.xml",
"tools/wv2winrt/Antlr3.Runtime.dll",
"tools/wv2winrt/Antlr4.StringTemplate.dll",
"tools/wv2winrt/System.Buffers.dll",
"tools/wv2winrt/System.CommandLine.DragonFruit.dll",
"tools/wv2winrt/System.CommandLine.Rendering.dll",
"tools/wv2winrt/System.CommandLine.dll",
"tools/wv2winrt/System.Memory.dll",
"tools/wv2winrt/System.Numerics.Vectors.dll",
"tools/wv2winrt/System.Runtime.CompilerServices.Unsafe.dll",
"tools/wv2winrt/codegen_util.dll",
"tools/wv2winrt/concrt140_app.dll",
"tools/wv2winrt/cs/System.CommandLine.resources.dll",
"tools/wv2winrt/de/System.CommandLine.resources.dll",
"tools/wv2winrt/es/System.CommandLine.resources.dll",
"tools/wv2winrt/fr/System.CommandLine.resources.dll",
"tools/wv2winrt/it/System.CommandLine.resources.dll",
"tools/wv2winrt/ja/System.CommandLine.resources.dll",
"tools/wv2winrt/ko/System.CommandLine.resources.dll",
"tools/wv2winrt/msvcp140_1_app.dll",
"tools/wv2winrt/msvcp140_2_app.dll",
"tools/wv2winrt/msvcp140_app.dll",
"tools/wv2winrt/pl/System.CommandLine.resources.dll",
"tools/wv2winrt/pt-BR/System.CommandLine.resources.dll",
"tools/wv2winrt/ru/System.CommandLine.resources.dll",
"tools/wv2winrt/tr/System.CommandLine.resources.dll",
"tools/wv2winrt/type_hierarchy.dll",
"tools/wv2winrt/vcamp140_app.dll",
"tools/wv2winrt/vccorlib140_app.dll",
"tools/wv2winrt/vcomp140_app.dll",
"tools/wv2winrt/vcruntime140_app.dll",
"tools/wv2winrt/winrt_winmd.dll",
"tools/wv2winrt/winrt_winmd.winmd",
"tools/wv2winrt/wv2winrt.exe",
"tools/wv2winrt/wv2winrt.exe.config",
"tools/wv2winrt/wv2winrt.xml",
"tools/wv2winrt/zh-Hans/System.CommandLine.resources.dll",
"tools/wv2winrt/zh-Hant/System.CommandLine.resources.dll"
]
},
"UtilLib/1.0.0": {
"type": "project",
"path": "../UtilLib/UtilLib.csproj",
"msbuildProject": "../UtilLib/UtilLib.csproj"
}
},
"projectFileDependencyGroups": {
"net6.0-windows7.0": [
"Microsoft.Web.WebView2 >= 1.0.2151.40",
"UtilLib >= 1.0.0"
]
},
"packageFolders": {
"C:\\Users\\home-dev\\.nuget\\packages\\": {},
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\Webview2WinFormsApp\\Webview2WinFormsApp.csproj",
"projectName": "Webview2WinFormsApp",
"projectPath": "C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\Webview2WinFormsApp\\Webview2WinFormsApp.csproj",
"packagesPath": "C:\\Users\\home-dev\\.nuget\\packages\\",
"outputPath": "C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\Webview2WinFormsApp\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\home-dev\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net6.0-windows"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0-windows7.0": {
"targetAlias": "net6.0-windows",
"projectReferences": {
"C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\UtilLib\\UtilLib.csproj": {
"projectPath": "C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\UtilLib\\UtilLib.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net6.0-windows7.0": {
"targetAlias": "net6.0-windows",
"dependencies": {
"Microsoft.Web.WebView2": {
"target": "Package",
"version": "[1.0.2151.40, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
},
"Microsoft.WindowsDesktop.App.WindowsForms": {
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.403\\RuntimeIdentifierGraph.json"
}
}
}
}

View File

@ -1,10 +0,0 @@
{
"version": 2,
"dgSpecHash": "VbcSSxKHafFhICMk5dWbDm0xV6C//86LQfN+t+JNJ5vTAAFzqkvWphTqxcpwoKnph6ZvpsnWqJ0UPmP5K+Yrdw==",
"success": true,
"projectFilePath": "C:\\Users\\home-dev\\source\\repos\\TestWordAddIn1\\Webview2WinFormsApp\\Webview2WinFormsApp.csproj",
"expectedPackageFiles": [
"C:\\Users\\home-dev\\.nuget\\packages\\microsoft.web.webview2\\1.0.2151.40\\microsoft.web.webview2.1.0.2151.40.nupkg.sha512"
],
"logs": []
}

View File

@ -1,24 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>test</title>
</head>
<body>
<button onclick="sendToBehavior()">xxx</button>
<button onclick="testBridge()">testBridge</button>
<script>
function sendToBehavior() {
window.postMessage(JSON.stringify({
code: 1, message: 'from web'
}));
}
function testBridge() {
window.chrome.webview.hostObjects.bridge.Test();
}
window.addEventListener('message', e => {
console.log('on-message', e)
})
</script>
</body>
</html>