first commit
This commit is contained in:
commit
f1f52f1e37
BIN
.vs/ProjectEvaluation/testwordaddin1.metadata.v7.bin
Normal file
BIN
.vs/ProjectEvaluation/testwordaddin1.metadata.v7.bin
Normal file
Binary file not shown.
BIN
.vs/ProjectEvaluation/testwordaddin1.projects.v7.bin
Normal file
BIN
.vs/ProjectEvaluation/testwordaddin1.projects.v7.bin
Normal file
Binary file not shown.
BIN
.vs/TestWordAddIn1/DesignTimeBuild/.dtbcache.v2
Normal file
BIN
.vs/TestWordAddIn1/DesignTimeBuild/.dtbcache.v2
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.vs/TestWordAddIn1/v17/.futdcache.v2
Normal file
BIN
.vs/TestWordAddIn1/v17/.futdcache.v2
Normal file
Binary file not shown.
BIN
.vs/TestWordAddIn1/v17/.suo
Normal file
BIN
.vs/TestWordAddIn1/v17/.suo
Normal file
Binary file not shown.
37
TestWordAddIn1.sln
Normal file
37
TestWordAddIn1.sln
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
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
|
||||
Release|Any CPU = Release|Any CPU
|
||||
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}.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
|
||||
{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}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{724D79C5-93B5-4BD7-9964-A05CCEFD3BFA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {7C87838C-07BB-41AF-9F47-1F995065934E}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
13
TestWordAddIn1/AppConfig.cs
Normal file
13
TestWordAddIn1/AppConfig.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TestWordAddIn1
|
||||
{
|
||||
public class AppConfig
|
||||
{
|
||||
public static readonly string PanelName = "校对王";
|
||||
}
|
||||
}
|
16
TestWordAddIn1/Bridge.cs
Normal file
16
TestWordAddIn1/Bridge.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TestWordAddIn1
|
||||
{
|
||||
public class Bridge
|
||||
{
|
||||
public void Test()
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("Test on C# Bridge!");
|
||||
}
|
||||
}
|
||||
}
|
17
TestWordAddIn1/Enums.cs
Normal file
17
TestWordAddIn1/Enums.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TestWordAddIn1
|
||||
{
|
||||
public enum OfficeType
|
||||
{
|
||||
Word,
|
||||
WPS
|
||||
}
|
||||
internal class Enums
|
||||
{
|
||||
}
|
||||
}
|
92
TestWordAddIn1/Form1.Designer.cs
generated
Normal file
92
TestWordAddIn1/Form1.Designer.cs
generated
Normal file
@ -0,0 +1,92 @@
|
||||
namespace TestWordAddIn1
|
||||
{
|
||||
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()
|
||||
{
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.BackgroundImage = global::TestWordAddIn1.Properties.Resources.android_chrome_192x192;
|
||||
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(800, 200);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.button1);
|
||||
this.panel1.Controls.Add(this.pictureBox1);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(800, 450);
|
||||
this.panel1.TabIndex = 1;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Font = new System.Drawing.Font("微软雅黑", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button1.Location = new System.Drawing.Point(307, 206);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(181, 62);
|
||||
this.button1.TabIndex = 1;
|
||||
this.button1.Text = "button1";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Name = "Form1";
|
||||
this.Text = "Form1";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
}
|
||||
}
|
25
TestWordAddIn1/Form1.cs
Normal file
25
TestWordAddIn1/Form1.cs
Normal file
@ -0,0 +1,25 @@
|
||||
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;
|
||||
|
||||
namespace TestWordAddIn1
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("Test");
|
||||
}
|
||||
}
|
||||
}
|
120
TestWordAddIn1/Form1.resx
Normal file
120
TestWordAddIn1/Form1.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
23
TestWordAddIn1/Http.cs
Normal file
23
TestWordAddIn1/Http.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TestWordAddIn1
|
||||
{
|
||||
internal class Http
|
||||
{
|
||||
public static String Get(string url)
|
||||
{
|
||||
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
|
||||
var res = req.GetResponse();
|
||||
using (var reader = new StreamReader(res.GetResponseStream()))
|
||||
{
|
||||
return reader.ReadToEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
145
TestWordAddIn1/ProofreadItem.cs
Normal file
145
TestWordAddIn1/ProofreadItem.cs
Normal file
@ -0,0 +1,145 @@
|
||||
using Microsoft.Office.Interop.Word;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using UtilLib;
|
||||
|
||||
namespace TestWordAddIn1
|
||||
{
|
||||
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;
|
||||
private DiffItem diffItem;
|
||||
private int currentStart;
|
||||
private Document document;
|
||||
private Bookmark bookmark;
|
||||
private bool processed = false;
|
||||
|
||||
public ProofreadItem()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.BackColor = BG_NORMAL;
|
||||
this.document = Globals.ThisAddIn.Application.ActiveDocument;
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
private void AddBookmark(Color color)
|
||||
{
|
||||
int rangeStart = this.currentStart + this.diffItem.Start,
|
||||
rangeEnd = this.currentStart + this.diffItem.End;
|
||||
|
||||
Range r = this.document.Range(rangeStart, rangeEnd);
|
||||
|
||||
this.bookmark = this.document.Bookmarks.Add("mark_" + this.diffItem.Id, r);
|
||||
if (this.diffItem.Tag != "i")
|
||||
{
|
||||
r.Shading.BackgroundPatternColor = (WdColor)ColorTranslator.ToOle(color);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetProofreadItem(DiffItem it, int start)
|
||||
{
|
||||
this.diffItem = it;
|
||||
this.currentStart = start;
|
||||
this.ProcessView();
|
||||
|
||||
var typeConfig = TypeConfig.Get(it.Type);
|
||||
type.Text = typeConfig.Text;
|
||||
type.Visible = false;
|
||||
var c = Colors.FromHex(typeConfig.Color);
|
||||
typePanel.BackColor = c;
|
||||
//if (it.Tag != "i")
|
||||
//{
|
||||
AddBookmark(c);
|
||||
//}
|
||||
|
||||
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 ProcessView()
|
||||
{
|
||||
var showBtn = this.diffItem.IsAccept == AcceptEnum.Default;
|
||||
btnAccept.Visible = showBtn;
|
||||
btnIgnore.Visible = showBtn;
|
||||
processStatus.Visible = !showBtn;
|
||||
if (!showBtn)
|
||||
{
|
||||
processStatus.Text = (this.diffItem.IsAccept == AcceptEnum.Accept) ? "已采纳" : "已忽略";
|
||||
}
|
||||
}
|
||||
|
||||
private void ProofreadItem_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void btnIgnore_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.diffItem.IsAccept != AcceptEnum.Default) return;
|
||||
this.diffItem.IsAccept = AcceptEnum.Ignore;
|
||||
this.bookmark.Range.Shading.BackgroundPatternColor = WdColor.wdColorAutomatic;
|
||||
MessageBox.Show("忽略" + this.currentStart + this.diffItem.Text);
|
||||
this.ProcessView();
|
||||
}
|
||||
|
||||
private void btnAccept_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.diffItem.IsAccept != AcceptEnum.Default) return;
|
||||
this.diffItem.IsAccept = AcceptEnum.Accept;
|
||||
var rng = this.bookmark.Range;
|
||||
rng.Shading.BackgroundPatternColor = WdColor.wdColorAutomatic;
|
||||
if (this.diffItem.Tag == "d")
|
||||
{
|
||||
rng.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
rng.Text = this.diffItem.Text;
|
||||
}
|
||||
this.ProcessView();
|
||||
}
|
||||
}
|
||||
}
|
147
TestWordAddIn1/ProofreadItem.designer.cs
generated
Normal file
147
TestWordAddIn1/ProofreadItem.designer.cs
generated
Normal file
@ -0,0 +1,147 @@
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TestWordAddIn1
|
||||
{
|
||||
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()
|
||||
{
|
||||
this.origin = new System.Windows.Forms.Label();
|
||||
this.type = new System.Windows.Forms.Label();
|
||||
this.description = new System.Windows.Forms.Label();
|
||||
this.btnAccept = new System.Windows.Forms.Button();
|
||||
this.btnIgnore = new System.Windows.Forms.Button();
|
||||
this.typePanel = new System.Windows.Forms.Panel();
|
||||
this.processStatus = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// origin
|
||||
//
|
||||
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.Name = "origin";
|
||||
this.origin.Size = new System.Drawing.Size(49, 20);
|
||||
this.origin.TabIndex = 0;
|
||||
this.origin.Text = "origin";
|
||||
//
|
||||
// type
|
||||
//
|
||||
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.Name = "type";
|
||||
this.type.Size = new System.Drawing.Size(38, 20);
|
||||
this.type.TabIndex = 1;
|
||||
this.type.Text = "type";
|
||||
//
|
||||
// description
|
||||
//
|
||||
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.Name = "description";
|
||||
this.description.Size = new System.Drawing.Size(84, 20);
|
||||
this.description.TabIndex = 2;
|
||||
this.description.Text = "description";
|
||||
//
|
||||
// btnAccept
|
||||
//
|
||||
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.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnAccept.Name = "btnAccept";
|
||||
this.btnAccept.Size = new System.Drawing.Size(26, 26);
|
||||
this.btnAccept.TabIndex = 3;
|
||||
this.btnAccept.UseVisualStyleBackColor = true;
|
||||
this.btnAccept.Click += new System.EventHandler(this.btnAccept_Click);
|
||||
//
|
||||
// btnIgnore
|
||||
//
|
||||
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.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnIgnore.Name = "btnIgnore";
|
||||
this.btnIgnore.Size = new System.Drawing.Size(26, 26);
|
||||
this.btnIgnore.TabIndex = 4;
|
||||
this.btnIgnore.UseVisualStyleBackColor = true;
|
||||
this.btnIgnore.Click += new System.EventHandler(this.btnIgnore_Click);
|
||||
//
|
||||
// typePanel
|
||||
//
|
||||
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.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.Name = "processStatus";
|
||||
this.processStatus.Size = new System.Drawing.Size(50, 20);
|
||||
this.processStatus.TabIndex = 6;
|
||||
this.processStatus.Text = "label1";
|
||||
//
|
||||
// ProofreadItem
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.Controls.Add(this.processStatus);
|
||||
this.Controls.Add(this.typePanel);
|
||||
this.Controls.Add(this.btnIgnore);
|
||||
this.Controls.Add(this.btnAccept);
|
||||
this.Controls.Add(this.description);
|
||||
this.Controls.Add(this.type);
|
||||
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.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Label origin;
|
||||
private Label type;
|
||||
private Label description;
|
||||
private Button btnAccept;
|
||||
private Button btnIgnore;
|
||||
private Panel typePanel;
|
||||
private Label processStatus;
|
||||
}
|
||||
}
|
120
TestWordAddIn1/ProofreadItem.resx
Normal file
120
TestWordAddIn1/ProofreadItem.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
79
TestWordAddIn1/ProofreadPanel.Designer.cs
generated
Normal file
79
TestWordAddIn1/ProofreadPanel.Designer.cs
generated
Normal file
@ -0,0 +1,79 @@
|
||||
namespace TestWordAddIn1
|
||||
{
|
||||
partial class ProofreadPanel
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.BackColor = System.Drawing.SystemColors.HotTrack;
|
||||
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button1.ForeColor = System.Drawing.Color.White;
|
||||
this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.button1.Location = new System.Drawing.Point(16, 14);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(117, 31);
|
||||
this.button1.TabIndex = 0;
|
||||
this.button1.Text = "开始校对";
|
||||
this.button1.UseVisualStyleBackColor = false;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.panel1.AutoScroll = true;
|
||||
this.panel1.Location = new System.Drawing.Point(16, 61);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(304, 606);
|
||||
this.panel1.TabIndex = 1;
|
||||
//
|
||||
// ProofreadPanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Name = "ProofreadPanel";
|
||||
this.Size = new System.Drawing.Size(340, 686);
|
||||
this.Load += new System.EventHandler(this.ProofreadPanel_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
}
|
||||
}
|
131
TestWordAddIn1/ProofreadPanel.cs
Normal file
131
TestWordAddIn1/ProofreadPanel.cs
Normal file
@ -0,0 +1,131 @@
|
||||
using Microsoft.Office.Interop.Word;
|
||||
using Microsoft.Web.WebView2.Core;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.ConstrainedExecution;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using UtilLib;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Header;
|
||||
|
||||
namespace TestWordAddIn1
|
||||
{
|
||||
public partial class ProofreadPanel : UserControl
|
||||
{
|
||||
private CoreWebView2Environment env;
|
||||
|
||||
private readonly int ItemHeight = 75;
|
||||
private readonly List<ProofreadItem> Items = new List<ProofreadItem>();
|
||||
public ProofreadPanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ProofreadPanel_Load(object sender, EventArgs e)
|
||||
{
|
||||
//InitWebview();
|
||||
}
|
||||
public void SendMessage(string action, object data)
|
||||
{
|
||||
//string json = JsonConvert.SerializeObject(new WebActionMessage(action, data));
|
||||
//webView21.CoreWebView2.PostWebMessageAsJson(json);
|
||||
}
|
||||
|
||||
//public async void InitWebview()
|
||||
//{
|
||||
//if (env == null)
|
||||
//{
|
||||
// // 自定义环境位置
|
||||
// env = await CoreWebView2Environment.CreateAsync(null, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "/web/user_data");
|
||||
// webView21.CoreWebView2InitializationCompleted += WebView21_CoreWebView2InitializationCompleted;
|
||||
// await webView21.EnsureCoreWebView2Async(env);
|
||||
//}
|
||||
//webView21.Source = new Uri(AppDomain.CurrentDomain.BaseDirectory + "\\web\\index.html");
|
||||
////
|
||||
//webView21.CoreWebView2.AddHostObjectToScript("bridge", new Bridge());
|
||||
//}
|
||||
|
||||
private void WebView21_CoreWebView2InitializationCompleted(object sender, CoreWebView2InitializationCompletedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void webView21_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
var app = Globals.ThisAddIn.Application;
|
||||
var doc = app.ActiveDocument;
|
||||
var content = doc.Content.Text.Trim();
|
||||
if (content.Length > 0)
|
||||
{
|
||||
if (MessageBox.Show("将会清空文档内容并加载示例内容,确定继续操作?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// doc.Select();
|
||||
var rng = doc.Range(0, content.Length);
|
||||
rng.Delete();
|
||||
}
|
||||
var result = API.GetProofreadResult();
|
||||
if (result == null)
|
||||
{
|
||||
MessageBox.Show("加载数据失败,请重试");
|
||||
return;
|
||||
}
|
||||
var cur = app.Selection;
|
||||
if (app.Options.Overtype)
|
||||
{
|
||||
// 禁用
|
||||
app.Options.Overtype = false;
|
||||
}
|
||||
if (cur.Type != WdSelectionType.wdSelectionIP)
|
||||
{
|
||||
MessageBox.Show("异常");
|
||||
return;
|
||||
}
|
||||
InitDocument(result);
|
||||
}
|
||||
|
||||
private void InitDocument(ProofreadResult result)
|
||||
{
|
||||
var app = Globals.ThisAddIn.Application;
|
||||
var cur = app.Selection;
|
||||
var doc = app.ActiveDocument;
|
||||
int index = 0;
|
||||
foreach (var correct in result.CorrectedSet)
|
||||
{
|
||||
cur.TypeText(correct.Insert);
|
||||
var rng = cur.Range;
|
||||
if (correct.Diffs != null)
|
||||
{
|
||||
foreach (var it in correct.Diffs)
|
||||
{
|
||||
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);
|
||||
panel1.Controls.Add(item);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
TestWordAddIn1/ProofreadPanel.resx
Normal file
120
TestWordAddIn1/ProofreadPanel.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
38
TestWordAddIn1/Properties/AssemblyInfo.cs
Normal file
38
TestWordAddIn1/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("TestWordAddIn1")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("TestWordAddIn1")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//将 ComVisible 设置为 false 将使此程序集中的类型
|
||||
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("1fa7f1e1-a05f-4129-a40d-62134d43270d")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
123
TestWordAddIn1/Properties/Resources.Designer.cs
generated
Normal file
123
TestWordAddIn1/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,123 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace TestWordAddIn1.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("TestWordAddIn1.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 android_chrome_192x192 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("android-chrome-192x192", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <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 favicon {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("favicon", 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));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap search_check {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("search-check", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap search_proofread {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("search-proofread", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
139
TestWordAddIn1/Properties/Resources.resx
Normal file
139
TestWordAddIn1/Properties/Resources.resx
Normal file
@ -0,0 +1,139 @@
|
||||
<?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="search-proofread" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\search-proofread.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>
|
||||
<data name="favicon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\favicon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<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="android-chrome-192x192" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\android-chrome-192x192.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="search-check" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\search-check.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
26
TestWordAddIn1/Properties/Settings.Designer.cs
generated
Normal file
26
TestWordAddIn1/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace TestWordAddIn1.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
TestWordAddIn1/Properties/Settings.settings
Normal file
7
TestWordAddIn1/Properties/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
BIN
TestWordAddIn1/Resources/android-chrome-192x192.png
Normal file
BIN
TestWordAddIn1/Resources/android-chrome-192x192.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
BIN
TestWordAddIn1/Resources/check.png
Normal file
BIN
TestWordAddIn1/Resources/check.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
TestWordAddIn1/Resources/favicon.png
Normal file
BIN
TestWordAddIn1/Resources/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
TestWordAddIn1/Resources/minus-bold.png
Normal file
BIN
TestWordAddIn1/Resources/minus-bold.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 173 B |
BIN
TestWordAddIn1/Resources/search-check.png
Normal file
BIN
TestWordAddIn1/Resources/search-check.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 617 B |
BIN
TestWordAddIn1/Resources/search-proofread.png
Normal file
BIN
TestWordAddIn1/Resources/search-proofread.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
161
TestWordAddIn1/Ribbon1.Designer.cs
generated
Normal file
161
TestWordAddIn1/Ribbon1.Designer.cs
generated
Normal file
@ -0,0 +1,161 @@
|
||||
namespace TestWordAddIn1
|
||||
{
|
||||
partial class Ribbon1 : Microsoft.Office.Tools.Ribbon.RibbonBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
public Ribbon1()
|
||||
: base(Globals.Factory.GetRibbonFactory())
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <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()
|
||||
{
|
||||
this.tab1 = this.Factory.CreateRibbonTab();
|
||||
this.group1 = this.Factory.CreateRibbonGroup();
|
||||
this.button1 = this.Factory.CreateRibbonButton();
|
||||
this.btnLoadDocument = this.Factory.CreateRibbonButton();
|
||||
this.button3 = this.Factory.CreateRibbonButton();
|
||||
this.group2 = this.Factory.CreateRibbonGroup();
|
||||
this.btnProofread = this.Factory.CreateRibbonButton();
|
||||
this.btnOpenForm = this.Factory.CreateRibbonButton();
|
||||
this.button8 = this.Factory.CreateRibbonButton();
|
||||
this.button6 = this.Factory.CreateRibbonButton();
|
||||
this.tab1.SuspendLayout();
|
||||
this.group1.SuspendLayout();
|
||||
this.group2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tab1
|
||||
//
|
||||
this.tab1.ControlId.ControlIdType = Microsoft.Office.Tools.Ribbon.RibbonControlIdType.Office;
|
||||
this.tab1.Groups.Add(this.group1);
|
||||
this.tab1.Groups.Add(this.group2);
|
||||
this.tab1.Label = "测试加载项";
|
||||
this.tab1.Name = "tab1";
|
||||
//
|
||||
// group1
|
||||
//
|
||||
this.group1.Items.Add(this.button1);
|
||||
this.group1.Items.Add(this.btnLoadDocument);
|
||||
this.group1.Items.Add(this.button3);
|
||||
this.group1.Label = "分组1";
|
||||
this.group1.Name = "group1";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Label = "获取当前文本";
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.button1_Click);
|
||||
//
|
||||
// btnLoadDocument
|
||||
//
|
||||
this.btnLoadDocument.Label = "加载文档";
|
||||
this.btnLoadDocument.Name = "btnLoadDocument";
|
||||
this.btnLoadDocument.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.button2_Click);
|
||||
//
|
||||
// button3
|
||||
//
|
||||
this.button3.Label = "插入";
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.button3_Click);
|
||||
//
|
||||
// group2
|
||||
//
|
||||
this.group2.Items.Add(this.btnProofread);
|
||||
this.group2.Items.Add(this.btnOpenForm);
|
||||
this.group2.Items.Add(this.button8);
|
||||
this.group2.Items.Add(this.button6);
|
||||
this.group2.Label = "分组2";
|
||||
this.group2.Name = "group2";
|
||||
//
|
||||
// btnProofread
|
||||
//
|
||||
this.btnProofread.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
|
||||
this.btnProofread.Image = global::TestWordAddIn1.Properties.Resources.search_proofread;
|
||||
this.btnProofread.Label = "开始校验";
|
||||
this.btnProofread.Name = "btnProofread";
|
||||
this.btnProofread.ShowImage = true;
|
||||
this.btnProofread.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.button4_Click);
|
||||
//
|
||||
// btnOpenForm
|
||||
//
|
||||
this.btnOpenForm.Image = global::TestWordAddIn1.Properties.Resources.favicon;
|
||||
this.btnOpenForm.Label = "打开原生窗口";
|
||||
this.btnOpenForm.Name = "btnOpenForm";
|
||||
this.btnOpenForm.ShowImage = true;
|
||||
this.btnOpenForm.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnOpenForm_Click);
|
||||
//
|
||||
// button8
|
||||
//
|
||||
this.button8.Label = "测试3";
|
||||
this.button8.Name = "button8";
|
||||
this.button8.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.button8_Click);
|
||||
//
|
||||
// button6
|
||||
//
|
||||
this.button6.Label = "保存文档";
|
||||
this.button6.Name = "button6";
|
||||
this.button6.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.button6_Click);
|
||||
//
|
||||
// Ribbon1
|
||||
//
|
||||
this.Name = "Ribbon1";
|
||||
this.RibbonType = "Microsoft.Word.Document";
|
||||
this.Tabs.Add(this.tab1);
|
||||
this.Load += new Microsoft.Office.Tools.Ribbon.RibbonUIEventHandler(this.Ribbon1_Load);
|
||||
this.tab1.ResumeLayout(false);
|
||||
this.tab1.PerformLayout();
|
||||
this.group1.ResumeLayout(false);
|
||||
this.group1.PerformLayout();
|
||||
this.group2.ResumeLayout(false);
|
||||
this.group2.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonTab tab1;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonGroup group1;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton button1;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnLoadDocument;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton button3;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonGroup group2;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnProofread;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnOpenForm;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton button8;
|
||||
internal Microsoft.Office.Tools.Ribbon.RibbonButton button6;
|
||||
}
|
||||
|
||||
partial class ThisRibbonCollection
|
||||
{
|
||||
internal Ribbon1 Ribbon1
|
||||
{
|
||||
get { return this.GetRibbon<Ribbon1>(); }
|
||||
}
|
||||
}
|
||||
}
|
175
TestWordAddIn1/Ribbon1.cs
Normal file
175
TestWordAddIn1/Ribbon1.cs
Normal file
@ -0,0 +1,175 @@
|
||||
using Microsoft.Office.Interop.Word;
|
||||
using Microsoft.Office.Tools.Ribbon;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using UtilLib;
|
||||
|
||||
namespace TestWordAddIn1
|
||||
{
|
||||
public partial class Ribbon1
|
||||
{
|
||||
private Microsoft.Office.Interop.Word.Application wordApp;
|
||||
private Document document;
|
||||
|
||||
private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
|
||||
{
|
||||
wordApp = Globals.ThisAddIn.Application;
|
||||
Console.WriteLine("插件加载完成");
|
||||
}
|
||||
|
||||
|
||||
private void button1_Click(object sender, RibbonControlEventArgs e)
|
||||
{
|
||||
var currentText = wordApp.ActiveDocument.Range().Text;
|
||||
Debug.WriteLine(currentText);
|
||||
|
||||
System.Windows.Forms.MessageBox.Show("Test:" + currentText);
|
||||
}
|
||||
|
||||
private void button4_Click(object sender, RibbonControlEventArgs e)
|
||||
{
|
||||
// 开始校对
|
||||
//var doc = wordApp.ActiveDocument;
|
||||
//var content = doc.Content.Text.Trim();
|
||||
//if (content.Length == 0)
|
||||
//{
|
||||
// System.Windows.Forms.MessageBox.Show("内容为空");
|
||||
// return;
|
||||
//}
|
||||
Globals.ThisAddIn.SetPanelVisible(true);
|
||||
}
|
||||
|
||||
void addMarks()
|
||||
{
|
||||
document = wordApp.ActiveDocument;
|
||||
Range rng = document.Range(2, 4);
|
||||
document.Bookmarks.Add("s24", rng);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void btnOpenForm_Click(object sender, RibbonControlEventArgs e)
|
||||
{
|
||||
Form1 f1 = new Form1();
|
||||
f1.ShowDialog();
|
||||
}
|
||||
|
||||
private void button8_Click(object sender, RibbonControlEventArgs e)
|
||||
{
|
||||
//var paragrahs = wordApp.ActiveDocument.Paragraphs;
|
||||
Document doc = wordApp.ActiveDocument;
|
||||
object start = 0;
|
||||
object end = 4;
|
||||
System.Windows.Forms.MessageBox.Show("选择0,4");
|
||||
// 设置区域位置
|
||||
Range range = doc.Range(ref start, ref end); // 从 start(索引从0开始)到end前一个字符(不包含end)
|
||||
range.Select(); // 选中区域
|
||||
System.Windows.Forms.MessageBox.Show("即将全选");
|
||||
wordApp.ActiveDocument.Select(); // 全选
|
||||
var sentences = doc.Sentences;
|
||||
System.Windows.Forms.MessageBox.Show("句子总计:" + sentences.Count);
|
||||
if (sentences.Count >= 2)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("选中第2个句子");
|
||||
var s2 = sentences[2]; // 句子的索引从1开始
|
||||
doc.Range(s2.Start, s2.End).Select();
|
||||
}
|
||||
System.Windows.Forms.MessageBox.Show("选择2,5");
|
||||
// 设置区域位置
|
||||
Range rng = doc.Range(2, 5);
|
||||
rng.Select(); //
|
||||
System.Windows.Forms.MessageBox.Show("向后选择多2个字符");
|
||||
// 按字符向后移动
|
||||
rng.MoveEnd(WdUnits.wdCharacter, 2);
|
||||
// 字符向前移动
|
||||
//rng.MoveStart(WdUnits.wdCharacter, 2);
|
||||
rng.Select();
|
||||
|
||||
Thread.Sleep(2000);
|
||||
// 选择第1段
|
||||
rng = doc.Paragraphs[1].Range;
|
||||
rng.Select();
|
||||
Thread.Sleep(1000);
|
||||
rng.Collapse(WdCollapseDirection.wdCollapseEnd); // 折叠(wdCollapseEnd:向后,wdCollapseStart:向前)
|
||||
System.Windows.Forms.MessageBox.Show("插入新字符");
|
||||
rng.Text = "插入新字符";
|
||||
rng.Select();
|
||||
}
|
||||
|
||||
private void button6_Click(object sender, RibbonControlEventArgs e)
|
||||
{
|
||||
wordApp.ActiveDocument.Save();
|
||||
}
|
||||
|
||||
private void button3_Click(object sender, RibbonControlEventArgs e)
|
||||
{
|
||||
document = wordApp.ActiveDocument;
|
||||
var txt = "在文档开头指定一个范围,并插入文本 New Text。\n再说一下这个问题哈";
|
||||
Selection cur = wordApp.Selection;
|
||||
if (cur.Type != WdSelectionType.wdSelectionIP)
|
||||
{
|
||||
MessageBox.Show("异常");
|
||||
return;
|
||||
}
|
||||
cur.TypeText(txt);
|
||||
AddBookmark(1, 3, "#ff0000");
|
||||
AddBookmark(4, 6, "#00ff00");
|
||||
|
||||
}
|
||||
private Bookmark AddBookmark(int rangeStart, int rangeEnd,string color)
|
||||
{
|
||||
var doc = wordApp.ActiveDocument;
|
||||
Range r = doc.Range(rangeStart, rangeEnd);
|
||||
|
||||
var mark = doc.Bookmarks.Add("mark_" + rangeStart + "_" + rangeEnd, r);
|
||||
r.Shading.BackgroundPatternColor = (WdColor)ColorTranslator.ToOle(Colors.FromHex(color));
|
||||
return mark;
|
||||
}
|
||||
|
||||
private ProofreadResult GetSource()
|
||||
{
|
||||
|
||||
var content = Http.Get("http://test.wx.wm-app.xyz/proofread.json");
|
||||
var result = JsonConvert.DeserializeObject<Response<ProofreadResult>>(content);
|
||||
return result.Data;
|
||||
}
|
||||
|
||||
// 加载文档
|
||||
private void button2_Click(object sender, RibbonControlEventArgs e)
|
||||
{
|
||||
document = wordApp.ActiveDocument;
|
||||
|
||||
var cur = wordApp.Selection;
|
||||
|
||||
if (wordApp.Options.Overtype)
|
||||
{
|
||||
// 禁用
|
||||
wordApp.Options.Overtype = false;
|
||||
}
|
||||
if (cur.Type != WdSelectionType.wdSelectionIP)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("异常");
|
||||
return;
|
||||
}
|
||||
var result = GetSource();
|
||||
result.CorrectedSet.ForEach(it =>
|
||||
{
|
||||
cur.TypeText(it.Insert);
|
||||
});
|
||||
|
||||
//for (int i = 0; i < 20; i++)
|
||||
//{
|
||||
// cur.TypeText("-->" + i);
|
||||
// cur.TypeParagraph();
|
||||
// Thread.Sleep(1000);
|
||||
//}
|
||||
//cur.TypeText("在文档开头指定一个范围,并插入文本 New Text。\n下面的代码示例可用于文档级自定义项。");
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
120
TestWordAddIn1/Ribbon1.resx
Normal file
120
TestWordAddIn1/Ribbon1.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
305
TestWordAddIn1/TestWordAddIn1.csproj
Normal file
305
TestWordAddIn1/TestWordAddIn1.csproj
Normal file
@ -0,0 +1,305 @@
|
||||
<Project ToolsVersion="17.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<!--
|
||||
This section defines project-level properties.
|
||||
|
||||
AssemblyName
|
||||
Name of the output assembly.
|
||||
Configuration
|
||||
Specifies a default value for debug.
|
||||
OutputType
|
||||
Must be "Library" for VSTO.
|
||||
Platform
|
||||
Specifies what CPU the output of this project can run on.
|
||||
NoStandardLibraries
|
||||
Set to "false" for VSTO.
|
||||
RootNamespace
|
||||
In C#, this specifies the namespace given to new files. In VB, all objects are
|
||||
wrapped in this namespace at runtime.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<ProjectTypeGuids>{BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{E12FB108-CC54-49E3-B606-872B9805F9FA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoStandardLibraries>false</NoStandardLibraries>
|
||||
<RootNamespace>TestWordAddIn1</RootNamespace>
|
||||
<AssemblyName>TestWordAddIn1</AssemblyName>
|
||||
<LoadBehavior>3</LoadBehavior>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<DefineConstants>VSTO40</DefineConstants>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<BootstrapperComponentsLocation>HomeSite</BootstrapperComponentsLocation>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.VSTORuntime.4.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft Visual Studio 2010 Tools for Office Runtime %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<!--
|
||||
OfficeApplication
|
||||
Add-in host application
|
||||
-->
|
||||
<OfficeApplication>Word</OfficeApplication>
|
||||
</PropertyGroup>
|
||||
<!--
|
||||
This section defines properties that are set when the "Debug" configuration is selected.
|
||||
|
||||
DebugSymbols
|
||||
If "true", create symbols (.pdb). If "false", do not create symbols.
|
||||
DefineConstants
|
||||
Constants defined for the preprocessor.
|
||||
EnableUnmanagedDebugging
|
||||
If "true", starting the debugger will attach both managed and unmanaged debuggers.
|
||||
Optimize
|
||||
If "true", optimize the build output. If "false", do not optimize.
|
||||
OutputPath
|
||||
Output path of project relative to the project file.
|
||||
WarningLevel
|
||||
Warning level for the compiler.
|
||||
-->
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<!--
|
||||
This section defines properties that are set when the "Release" configuration is selected.
|
||||
|
||||
DebugSymbols
|
||||
If "true", create symbols (.pdb). If "false", do not create symbols.
|
||||
DefineConstants
|
||||
Constants defined for the preprocessor.
|
||||
EnableUnmanagedDebugging
|
||||
If "true", starting the debugger will attach both managed and unmanaged debuggers.
|
||||
Optimize
|
||||
If "true", optimize the build output. If "false", do not optimize.
|
||||
OutputPath
|
||||
Output path of project relative to the project file.
|
||||
WarningLevel
|
||||
Warning level for the compiler.
|
||||
-->
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<!--
|
||||
This section specifies references for the project.
|
||||
-->
|
||||
<ItemGroup>
|
||||
<Reference Include="Accessibility" />
|
||||
<Reference Include="Microsoft.Web.WebView2.Core, Version=1.0.2151.40, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.2151.40\lib\net45\Microsoft.Web.WebView2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.WebView2.WinForms, Version=1.0.2151.40, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.2151.40\lib\net45\Microsoft.Web.WebView2.WinForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.WebView2.Wpf, Version=1.0.2151.40, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.2151.40\lib\net45\Microsoft.Web.WebView2.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Office.Tools.v4.0.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Tools.Applications.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Office.Tools, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Office.Tools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Office.Tools.Word, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Office.Tools.Common.v4.0.Utilities, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
|
||||
<Private>False</Private>
|
||||
<EmbedInteropTypes>true</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Office.Interop.Word, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
|
||||
<Private>False</Private>
|
||||
<EmbedInteropTypes>true</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<!--
|
||||
This section defines the user source files that are part of the project.
|
||||
|
||||
A "Compile" element specifies a source file to compile.
|
||||
An "EmbeddedResource" element specifies an .resx file for embedded resources.
|
||||
A "None" element specifies a file that is not to be passed to the compiler (for instance,
|
||||
a text file or XML file).
|
||||
The "AppDesigner" element specifies the directory where the application properties files
|
||||
can be found.
|
||||
-->
|
||||
<ItemGroup>
|
||||
<Compile Include="AppConfig.cs" />
|
||||
<Compile Include="Bridge.cs" />
|
||||
<Compile Include="Enums.cs" />
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Http.cs" />
|
||||
<Compile Include="ProofreadItem.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ProofreadItem.designer.cs">
|
||||
<DependentUpon>ProofreadItem.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProofreadPanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ProofreadPanel.Designer.cs">
|
||||
<DependentUpon>ProofreadPanel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ProofreadItem.resx">
|
||||
<DependentUpon>ProofreadItem.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ProofreadPanel.resx">
|
||||
<DependentUpon>ProofreadPanel.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Ribbon1.resx">
|
||||
<DependentUpon>Ribbon1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Ribbon1.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Ribbon1.Designer.cs">
|
||||
<DependentUpon>Ribbon1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ThisAddIn.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<None Include="TestWordAddIn1_TemporaryKey.pfx" />
|
||||
<None Include="ThisAddIn.Designer.xml">
|
||||
<DependentUpon>ThisAddIn.cs</DependentUpon>
|
||||
</None>
|
||||
<Compile Include="ThisAddIn.Designer.cs">
|
||||
<DependentUpon>ThisAddIn.Designer.xml</DependentUpon>
|
||||
</Compile>
|
||||
<AppDesigner Include="Properties\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\favicon.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\android-chrome-192x192.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\search-proofread.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\UtilLib\UtilLib.csproj">
|
||||
<Project>{724d79c5-93b5-4bd7-9964-a05ccefd3bfa}</Project>
|
||||
<Name>UtilLib</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\minus-bold.png" />
|
||||
<None Include="Resources\check.png" />
|
||||
<None Include="Resources\search-check.png" />
|
||||
<Content Include="web\index.html">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignManifests>true</SignManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestKeyFile>TestWordAddIn1_TemporaryKey.pfx</ManifestKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestCertificateThumbprint>0618754C31A0C743191F0D2976885003BA3EB202</ManifestCertificateThumbprint>
|
||||
</PropertyGroup>
|
||||
<!-- Include the build rules for a C# project. -->
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- Include additional build rules for an Office application add-in. -->
|
||||
<Import Project="$(VSToolsPath)\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<!-- This section defines VSTO properties that describe the host-changeable project properties. -->
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{BAA0C2D2-18E2-41B9-852F-F413020CAA33}">
|
||||
<ProjectProperties HostName="Word" HostPackage="{29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1}" OfficeVersion="15.0" VstxVersion="4.0" ApplicationType="Word" Language="cs" TemplatesPath="" DebugInfoExeName="#Software\Microsoft\Office\16.0\Word\InstallRoot\Path#WINWORD.EXE" DebugInfoCommandLine="/x" AddItemTemplatesGuid="{51063C3A-E220-4D12-8922-BDA915ACD783}" />
|
||||
<Host Name="Word" GeneratedCodeNamespace="TestWordAddIn1" IconIndex="0">
|
||||
<HostItem Name="ThisAddIn" Code="ThisAddIn.cs" CanonicalName="AddIn" CanActivate="false" IconIndex="1" Blueprint="ThisAddIn.Designer.xml" GeneratedCode="ThisAddIn.Designer.cs" />
|
||||
</Host>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.2151.40\build\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.2151.40\build\Microsoft.Web.WebView2.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.2151.40\build\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.2151.40\build\Microsoft.Web.WebView2.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
BIN
TestWordAddIn1/TestWordAddIn1_TemporaryKey.pfx
Normal file
BIN
TestWordAddIn1/TestWordAddIn1_TemporaryKey.pfx
Normal file
Binary file not shown.
237
TestWordAddIn1/ThisAddIn.Designer.cs
generated
Normal file
237
TestWordAddIn1/ThisAddIn.Designer.cs
generated
Normal file
@ -0,0 +1,237 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#pragma warning disable 414
|
||||
namespace TestWordAddIn1 {
|
||||
|
||||
|
||||
///
|
||||
[Microsoft.VisualStudio.Tools.Applications.Runtime.StartupObjectAttribute(0)]
|
||||
[global::System.Security.Permissions.PermissionSetAttribute(global::System.Security.Permissions.SecurityAction.Demand, Name="FullTrust")]
|
||||
public sealed partial class ThisAddIn : Microsoft.Office.Tools.AddInBase {
|
||||
|
||||
internal Microsoft.Office.Tools.CustomTaskPaneCollection CustomTaskPanes;
|
||||
|
||||
internal Microsoft.Office.Tools.SmartTagCollection VstoSmartTags;
|
||||
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
private global::System.Object missing = global::System.Type.Missing;
|
||||
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
internal Microsoft.Office.Interop.Word.Application Application;
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public ThisAddIn(global::Microsoft.Office.Tools.Word.ApplicationFactory factory, global::System.IServiceProvider serviceProvider) :
|
||||
base(factory, serviceProvider, "AddIn", "ThisAddIn") {
|
||||
Globals.Factory = factory;
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
protected override void Initialize() {
|
||||
base.Initialize();
|
||||
this.Application = this.GetHostItem<Microsoft.Office.Interop.Word.Application>(typeof(Microsoft.Office.Interop.Word.Application), "Application");
|
||||
Globals.ThisAddIn = this;
|
||||
global::System.Windows.Forms.Application.EnableVisualStyles();
|
||||
this.InitializeCachedData();
|
||||
this.InitializeControls();
|
||||
this.InitializeComponents();
|
||||
this.InitializeData();
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
protected override void FinishInitialization() {
|
||||
this.InternalStartup();
|
||||
this.OnStartup();
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
protected override void InitializeDataBindings() {
|
||||
this.BeginInitialization();
|
||||
this.BindToData();
|
||||
this.EndInitialization();
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
private void InitializeCachedData() {
|
||||
if ((this.DataHost == null)) {
|
||||
return;
|
||||
}
|
||||
if (this.DataHost.IsCacheInitialized) {
|
||||
this.DataHost.FillCachedData(this);
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
private void InitializeData() {
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
private void BindToData() {
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
private void StartCaching(string MemberName) {
|
||||
this.DataHost.StartCaching(this, MemberName);
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
private void StopCaching(string MemberName) {
|
||||
this.DataHost.StopCaching(this, MemberName);
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
private bool IsCached(string MemberName) {
|
||||
return this.DataHost.IsCached(this, MemberName);
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
private void BeginInitialization() {
|
||||
this.BeginInit();
|
||||
this.CustomTaskPanes.BeginInit();
|
||||
this.VstoSmartTags.BeginInit();
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
private void EndInitialization() {
|
||||
this.VstoSmartTags.EndInit();
|
||||
this.CustomTaskPanes.EndInit();
|
||||
this.EndInit();
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
private void InitializeControls() {
|
||||
this.CustomTaskPanes = Globals.Factory.CreateCustomTaskPaneCollection(null, null, "CustomTaskPanes", "CustomTaskPanes", this);
|
||||
this.VstoSmartTags = Globals.Factory.CreateSmartTagCollection(null, null, "VstoSmartTags", "VstoSmartTags", this);
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
private void InitializeComponents() {
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
private bool NeedsFill(string MemberName) {
|
||||
return this.DataHost.NeedsFill(this, MemberName);
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
protected override void OnShutdown() {
|
||||
this.VstoSmartTags.Dispose();
|
||||
this.CustomTaskPanes.Dispose();
|
||||
base.OnShutdown();
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
internal sealed partial class Globals {
|
||||
|
||||
///
|
||||
private Globals() {
|
||||
}
|
||||
|
||||
private static ThisAddIn _ThisAddIn;
|
||||
|
||||
private static global::Microsoft.Office.Tools.Word.ApplicationFactory _factory;
|
||||
|
||||
private static ThisRibbonCollection _ThisRibbonCollection;
|
||||
|
||||
internal static ThisAddIn ThisAddIn {
|
||||
get {
|
||||
return _ThisAddIn;
|
||||
}
|
||||
set {
|
||||
if ((_ThisAddIn == null)) {
|
||||
_ThisAddIn = value;
|
||||
}
|
||||
else {
|
||||
throw new System.NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static global::Microsoft.Office.Tools.Word.ApplicationFactory Factory {
|
||||
get {
|
||||
return _factory;
|
||||
}
|
||||
set {
|
||||
if ((_factory == null)) {
|
||||
_factory = value;
|
||||
}
|
||||
else {
|
||||
throw new System.NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static ThisRibbonCollection Ribbons {
|
||||
get {
|
||||
if ((_ThisRibbonCollection == null)) {
|
||||
_ThisRibbonCollection = new ThisRibbonCollection(_factory.GetRibbonFactory());
|
||||
}
|
||||
return _ThisRibbonCollection;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
|
||||
internal sealed partial class ThisRibbonCollection : Microsoft.Office.Tools.Ribbon.RibbonCollectionBase {
|
||||
|
||||
///
|
||||
internal ThisRibbonCollection(global::Microsoft.Office.Tools.Ribbon.RibbonFactory factory) :
|
||||
base(factory) {
|
||||
}
|
||||
}
|
||||
}
|
5
TestWordAddIn1/ThisAddIn.Designer.xml
Normal file
5
TestWordAddIn1/ThisAddIn.Designer.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<hostitem:hostItem hostitem:baseType="Microsoft.Office.Tools.AddInBase" hostitem:namespace="TestWordAddIn1" hostitem:className="ThisAddIn" hostitem:identifier="ThisAddIn" hostitem:primaryCookie="AddIn" hostitem:master="true" hostitem:factoryType="Microsoft.Office.Tools.Word.ApplicationFactory" hostitem:startupIndex="0" xmlns:hostitem="http://schemas.microsoft.com/2004/VisualStudio/Tools/Applications/HostItem.xsd">
|
||||
<hostitem:hostObject hostitem:name="Application" hostitem:identifier="Application" hostitem:type="Microsoft.Office.Interop.Word.Application" hostitem:cookie="Application" hostitem:modifier="Internal" />
|
||||
<hostitem:hostControl hostitem:name="CustomTaskPanes" hostitem:identifier="CustomTaskPanes" hostitem:type="Microsoft.Office.Tools.CustomTaskPaneCollection" hostitem:primaryCookie="CustomTaskPanes" hostitem:modifier="Internal" />
|
||||
<hostitem:hostControl hostitem:name="VstoSmartTags" hostitem:identifier="VstoSmartTags" hostitem:type="Microsoft.Office.Tools.SmartTagCollection" hostitem:primaryCookie="VstoSmartTags" hostitem:modifier="Internal" />
|
||||
</hostitem:hostItem>
|
215
TestWordAddIn1/ThisAddIn.cs
Normal file
215
TestWordAddIn1/ThisAddIn.cs
Normal file
@ -0,0 +1,215 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
using System.Runtime.InteropServices;
|
||||
using CustomTaskPane = Microsoft.Office.Tools.CustomTaskPane;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace TestWordAddIn1
|
||||
{
|
||||
public partial class ThisAddIn
|
||||
{
|
||||
|
||||
public OfficeType officeType = OfficeType.Word;
|
||||
public string applicationStartupPath;
|
||||
public bool proofreadPanelOpen;
|
||||
private ProofreadPanel proofreadPanel;
|
||||
private Dictionary<Document, CustomTaskPane> myTaskPanes;
|
||||
private CustomTaskPane myCustomTaskPane;
|
||||
|
||||
private void ThisAddIn_Startup(object sender, System.EventArgs e)
|
||||
{
|
||||
this.applicationStartupPath = System.Windows.Forms.Application.ProductName;
|
||||
|
||||
if (applicationStartupPath.Contains("WPS"))
|
||||
{
|
||||
this.officeType = OfficeType.WPS;
|
||||
return;
|
||||
}
|
||||
var eventInfo = new ComAwareEventInfo(typeof(ApplicationEvents4_Event), "DocumentOpen");
|
||||
var handler = new ApplicationEvents4_DocumentOpenEventHandler(Application_DocumentOpen);
|
||||
|
||||
// 监听文档相关操作
|
||||
//eventInfo.AddEventHandler(this, handler);
|
||||
//new ComAwareEventInfo(typeof(ApplicationEvents4_Event), "NewDocument").AddEventHandler(Application, new ApplicationEvents4_NewDocumentEventHandler(Application_NewDocument));
|
||||
//new ComAwareEventInfo(typeof(ApplicationEvents4_Event), "WindowActivate").AddEventHandler(Application, new ApplicationEvents4_WindowActivateEventHandler(Application_WindowActivate));
|
||||
//new ComAwareEventInfo(typeof(ApplicationEvents4_Event), "WindowDeactivate").AddEventHandler(Application, new ApplicationEvents4_WindowDeactivateEventHandler(Application_WindowDeactivate));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 隐藏所有的面板
|
||||
/// </summary>
|
||||
void HideAllPane()
|
||||
{
|
||||
foreach (CustomTaskPane customTaskPane in CustomTaskPanes)
|
||||
{
|
||||
customTaskPane.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void Application_NewDocument(Document doc)
|
||||
{
|
||||
Console.WriteLine("Application_NewDocument");
|
||||
InitProofreadPanel();
|
||||
HideAllPane();
|
||||
}
|
||||
|
||||
private void Application_DocumentOpen(Document doc)
|
||||
{
|
||||
Console.WriteLine("Application_DocumentOpen");
|
||||
InitProofreadPanel();
|
||||
HideAllPane();
|
||||
}
|
||||
|
||||
private void Application_DocumentChange()
|
||||
{
|
||||
Console.WriteLine("Application_DocumentChange");
|
||||
ShowTaskPaneForActiveDocument();
|
||||
}
|
||||
|
||||
|
||||
private void ShowTaskPaneForActiveDocument()
|
||||
{
|
||||
// 获取当前文档
|
||||
Document activeDocument = Application.ActiveDocument;
|
||||
// 如果现有任务不包含文档则直接返回
|
||||
if (!myTaskPanes.ContainsKey(activeDocument))
|
||||
{
|
||||
return;
|
||||
}
|
||||
// 显示当前文档panel隐藏其他文档panel
|
||||
foreach (var item in myTaskPanes)
|
||||
{
|
||||
if (item.Key == activeDocument)
|
||||
{
|
||||
item.Value.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Value.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Application_WindowActivate_WPS(Document document, Window window)
|
||||
{
|
||||
Console.WriteLine("Application_WindowActivate_WPS");
|
||||
if (myCustomTaskPane == null)
|
||||
{
|
||||
InitProofreadPanel();
|
||||
}
|
||||
}
|
||||
|
||||
public void Application_WindowActivate(Document document, Window window)
|
||||
{
|
||||
Console.WriteLine("Application_WindowActivate");
|
||||
//bool flag = true;
|
||||
//if (myTaskPanes != null)
|
||||
//{
|
||||
// foreach (KeyValuePair<Document,CustomTaskPane> customTaskPane in myTaskPanes)
|
||||
// {
|
||||
// if (customTaskPane.Key == Application.ActiveDocument)
|
||||
// {
|
||||
// flag = false;
|
||||
// myCustomTaskPane = customTaskPane.Value;
|
||||
// proofreadPanel = userControls[Application.ActiveDocument];
|
||||
// myCustomTaskPane.Visible = customTaskPanesVisible[Application.ActiveDocument];
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if (flag)
|
||||
// {
|
||||
// NewCustomTaskPane();
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// NewCustomTaskPane();
|
||||
//}
|
||||
//Globals.Ribbons.Ribbon.button_viewOn.Visible = !myCustomTaskPane.Visible;
|
||||
//Globals.Ribbons.Ribbon.button_viewOff.Visible = myCustomTaskPane.Visible;
|
||||
}
|
||||
|
||||
public void Application_WindowDeactivate(Document document, Window window)
|
||||
{
|
||||
Console.WriteLine("Application_WindowDeactivate");
|
||||
//if (customTaskPanesVisible.ContainsKey(document))
|
||||
//{
|
||||
// customTaskPanesVisible[document] = myCustomTaskPane.Visible;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// customTaskPanesVisible.Add(document, myCustomTaskPane.Visible);
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 面板最小宽度
|
||||
/// </summary>
|
||||
private static readonly int MIN_WIDTH = 380;
|
||||
|
||||
void InitProofreadPanel()
|
||||
{
|
||||
if(this.myCustomTaskPane == null)
|
||||
{
|
||||
// 创建
|
||||
proofreadPanel = new ProofreadPanel();
|
||||
// 添加到panes
|
||||
this.myCustomTaskPane = CustomTaskPanes.Add(proofreadPanel, AppConfig.PanelName);
|
||||
// 先隐藏
|
||||
this.myCustomTaskPane.Visible = false;
|
||||
myCustomTaskPane.Width = MIN_WIDTH;
|
||||
this.myCustomTaskPane.VisibleChanged += OnProofreadPanel_VisibleChange;
|
||||
// 添加到集合
|
||||
//this.myTaskPanes.Add(Application.ActiveDocument, this.myCustomTaskPane);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 当面板的显示变化时
|
||||
private void OnProofreadPanel_VisibleChange(object sender, EventArgs e)
|
||||
{
|
||||
if(this.myCustomTaskPane != null && myCustomTaskPane.Width < MIN_WIDTH)
|
||||
{
|
||||
this.myCustomTaskPane.Width = MIN_WIDTH;
|
||||
}
|
||||
}
|
||||
|
||||
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
public void SetPanelVisible(bool open)
|
||||
{
|
||||
if (this.proofreadPanelOpen == open) return;
|
||||
|
||||
this.InitProofreadPanel();
|
||||
this.proofreadPanelOpen = open;
|
||||
this.myCustomTaskPane.Visible = this.proofreadPanelOpen;
|
||||
}
|
||||
public bool TogglePanelVisible()
|
||||
{
|
||||
this.proofreadPanelOpen = !this.proofreadPanelOpen;
|
||||
this.myCustomTaskPane.Visible = this.proofreadPanelOpen;
|
||||
return this.proofreadPanelOpen;
|
||||
}
|
||||
|
||||
#region VSTO 生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InternalStartup()
|
||||
{
|
||||
this.Startup += new System.EventHandler(ThisAddIn_Startup);
|
||||
this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Binary file not shown.
BIN
TestWordAddIn1/bin/Debug/Microsoft.Web.WebView2.Core.dll
Normal file
BIN
TestWordAddIn1/bin/Debug/Microsoft.Web.WebView2.Core.dll
Normal file
Binary file not shown.
7634
TestWordAddIn1/bin/Debug/Microsoft.Web.WebView2.Core.xml
Normal file
7634
TestWordAddIn1/bin/Debug/Microsoft.Web.WebView2.Core.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
TestWordAddIn1/bin/Debug/Microsoft.Web.WebView2.WinForms.dll
Normal file
BIN
TestWordAddIn1/bin/Debug/Microsoft.Web.WebView2.WinForms.dll
Normal file
Binary file not shown.
504
TestWordAddIn1/bin/Debug/Microsoft.Web.WebView2.WinForms.xml
Normal file
504
TestWordAddIn1/bin/Debug/Microsoft.Web.WebView2.WinForms.xml
Normal file
@ -0,0 +1,504 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Microsoft.Web.WebView2.WinForms</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties">
|
||||
<summary>
|
||||
This class is a bundle of the most common parameters used to create <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2Environment"/> and <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2Controller"/> instances.
|
||||
Its main purpose is to be set to <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CreationProperties"/> in order to customize the environment and/or controller used by a <see cref="T:Microsoft.Web.WebView2.WinForms.WebView2"/> during implicit initialization.
|
||||
</summary>
|
||||
<remarks>
|
||||
This class isn't intended to contain all possible environment or controller customization options.
|
||||
If you need complete control over the environment and/or controller used by a WebView2 control then you'll need to initialize the control explicitly by
|
||||
creating your own environment (with <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateAsync(System.String,System.String,Microsoft.Web.WebView2.Core.CoreWebView2EnvironmentOptions)"/>) and/or controller options (with <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateCoreWebView2ControllerOptions"/>) and passing them to <see cref="M:Microsoft.Web.WebView2.WinForms.WebView2.EnsureCoreWebView2Async(Microsoft.Web.WebView2.Core.CoreWebView2Environment,Microsoft.Web.WebView2.Core.CoreWebView2ControllerOptions)"/>
|
||||
*before* you set the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.Source"/> property to anything.
|
||||
See the <see cref="T:Microsoft.Web.WebView2.WinForms.WebView2"/> class documentation for an initialization overview.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties.#ctor">
|
||||
<summary>
|
||||
Creates a new instance of <see cref="T:Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties"/> with default data for all properties.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties.BrowserExecutableFolder">
|
||||
<summary>
|
||||
Gets or sets the value to pass as the browserExecutableFolder parameter of <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateAsync(System.String,System.String,Microsoft.Web.WebView2.Core.CoreWebView2EnvironmentOptions)"/> when creating an environment with this instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties.UserDataFolder">
|
||||
<summary>
|
||||
Gets or sets the value to pass as the userDataFolder parameter of <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateAsync(System.String,System.String,Microsoft.Web.WebView2.Core.CoreWebView2EnvironmentOptions)"/> when creating an environment with this instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties.Language">
|
||||
<summary>
|
||||
Gets or sets the value to use for the Language property of the CoreWebView2EnvironmentOptions parameter passed to <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateAsync(System.String,System.String,Microsoft.Web.WebView2.Core.CoreWebView2EnvironmentOptions)"/> when creating an environment with this instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties.ProfileName">
|
||||
<summary>
|
||||
Gets or sets the value to use for the ProfileName property of the CoreWebView2ControllerOptions parameter passed to CreateCoreWebView2ControllerWithOptionsAsync when creating an controller with this instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties.AdditionalBrowserArguments">
|
||||
<summary>
|
||||
Gets or sets the value to pass as the AdditionalBrowserArguments parameter of <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2EnvironmentOptions"/> which is passed to <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateAsync(System.String,System.String,Microsoft.Web.WebView2.Core.CoreWebView2EnvironmentOptions)"/> when creating an environment with this instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties.IsInPrivateModeEnabled">
|
||||
<summary>
|
||||
Gets or sets the value to use for the IsInPrivateModeEnabled property of the CoreWebView2ControllerOptions parameter passed to CreateCoreWebView2ControllerWithOptionsAsync when creating an controller with this instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties.CreateEnvironmentAsync">
|
||||
<summary>
|
||||
Create a <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2Environment"/> using the current values of this instance's properties.
|
||||
</summary>
|
||||
<returns>A task which will provide the created environment on completion, or null if no environment-related options are set.</returns>
|
||||
<remarks>
|
||||
As long as no other properties on this instance are changed, repeated calls to this method will return the same task/environment as earlier calls.
|
||||
If some other property is changed then the next call to this method will return a different task/environment.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties.CreateCoreWebView2ControllerOptions(Microsoft.Web.WebView2.Core.CoreWebView2Environment)">
|
||||
<summary>
|
||||
Creates a <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2ControllerOptions"/> using the current values of this instance's properties.
|
||||
</summary>
|
||||
<returns>A <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2ControllerOptions"/> object or null if no controller-related properties are set.</returns>
|
||||
<exception cref="!:NullReferenceException">Thrown if the parameter environment is null.</exception>
|
||||
</member>
|
||||
<member name="T:Microsoft.Web.WebView2.WinForms.WebView2">
|
||||
<summary>
|
||||
Control to embed WebView2 in WinForms.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.#ctor">
|
||||
<summary>
|
||||
Create a new WebView2 WinForms control.
|
||||
After construction the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> property is <c>null</c>.
|
||||
Call <see cref="M:Microsoft.Web.WebView2.WinForms.WebView2.EnsureCoreWebView2Async(Microsoft.Web.WebView2.Core.CoreWebView2Environment,Microsoft.Web.WebView2.Core.CoreWebView2ControllerOptions)"/> to initialize the underlying <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2"/>.
|
||||
</summary>
|
||||
<remarks>
|
||||
This control is effectively a wrapper around the WebView2 COM API, which you can find documentation for here: https://aka.ms/webview2
|
||||
You can directly access the underlying ICoreWebView2 interface and all of its functionality by accessing the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> property.
|
||||
Some of the most common COM functionality is also accessible directly through wrapper methods/properties/events on the control.
|
||||
|
||||
Upon creation, the control's CoreWebView2 property will be null.
|
||||
This is because creating the CoreWebView2 is an expensive operation which involves things like launching Edge browser processes.
|
||||
There are two ways to cause the CoreWebView2 to be created:
|
||||
1) Call the <see cref="M:Microsoft.Web.WebView2.WinForms.WebView2.EnsureCoreWebView2Async(Microsoft.Web.WebView2.Core.CoreWebView2Environment,Microsoft.Web.WebView2.Core.CoreWebView2ControllerOptions)"/> method. This is referred to as explicit initialization.
|
||||
2) Set the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.Source"/> property. This is referred to as implicit initialization.
|
||||
Either option will start initialization in the background and return back to the caller without waiting for it to finish.
|
||||
To specify options regarding the initialization process, either pass your own <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2Environment"/> to EnsureCoreWebView2Async or set the control's <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CreationProperties"/> property prior to initialization.
|
||||
|
||||
When initialization has finished (regardless of how it was triggered) then the following things will occur, in this order:
|
||||
1) The control's <see cref="E:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2InitializationCompleted"/> event will be invoked. If you need to perform one time setup operations on the CoreWebView2 prior to its use then you should do so in a handler for that event.
|
||||
2) If a Uri has been set to the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.Source"/> property then the control will start navigating to it in the background (i.e. these steps will continue without waiting for the navigation to finish).
|
||||
3) The Task returned from <see cref="M:Microsoft.Web.WebView2.WinForms.WebView2.EnsureCoreWebView2Async(Microsoft.Web.WebView2.Core.CoreWebView2Environment,Microsoft.Web.WebView2.Core.CoreWebView2ControllerOptions)"/> will complete.
|
||||
|
||||
For more details about any of the methods/properties/events involved in the initialization process, see its specific documentation.
|
||||
|
||||
Accelerator key presses (e.g. Ctrl+P) that occur within the control will
|
||||
fire standard key press events such as OnKeyDown. You can suppress the
|
||||
control's default implementation of an accelerator key press (e.g.
|
||||
printing, in the case of Ctrl+P) by setting the Handled property of its
|
||||
EventArgs to true. Also note that the underlying browser process is
|
||||
blocked while these handlers execute, so:
|
||||
<list type="number">
|
||||
<item>
|
||||
You should avoid doing a lot of work in these handlers.
|
||||
</item>
|
||||
<item>
|
||||
Some of the WebView2 and CoreWebView2 APIs may throw errors if
|
||||
invoked within these handlers due to being unable to communicate with
|
||||
the browser process.
|
||||
</item>
|
||||
</list>
|
||||
If you need to do a lot of work and/or invoke WebView2 APIs in response to
|
||||
accelerator keys then consider kicking off a background task or queuing
|
||||
the work for later execution on the UI thread.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.Dispose(System.Boolean)">
|
||||
<summary>
|
||||
Cleans up any resources being used.
|
||||
</summary>
|
||||
<param name="disposing"><c>true</c> if managed resources should be disposed; otherwise, <c>false</c>.</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.OnPaint(System.Windows.Forms.PaintEventArgs)">
|
||||
<summary>
|
||||
Overrides the base OnPaint event to have custom actions
|
||||
in designer mode
|
||||
</summary>
|
||||
<param name="e">The graphics devices which is the source</param>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.WndProc(System.Windows.Forms.Message@)">
|
||||
<summary>
|
||||
Overrides the base WndProc events to handle specific window messages.
|
||||
</summary>
|
||||
<param name="m">The Message object containing the HWND window message and parameters</param>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.WebView2.CreationProperties">
|
||||
<summary>
|
||||
Gets or sets a bag of options which are used during initialization of the control's <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/>.
|
||||
This property cannot be modified (an exception will be thrown) after initialization of the control's CoreWebView2 has started.
|
||||
</summary>
|
||||
<exception cref="T:System.InvalidOperationException">Thrown if initialization of the control's CoreWebView2 has already started.</exception>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.EnsureCoreWebView2Async(Microsoft.Web.WebView2.Core.CoreWebView2Environment,Microsoft.Web.WebView2.Core.CoreWebView2ControllerOptions)">
|
||||
<summary>
|
||||
Explicitly trigger initialization of the control's <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/>.
|
||||
</summary>
|
||||
<param name="environment">
|
||||
A pre-created <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2Environment"/> that should be used to create the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/>.
|
||||
Creating your own environment gives you control over several options that affect how the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> is initialized.
|
||||
If you pass <c>null</c> (the default value) then a default environment will be created and used automatically.
|
||||
</param>
|
||||
<param name="controllerOptions">
|
||||
A pre-created <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2ControllerOptions"/> that should be used to create the <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2"/>.
|
||||
Creating your own controller options gives you control over several options that affect how the <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2"/> is initialized.
|
||||
If you pass a controllerOptions to this method then it will override any settings specified on the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CreationProperties"/> property.
|
||||
If you pass <c>null</c> (the default value) and no value has been set to <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CreationProperties"/> then a default controllerOptions will be created and used automatically.
|
||||
</param>
|
||||
<returns>
|
||||
A Task that represents the background initialization process.
|
||||
When the task completes then the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> property will be available for use (i.e. non-null).
|
||||
Note that the control's <see cref="E:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2InitializationCompleted"/> event will be invoked before the task completes
|
||||
or on exceptions.
|
||||
</returns>
|
||||
<remarks>
|
||||
Unless previous initialization has already failed, calling this method additional times with the same parameter will have no effect (any specified environment is ignored) and return the same Task as the first call.
|
||||
Unless previous initialization has already failed, calling this method after initialization has been implicitly triggered by setting the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.Source"/> property will have no effect if no environment is given
|
||||
and simply return a Task representing that initialization already in progress.
|
||||
Unless previous initialization has already failed, calling this method with a different environment after initialization has begun will result in an <see cref="T:System.ArgumentException"/>. For example, this can happen if you begin initialization
|
||||
by setting the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.Source"/> property and then call this method with a new environment, if you begin initialization with <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CreationProperties"/> and then call this method with a new
|
||||
environment, or if you begin initialization with one environment and then call this method with no environment specified.
|
||||
When this method is called after previous initialization has failed, it will trigger initialization of the control's <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> again.
|
||||
Note that even though this method is asynchronous and returns a Task, it still must be called on the UI thread like most public functionality of most UI controls.
|
||||
<para>
|
||||
The following summarizes the possible error values and a description of why these errors occur.
|
||||
<list type="table">
|
||||
<listheader>
|
||||
<description>Error Value</description>
|
||||
<description>Description</description>
|
||||
</listheader>
|
||||
<item>
|
||||
<description><c>HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)</c></description>
|
||||
<description>*\\Edge\\Application* path used in browserExecutableFolder.</description>
|
||||
</item>
|
||||
<item>
|
||||
<description><c>HRESULT_FROM_WIN32(ERROR_INVALID_STATE)</c></description>
|
||||
<description>Specified options do not match the options of the WebViews that are currently running in the shared browser process.</description>
|
||||
</item>
|
||||
<item>
|
||||
<description><c>HRESULT_FROM_WIN32(ERROR_INVALID_WINDOW_HANDLE)</c></description>
|
||||
<description>WebView2 Initialization failed due to an invalid host HWND parentWindow.</description>
|
||||
</item>
|
||||
<item>
|
||||
<description><c>HRESULT_FROM_WIN32(ERROR_DISK_FULL)</c></description>
|
||||
<description>WebView2 Initialization failed due to reaching the maximum number of installed runtime versions.</description>
|
||||
</item>
|
||||
<item>
|
||||
<description><c>HRESULT_FROM_WIN32(ERROR_PRODUCT_UNINSTALLED</c></description>
|
||||
<description>If the Webview depends upon an installed WebView2 Runtime version and it is uninstalled.</description>
|
||||
</item>
|
||||
<item>
|
||||
<description><c>HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)</c></description>
|
||||
<description>Could not find Edge installation.</description>
|
||||
</item>
|
||||
<item>
|
||||
<description><c>HRESULT_FROM_WIN32(ERROR_FILE_EXISTS)</c></description>
|
||||
<description>User data folder cannot be created because a file with the same name already exists.</description>
|
||||
</item>
|
||||
<item>
|
||||
<description><c>E_ACCESSDENIED</c></description>
|
||||
<description>Unable to create user data folder, Access Denied.</description>
|
||||
</item>
|
||||
<item>
|
||||
<description><c>E_FAIL</c></description>
|
||||
<description>Edge runtime unable to start.</description>
|
||||
</item>
|
||||
</list>
|
||||
</para>
|
||||
</remarks>
|
||||
<exception cref="T:System.ArgumentException">
|
||||
Thrown if this method is called with a different environment than when it was initialized. See Remarks for more info.
|
||||
</exception>
|
||||
<exception cref="T:System.InvalidOperationException">
|
||||
Thrown if this instance of <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> is already disposed, or if the calling thread isn't the thread which created this object (usually the UI thread). See <see cref="P:System.Windows.Forms.Control.InvokeRequired"/> for more info.
|
||||
May also be thrown if the browser process has crashed unexpectedly and left the control in an invalid state. We are considering throwing a different type of exception for this case in the future.
|
||||
</exception>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.EnsureCoreWebView2Async(Microsoft.Web.WebView2.Core.CoreWebView2Environment)">
|
||||
<summary>
|
||||
Explicitly trigger initialization of the control's <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/>.
|
||||
</summary>
|
||||
<param name="environment">
|
||||
A pre-created <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2Environment"/> that should be used to create the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/>.
|
||||
Creating your own environment gives you control over several options that affect how the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> is initialized.
|
||||
If you pass <c>null</c> then a default environment will be created and used automatically.
|
||||
</param>
|
||||
<returns>
|
||||
A Task that represents the background initialization process.
|
||||
When the task completes then the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> property will be available for use (i.e. non-null).
|
||||
Note that the control's <see cref="E:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2InitializationCompleted"/> event will be invoked before the task completes
|
||||
or on exceptions.
|
||||
</returns>
|
||||
<remarks>
|
||||
Unless previous initialization has already failed, calling this method additional times with the same parameter will have no effect (any specified environment is ignored) and return the same Task as the first call.
|
||||
Unless previous initialization has already failed, calling this method after initialization has been implicitly triggered by setting the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.Source"/> property will have no effect if no environment is given
|
||||
and simply return a Task representing that initialization already in progress.
|
||||
Unless previous initialization has already failed, calling this method with a different environment after initialization has begun will result in an <see cref="T:System.ArgumentException"/>. For example, this can happen if you begin initialization
|
||||
by setting the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.Source"/> property and then call this method with a new environment, if you begin initialization with <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CreationProperties"/> and then call this method with a new
|
||||
environment, or if you begin initialization with one environment and then call this method with no environment specified.
|
||||
When this method is called after previous initialization has failed, it will trigger initialization of the control's <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> again.
|
||||
Note that even though this method is asynchronous and returns a Task, it still must be called on the UI thread like most public functionality of most UI controls.
|
||||
</remarks>
|
||||
<exception cref="T:System.ArgumentException">
|
||||
Thrown if this method is called with a different environment than when it was initialized. See Remarks for more info.
|
||||
</exception>
|
||||
<exception cref="T:System.InvalidOperationException">
|
||||
Thrown if this instance of <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> is already disposed, or if the calling thread isn't the thread which created this object (usually the UI thread). See <see cref="P:System.Windows.Forms.Control.InvokeRequired"/> for more info.
|
||||
May also be thrown if the browser process has crashed unexpectedly and left the control in an invalid state. We are considering throwing a different type of exception for this case in the future.
|
||||
</exception>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.InitCoreWebView2Async(Microsoft.Web.WebView2.Core.CoreWebView2Environment,Microsoft.Web.WebView2.Core.CoreWebView2ControllerOptions)">
|
||||
<summary>
|
||||
This is the private function which implements the actual background initialization task.
|
||||
Cannot be called if the control is already initialized or has been disposed.
|
||||
</summary>
|
||||
<param name="environment">
|
||||
The environment to use to create the <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2Controller"/>.
|
||||
If that is null then a default environment is created with <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateAsync(System.String,System.String,Microsoft.Web.WebView2.Core.CoreWebView2EnvironmentOptions)"/> and its default parameters.
|
||||
</param>
|
||||
<param name="controllerOptions">
|
||||
The controllerOptions to use to create the <see cref="T:Microsoft.Web.WebView2.Core.CoreWebView2Controller"/>.
|
||||
If that is null then a default controllerOptions is created with its default parameters.
|
||||
</param>
|
||||
<returns>A task representing the background initialization process.</returns>
|
||||
<remarks>All the event handlers added here need to be removed in <see cref="M:Microsoft.Web.WebView2.WinForms.WebView2.Dispose(System.Boolean)"/>.</remarks>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.WebView2.CreateParams">
|
||||
<summary>
|
||||
Protected CreateParams property. Used to set custom window styles to the forms HWND.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.OnVisibleChanged(System.EventArgs)">
|
||||
<summary>
|
||||
Protected VisibilityChanged handler.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.OnSizeChanged(System.EventArgs)">
|
||||
<summary>
|
||||
Protected SizeChanged handler.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.Select(System.Boolean,System.Boolean)">
|
||||
<summary>
|
||||
Protected Select method: override this to capture tab direction when WebView control is activated
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.OnGotFocus(System.EventArgs)">
|
||||
<summary>
|
||||
Protected OnGotFocus handler.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.OnParentChanged(System.EventArgs)">
|
||||
<summary>
|
||||
Protected OnParentChanged handler.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.WebView2.IsInitialized">
|
||||
<summary>
|
||||
True if initialization finished successfully and the control is not disposed yet.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.GetSitedParentSite(System.Windows.Forms.Control)">
|
||||
<summary>
|
||||
Recursive retrieval of the parent control
|
||||
</summary>
|
||||
<param name="control">The control to get the parent for</param>
|
||||
<returns>The root parent control</returns>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2">
|
||||
<summary>
|
||||
The underlying CoreWebView2. Use this property to perform more operations on the WebView2 content than is exposed
|
||||
on the WebView2. This value is null until it is initialized and the object itself has undefined behaviour once the control is disposed.
|
||||
You can force the underlying CoreWebView2 to
|
||||
initialize via the <see cref="M:Microsoft.Web.WebView2.WinForms.WebView2.EnsureCoreWebView2Async(Microsoft.Web.WebView2.Core.CoreWebView2Environment,Microsoft.Web.WebView2.Core.CoreWebView2ControllerOptions)"/> method.
|
||||
</summary>
|
||||
<exception cref="T:System.InvalidOperationException">Thrown if the calling thread isn't the thread which created this object (usually the UI thread). See <see cref="P:System.Windows.Forms.Control.InvokeRequired"/> for more info.</exception>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.WebView2.ZoomFactor">
|
||||
<summary>
|
||||
The zoom factor for the WebView.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.WebView2.AllowExternalDrop">
|
||||
<summary>
|
||||
Enable/disable external drop.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.WebView2.Source">
|
||||
<summary>
|
||||
The Source property is the URI of the top level document of the
|
||||
WebView2. Setting the Source is equivalent to calling <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.Navigate(System.String)"/>.
|
||||
Setting the Source will trigger initialization of the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/>, if not already initialized.
|
||||
The default value of Source is <c>null</c>, indicating that the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> is not yet initialized.
|
||||
</summary>
|
||||
<exception cref="T:System.ArgumentException">Specified value is not an absolute <see cref="T:System.Uri"/>.</exception>
|
||||
<exception cref="T:System.NotImplementedException">Specified value is <c>null</c> and the control is initialized.</exception>
|
||||
<seealso cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.Navigate(System.String)"/>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.WebView2.CanGoForward">
|
||||
<summary>
|
||||
Returns true if the webview can navigate to a next page in the
|
||||
navigation history via the <see cref="M:Microsoft.Web.WebView2.WinForms.WebView2.GoForward"/> method.
|
||||
This is equivalent to the <see cref="P:Microsoft.Web.WebView2.Core.CoreWebView2.CanGoForward"/>.
|
||||
If the underlying <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> is not yet initialized, this property is <c>false</c>.
|
||||
</summary>
|
||||
<seealso cref="P:Microsoft.Web.WebView2.Core.CoreWebView2.CanGoForward"/>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.WebView2.CanGoBack">
|
||||
<summary>
|
||||
Returns <c>true</c> if the webview can navigate to a previous page in the
|
||||
navigation history via the <see cref="M:Microsoft.Web.WebView2.WinForms.WebView2.GoBack"/> method.
|
||||
This is equivalent to the <see cref="P:Microsoft.Web.WebView2.Core.CoreWebView2.CanGoBack"/>.
|
||||
If the underlying <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> is not yet initialized, this property is <c>false</c>.
|
||||
</summary>
|
||||
<seealso cref="P:Microsoft.Web.WebView2.Core.CoreWebView2.CanGoBack"/>
|
||||
</member>
|
||||
<member name="P:Microsoft.Web.WebView2.WinForms.WebView2.DefaultBackgroundColor">
|
||||
<summary>
|
||||
The default background color for the WebView.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.ExecuteScriptAsync(System.String)">
|
||||
<summary>
|
||||
Executes the provided script in the top level document of the <see cref="T:Microsoft.Web.WebView2.WinForms.WebView2"/>.
|
||||
This is equivalent to <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.ExecuteScriptAsync(System.String)"/>.
|
||||
</summary>
|
||||
<exception cref="T:System.InvalidOperationException">The underlying <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> is not yet initialized.</exception>
|
||||
<exception cref="T:System.InvalidOperationException">Thrown when browser process has unexpectedly and left this control in an invalid state. We are considering throwing a different type of exception for this case in the future.</exception>
|
||||
<seealso cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.ExecuteScriptAsync(System.String)"/>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.Reload">
|
||||
<summary>
|
||||
Reloads the top level document of the <see cref="T:Microsoft.Web.WebView2.WinForms.WebView2"/>.
|
||||
This is equivalent to <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.Reload"/>.
|
||||
</summary>
|
||||
<exception cref="T:System.InvalidOperationException">The underlying <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> is not yet initialized.</exception>
|
||||
<exception cref="T:System.InvalidOperationException">Thrown when browser process has unexpectedly and left this control in an invalid state. We are considering throwing a different type of exception for this case in the future.</exception>
|
||||
<seealso cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.Reload"/>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.GoForward">
|
||||
<summary>
|
||||
Navigates to the next page in navigation history.
|
||||
This is equivalent to <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.GoForward"/>.
|
||||
If the underlying <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> is not yet initialized, this method does nothing.
|
||||
</summary>
|
||||
<seealso cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.GoForward"/>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.GoBack">
|
||||
<summary>
|
||||
Navigates to the previous page in navigation history.
|
||||
This is equivalent to <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.GoBack"/>.
|
||||
If the underlying <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> is not yet initialized, this method does nothing.
|
||||
</summary>
|
||||
<seealso cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.GoBack"/>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.NavigateToString(System.String)">
|
||||
<summary>
|
||||
Renders the provided HTML as the top level document of the <see cref="T:Microsoft.Web.WebView2.WinForms.WebView2"/>.
|
||||
This is equivalent to <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.NavigateToString(System.String)"/>.
|
||||
</summary>
|
||||
<exception cref="T:System.InvalidOperationException">The underlying <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> is not yet initialized.</exception>
|
||||
<exception cref="T:System.InvalidOperationException">Thrown when browser process has unexpectedly and left this control in an invalid state. We are considering throwing a different type of exception for this case in the future.</exception>
|
||||
<remarks>The <c>htmlContent</c> parameter may not be larger than 2 MB (2 * 1024 * 1024 bytes) in total size. The origin of the new page is <c>about:blank</c>.</remarks>
|
||||
<seealso cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.NavigateToString(System.String)"/>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.Stop">
|
||||
<summary>
|
||||
Stops any in progress navigation in the <see cref="T:Microsoft.Web.WebView2.WinForms.WebView2"/>.
|
||||
This is equivalent to <see cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.Stop"/>.
|
||||
If the underlying <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> is not yet initialized, this method does nothing.
|
||||
</summary>
|
||||
<seealso cref="M:Microsoft.Web.WebView2.Core.CoreWebView2.Stop"/>
|
||||
</member>
|
||||
<member name="E:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2InitializationCompleted">
|
||||
<summary>
|
||||
This event is triggered either 1) when the control's <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.CoreWebView2"/> has finished being initialized (regardless of how it was triggered or whether it succeeded) but before it is used for anything
|
||||
OR 2) the initialization failed.
|
||||
You should handle this event if you need to perform one time setup operations on the CoreWebView2 which you want to affect all of its usages
|
||||
(e.g. adding event handlers, configuring settings, installing document creation scripts, adding host objects).
|
||||
</summary>
|
||||
<remarks>
|
||||
This sender will be the WebView2 control, whose CoreWebView2 property will now be valid (i.e. non-null) for the first time
|
||||
if <see cref="P:Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs.IsSuccess"/> is true.
|
||||
Unlikely this event can fire second time (after reporting initialization success first)
|
||||
if the initialization is followed by navigation which fails.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="E:Microsoft.Web.WebView2.WinForms.WebView2.NavigationStarting">
|
||||
<summary>
|
||||
NavigationStarting dispatches before a new navigate starts for the top
|
||||
level document of the <see cref="T:Microsoft.Web.WebView2.WinForms.WebView2"/>.
|
||||
This is equivalent to the <see cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.NavigationStarting"/> event.
|
||||
</summary>
|
||||
<seealso cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.NavigationStarting"/>
|
||||
</member>
|
||||
<member name="E:Microsoft.Web.WebView2.WinForms.WebView2.NavigationCompleted">
|
||||
<summary>
|
||||
NavigationCompleted dispatches after a navigate of the top level
|
||||
document completes rendering either successfully or not.
|
||||
This is equivalent to the <see cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.NavigationCompleted"/> event.
|
||||
</summary>
|
||||
<seealso cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.NavigationCompleted"/>
|
||||
</member>
|
||||
<member name="E:Microsoft.Web.WebView2.WinForms.WebView2.WebMessageReceived">
|
||||
<summary>
|
||||
WebMessageReceived dispatches after web content sends a message to the
|
||||
app host via <c>chrome.webview.postMessage</c>.
|
||||
This is equivalent to the <see cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.WebMessageReceived"/> event.
|
||||
</summary>
|
||||
<seealso cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.WebMessageReceived"/>
|
||||
</member>
|
||||
<member name="E:Microsoft.Web.WebView2.WinForms.WebView2.SourceChanged">
|
||||
<summary>
|
||||
SourceChanged dispatches after the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.Source"/> property changes. This may happen
|
||||
during a navigation or if otherwise the script in the page changes the
|
||||
URI of the document.
|
||||
This is equivalent to the <see cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.SourceChanged"/> event.
|
||||
</summary>
|
||||
<seealso cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.SourceChanged"/>
|
||||
</member>
|
||||
<member name="E:Microsoft.Web.WebView2.WinForms.WebView2.ContentLoading">
|
||||
<summary>
|
||||
ContentLoading dispatches after a navigation begins to a new URI and the
|
||||
content of that URI begins to render.
|
||||
This is equivalent to the <see cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.ContentLoading"/> event.
|
||||
</summary>
|
||||
<seealso cref="E:Microsoft.Web.WebView2.Core.CoreWebView2.ContentLoading"/>
|
||||
</member>
|
||||
<member name="E:Microsoft.Web.WebView2.WinForms.WebView2.ZoomFactorChanged">
|
||||
<summary>
|
||||
ZoomFactorChanged dispatches when the <see cref="P:Microsoft.Web.WebView2.WinForms.WebView2.ZoomFactor"/> property changes.
|
||||
This is equivalent to the <see cref="E:Microsoft.Web.WebView2.Core.CoreWebView2Controller.ZoomFactorChanged"/> event.
|
||||
</summary>
|
||||
<seealso cref="E:Microsoft.Web.WebView2.Core.CoreWebView2Controller.ZoomFactorChanged"/>
|
||||
</member>
|
||||
<member name="F:Microsoft.Web.WebView2.WinForms.WebView2.components">
|
||||
<summary>
|
||||
Required designer variable.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Microsoft.Web.WebView2.WinForms.WebView2.InitializeComponent">
|
||||
<summary>
|
||||
Required method for Designer support - do not modify
|
||||
the contents of this method with the code editor.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
BIN
TestWordAddIn1/bin/Debug/Microsoft.Web.WebView2.Wpf.dll
Normal file
BIN
TestWordAddIn1/bin/Debug/Microsoft.Web.WebView2.Wpf.dll
Normal file
Binary file not shown.
1057
TestWordAddIn1/bin/Debug/Microsoft.Web.WebView2.Wpf.xml
Normal file
1057
TestWordAddIn1/bin/Debug/Microsoft.Web.WebView2.Wpf.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
TestWordAddIn1/bin/Debug/Newtonsoft.Json.dll
Normal file
BIN
TestWordAddIn1/bin/Debug/Newtonsoft.Json.dll
Normal file
Binary file not shown.
11363
TestWordAddIn1/bin/Debug/Newtonsoft.Json.xml
Normal file
11363
TestWordAddIn1/bin/Debug/Newtonsoft.Json.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
TestWordAddIn1/bin/Debug/TestWordAddIn1.dll
Normal file
BIN
TestWordAddIn1/bin/Debug/TestWordAddIn1.dll
Normal file
Binary file not shown.
299
TestWordAddIn1/bin/Debug/TestWordAddIn1.dll.manifest
Normal file
299
TestWordAddIn1/bin/Debug/TestWordAddIn1.dll.manifest
Normal file
@ -0,0 +1,299 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<asmv1:assemblyIdentity name="TestWordAddIn1.dll" version="1.0.0.0" publicKeyToken="ed9e2ef98bb1d102" language="neutral" processorArchitecture="msil" type="win32" />
|
||||
<description xmlns="urn:schemas-microsoft-com:asm.v1">TestWordAddIn1</description>
|
||||
<application />
|
||||
<entryPoint>
|
||||
<co.v1:customHostSpecified />
|
||||
</entryPoint>
|
||||
<trustInfo>
|
||||
<security>
|
||||
<applicationRequestMinimum>
|
||||
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
|
||||
<defaultAssemblyRequest permissionSetReference="Custom" />
|
||||
</applicationRequestMinimum>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!--
|
||||
UAC 清单选项
|
||||
如果要更改 Windows 用户帐户控制级别,请用以下节点之一替换
|
||||
requestedExecutionLevel 节点。
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
如果要利用文件和注册表虚拟化提供
|
||||
向后兼容性,请删除 requestedExecutionLevel 节点。
|
||||
-->
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<dependency>
|
||||
<dependentOS>
|
||||
<osVersionInfo>
|
||||
<os majorVersion="5" minorVersion="1" buildNumber="2600" servicePackMajor="0" />
|
||||
</osVersionInfo>
|
||||
</dependentOS>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Accessibility" version="4.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.CSharp" version="4.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.Office.Tools" version="10.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" processorArchitecture="msil" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.Office.Tools.Common" version="10.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" processorArchitecture="msil" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.Office.Tools.v4.0.Framework" version="10.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" processorArchitecture="msil" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.Office.Tools.Word" version="10.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" processorArchitecture="msil" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.VisualStudio.Tools.Applications.Runtime" version="10.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" processorArchitecture="msil" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="mscorlib" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="PresentationCore" version="4.0.0.0" publicKeyToken="31BF3856AD364E35" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="PresentationFramework" version="4.0.0.0" publicKeyToken="31BF3856AD364E35" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="stdole" version="7.0.3300.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Core" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Data" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Data.DataSetExtensions" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Drawing" version="4.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Numerics" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Runtime.Serialization" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Windows.Forms" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Xml" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Xml.Linq" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="WindowsBase" version="4.0.0.0" publicKeyToken="31BF3856AD364E35" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Microsoft.Office.Tools.Common.v4.0.Utilities.dll" size="32664">
|
||||
<assemblyIdentity name="Microsoft.Office.Tools.Common.v4.0.Utilities" version="10.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>jLCTF8Mm6bD4PDN+rnzN6q0+ReXaNgPh68kMWgatFwI=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Microsoft.Web.WebView2.Core.dll" size="502232">
|
||||
<assemblyIdentity name="Microsoft.Web.WebView2.Core" version="1.0.2151.40" publicKeyToken="2A8AB48044D2601E" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>QEXzPAzBlZUKqSkIurX5BPQfBPVMsiGcEd3d8CaOGk0=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Microsoft.Web.WebView2.WinForms.dll" size="38376">
|
||||
<assemblyIdentity name="Microsoft.Web.WebView2.WinForms" version="1.0.2151.40" publicKeyToken="2A8AB48044D2601E" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>taZn+3ECNB1fTv5G6ncuSlPRqiamdXMlbH3EK2VZzYA=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Microsoft.Web.WebView2.Wpf.dll" size="45016">
|
||||
<assemblyIdentity name="Microsoft.Web.WebView2.Wpf" version="1.0.2151.40" publicKeyToken="2A8AB48044D2601E" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>2yawinvxMZchtXyC/atA8ytJq0Rpe+denBy3kjwT3B8=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Newtonsoft.Json.dll" size="711952">
|
||||
<assemblyIdentity name="Newtonsoft.Json" version="13.0.0.0" publicKeyToken="30AD4FE6B2A6AEED" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>4eJ697B+7t9c5xqSVfBCKBam/FhJpIPGcU4bRyBE+p0=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="TestWordAddIn1.dll" size="48128">
|
||||
<assemblyIdentity name="TestWordAddIn1" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>dH99TrQL1fiS5gwbyVDWfbZls/4Ana2m1uEhSeOQloQ=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="UtilLib.dll" size="12288">
|
||||
<assemblyIdentity name="UtilLib" version="0.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>CM2g3np/1F5t5e3Fj+/WQ0iXFaBnb6jnguJIFAvMOwo=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<file name="runtimes\win-arm64\native\WebView2Loader.dll" size="137688">
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>ivea5fxkRlmCDJQ8qHHuRS3uvuOyEpGtBQiCt5WNROc=</dsig:DigestValue>
|
||||
</hash>
|
||||
</file>
|
||||
<file name="runtimes\win-x64\native\WebView2Loader.dll" size="162264">
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>KLiY5EMykclpzU87xGN3sZVSetkTjfL6VyQ862cXprk=</dsig:DigestValue>
|
||||
</hash>
|
||||
</file>
|
||||
<file name="runtimes\win-x86\native\WebView2Loader.dll" size="117208">
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>VlnLrp89QSZiUVZxpsha7+CO7hcRjD3hMwov7XTcQV8=</dsig:DigestValue>
|
||||
</hash>
|
||||
</file>
|
||||
<file name="web\index.html" size="624">
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>zJibc8ltLuxh1OuCrNbWEvrsD09qR6rx3kHez2v6a3U=</dsig:DigestValue>
|
||||
</hash>
|
||||
</file>
|
||||
<vstav3:addIn xmlns:vstav3="urn:schemas-microsoft-com:vsta.v3">
|
||||
<vstav3:entryPointsCollection>
|
||||
<vstav3:entryPoints>
|
||||
<vstav3:entryPoint class="TestWordAddIn1.ThisAddIn">
|
||||
<assemblyIdentity name="TestWordAddIn1" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
</vstav3:entryPoint>
|
||||
</vstav3:entryPoints>
|
||||
</vstav3:entryPointsCollection>
|
||||
<vstav3:update enabled="true">
|
||||
<vstav3:expiration maximumAge="7" unit="days" />
|
||||
</vstav3:update>
|
||||
<vstav3:application>
|
||||
<vstov4:customizations xmlns:vstov4="urn:schemas-microsoft-com:vsto.v4">
|
||||
<vstov4:customization>
|
||||
<vstov4:appAddIn application="Word" loadBehavior="3" keyName="TestWordAddIn1">
|
||||
<vstov4:friendlyName>TestWordAddIn1</vstov4:friendlyName>
|
||||
<vstov4:description>TestWordAddIn1</vstov4:description>
|
||||
<vstov4.1:ribbonTypes xmlns:vstov4.1="urn:schemas-microsoft-com:vsto.v4.1">
|
||||
<vstov4.1:ribbonType name="TestWordAddIn1.Ribbon1, TestWordAddIn1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
|
||||
</vstov4.1:ribbonTypes>
|
||||
</vstov4:appAddIn>
|
||||
</vstov4:customization>
|
||||
</vstov4:customizations>
|
||||
</vstav3:application>
|
||||
</vstav3:addIn>
|
||||
<publisherIdentity name="CN=HOMEDEV\home-dev" issuerKeyHash="52017d5a90338a3517a76f387e2780f12fefbe76" /><Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /><DigestValue>wts3Vp58Osb+sJPQMwStHRsIe4v6MM40H+Jkvu4Jp2U=</DigestValue></Reference></SignedInfo><SignatureValue>ER8oNT37lx6Vq9zxz066j9waj9Kgh/48WvPT3S7qk7VhgdTERJF8n2IWpJLsK6g3Xcb1GILsMlusCsDjGLv4LyVpsOi6Gq6uA7/1A7Ra+7uhjpmp6VdKVIFN3XfKuqcF/JELvPXdN2Q34zybYxnTk7wshIS1+z3opiIdFaLtyEY=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>txUdurGTZRvUFLzUgOyFmMXylssAYI+b05Ejg/+o+qnzVhKuYhwHISNImDK6dCZpaoihu/pYHAb7asdNBKFkDqmVC/dwwnYcMtlA9prTa2pa83Rq+jioQsxrMObeol6wPDzU13dhR01hjebL6pA1RG7R/YlNQOg7Oi4QjvApxNU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="65a709eebe64e21f34ce30fa8b7b081b1dad0433d093b0fec63a7c9e5637dbc2" Description="" Url=""><as:assemblyIdentity name="TestWordAddIn1.dll" version="1.0.0.0" publicKeyToken="ed9e2ef98bb1d102" language="neutral" processorArchitecture="msil" type="win32" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=HOMEDEV\home-dev</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /><DigestValue>mKEloFVvAa0MUiLEHkn9PasZsOHdMaIj35c5zm+qR9k=</DigestValue></Reference></SignedInfo><SignatureValue>QM3VNEH11XOhprFOH4Q/ypdiumQxmssviMCb2mf9hxgJRjrp2AHUGR2IfcQE8ip7vn4X9kdusFz86XfHt5NIxMZj8aOfhE6iDC+2P8j3Kh+A80tRXOBHAxJ+doFxMoJQVxRXrbuHLrNgTOml/WAJ2MMm7EqPO34iRFbx6useBbc=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>txUdurGTZRvUFLzUgOyFmMXylssAYI+b05Ejg/+o+qnzVhKuYhwHISNImDK6dCZpaoihu/pYHAb7asdNBKFkDqmVC/dwwnYcMtlA9prTa2pa83Rq+jioQsxrMObeol6wPDzU13dhR01hjebL6pA1RG7R/YlNQOg7Oi4QjvApxNU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIB2TCCAUKgAwIBAgIQT/24iygaaY1J3MDjVc3PHDANBgkqhkiG9w0BAQsFADArMSkwJwYDVQQDHiAASABPAE0ARQBEAEUAVgBcAGgAbwBtAGUALQBkAGUAdjAeFw0yMzA3MTAxMDQ4MDZaFw0yNDA3MDkxNjQ4MDZaMCsxKTAnBgNVBAMeIABIAE8ATQBFAEQARQBWAFwAaABvAG0AZQAtAGQAZQB2MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3FR26sZNlG9QUvNSA7IWYxfKWywBgj5vTkSOD/6j6qfNWEq5iHAchI0iYMrp0JmlqiKG7+lgcBvtqx00EoWQOqZUL93DCdhwy2UD2mtNralrzdGr6OKhCzGsw5t6iXrA8PNTXd2FHTWGN5svqkDVEbtH9iU1A6Ds6LhCO8CnE1QIDAQABMA0GCSqGSIb3DQEBCwUAA4GBABfM5SOoFxwCKEVI5EyW8+JOr7ql7MaUbSRY5bWhVqJQaxkcPUmhifjjI+0J/fHwkhQ9Zxinq1Jp0tBN+RfqIqWxVkz8fM0kcWdVs4Vyn69PksrgeSbT6teFfTbXbGeiVhkw1G+2i2PhIh7PrfqTZ+v09BJsBTz0KA7IhnxjdGMd</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>
|
BIN
TestWordAddIn1/bin/Debug/TestWordAddIn1.pdb
Normal file
BIN
TestWordAddIn1/bin/Debug/TestWordAddIn1.pdb
Normal file
Binary file not shown.
21
TestWordAddIn1/bin/Debug/TestWordAddIn1.vsto
Normal file
21
TestWordAddIn1/bin/Debug/TestWordAddIn1.vsto
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<assemblyIdentity name="TestWordAddIn1.vsto" version="1.0.0.0" publicKeyToken="ed9e2ef98bb1d102" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
|
||||
<description asmv2:publisher="TestWordAddIn1" asmv2:product="TestWordAddIn1" xmlns="urn:schemas-microsoft-com:asm.v1" />
|
||||
<deployment install="false" />
|
||||
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<framework targetVersion="4.6.2" profile="Full" supportedRuntime="4.0.30319" />
|
||||
</compatibleFrameworks>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" codebase="TestWordAddIn1.dll.manifest" size="19614">
|
||||
<assemblyIdentity name="TestWordAddIn1.dll" version="1.0.0.0" publicKeyToken="ed9e2ef98bb1d102" language="neutral" processorArchitecture="msil" type="win32" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>+TiCqdYlfYd9pbZYnheLpZSHomFoNtR7icr3z59uauo=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<publisherIdentity name="CN=HOMEDEV\home-dev" issuerKeyHash="52017d5a90338a3517a76f387e2780f12fefbe76" /><Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /><DigestValue>DAoKVF8Kyf/VQw2ttnwEkD+8hKbRY4MvfoP2HqQDdkA=</DigestValue></Reference></SignedInfo><SignatureValue>AgdUmYVv3bt+r1thHXwCWgVIpZ6Ez8hNN2naoyGbGjM9Qr5foRp2Mp2dUi0yc0iefd1rXp60hCzAMchwfUBb6Z3i10CPL3VSnqclL1jqZXBn/XACDujXXbOo3i+c/vZaIFP3KpMqH36LoUY0uiXUSMCaRA/zpw+m/oys0Sbec0M=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>txUdurGTZRvUFLzUgOyFmMXylssAYI+b05Ejg/+o+qnzVhKuYhwHISNImDK6dCZpaoihu/pYHAb7asdNBKFkDqmVC/dwwnYcMtlA9prTa2pa83Rq+jioQsxrMObeol6wPDzU13dhR01hjebL6pA1RG7R/YlNQOg7Oi4QjvApxNU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="407603a41ef6837e2f8363d1a684bc3f90047cb6ad0d43d5ffc90a5f540a0a0c" Description="" Url=""><as:assemblyIdentity name="TestWordAddIn1.vsto" version="1.0.0.0" publicKeyToken="ed9e2ef98bb1d102" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=HOMEDEV\home-dev</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /><DigestValue>YfobTaVzdURmWpL4516wlA7IiYa9nSyfDYjT3XNb57g=</DigestValue></Reference></SignedInfo><SignatureValue>d8XNqPAvvq3ZOtMl9/PLVwkfJ5+mF4QiQ+2hMRIBjybdJn98FBh0FA91XfQm8ijOy4v+4D9jF7BE0IKU5YITCTqNGv1twVpjiwohVZOtqVi3juLPeZdWkGu+AeT+DEWCU5osoO3lTddQr01fOjh+ddQGNbNMaajRgFmyC9Q9Ysw=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>txUdurGTZRvUFLzUgOyFmMXylssAYI+b05Ejg/+o+qnzVhKuYhwHISNImDK6dCZpaoihu/pYHAb7asdNBKFkDqmVC/dwwnYcMtlA9prTa2pa83Rq+jioQsxrMObeol6wPDzU13dhR01hjebL6pA1RG7R/YlNQOg7Oi4QjvApxNU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIB2TCCAUKgAwIBAgIQT/24iygaaY1J3MDjVc3PHDANBgkqhkiG9w0BAQsFADArMSkwJwYDVQQDHiAASABPAE0ARQBEAEUAVgBcAGgAbwBtAGUALQBkAGUAdjAeFw0yMzA3MTAxMDQ4MDZaFw0yNDA3MDkxNjQ4MDZaMCsxKTAnBgNVBAMeIABIAE8ATQBFAEQARQBWAFwAaABvAG0AZQAtAGQAZQB2MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3FR26sZNlG9QUvNSA7IWYxfKWywBgj5vTkSOD/6j6qfNWEq5iHAchI0iYMrp0JmlqiKG7+lgcBvtqx00EoWQOqZUL93DCdhwy2UD2mtNralrzdGr6OKhCzGsw5t6iXrA8PNTXd2FHTWGN5svqkDVEbtH9iU1A6Ds6LhCO8CnE1QIDAQABMA0GCSqGSIb3DQEBCwUAA4GBABfM5SOoFxwCKEVI5EyW8+JOr7ql7MaUbSRY5bWhVqJQaxkcPUmhifjjI+0J/fHwkhQ9Zxinq1Jp0tBN+RfqIqWxVkz8fM0kcWdVs4Vyn69PksrgeSbT6teFfTbXbGeiVhkw1G+2i2PhIh7PrfqTZ+v09BJsBTz0KA7IhnxjdGMd</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>
|
BIN
TestWordAddIn1/bin/Debug/UtilLib.dll
Normal file
BIN
TestWordAddIn1/bin/Debug/UtilLib.dll
Normal file
Binary file not shown.
6
TestWordAddIn1/bin/Debug/UtilLib.dll.config
Normal file
6
TestWordAddIn1/bin/Debug/UtilLib.dll.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
|
||||
</startup>
|
||||
</configuration>
|
BIN
TestWordAddIn1/bin/Debug/UtilLib.pdb
Normal file
BIN
TestWordAddIn1/bin/Debug/UtilLib.pdb
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
24
TestWordAddIn1/bin/Debug/web/index.html
Normal file
24
TestWordAddIn1/bin/Debug/web/index.html
Normal file
@ -0,0 +1,24 @@
|
||||
<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()">xxx</button>
|
||||
|
||||
<script>
|
||||
function sendToBehavior() {
|
||||
window.postMessage(JSON.stringify({
|
||||
code: 1, message: 'from web'
|
||||
}));
|
||||
}
|
||||
function testBridge() {
|
||||
console.log(window.bridge)
|
||||
}
|
||||
window.addEventListener('message', e => {
|
||||
console.log('on-message', e)
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
BIN
TestWordAddIn1/bin/Release/TestWordAddIn1.dll
Normal file
BIN
TestWordAddIn1/bin/Release/TestWordAddIn1.dll
Normal file
Binary file not shown.
178
TestWordAddIn1/bin/Release/TestWordAddIn1.dll.manifest
Normal file
178
TestWordAddIn1/bin/Release/TestWordAddIn1.dll.manifest
Normal file
@ -0,0 +1,178 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<asmv1:assemblyIdentity name="TestWordAddIn1.dll" version="1.0.0.0" publicKeyToken="ed9e2ef98bb1d102" language="neutral" processorArchitecture="msil" type="win32" />
|
||||
<description xmlns="urn:schemas-microsoft-com:asm.v1">TestWordAddIn1</description>
|
||||
<application />
|
||||
<entryPoint>
|
||||
<co.v1:customHostSpecified />
|
||||
</entryPoint>
|
||||
<trustInfo>
|
||||
<security>
|
||||
<applicationRequestMinimum>
|
||||
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
|
||||
<defaultAssemblyRequest permissionSetReference="Custom" />
|
||||
</applicationRequestMinimum>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!--
|
||||
UAC 清单选项
|
||||
如果要更改 Windows 用户帐户控制级别,请用以下节点之一替换
|
||||
requestedExecutionLevel 节点。
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
如果要利用文件和注册表虚拟化提供
|
||||
向后兼容性,请删除 requestedExecutionLevel 节点。
|
||||
-->
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<dependency>
|
||||
<dependentOS>
|
||||
<osVersionInfo>
|
||||
<os majorVersion="5" minorVersion="1" buildNumber="2600" servicePackMajor="0" />
|
||||
</osVersionInfo>
|
||||
</dependentOS>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Accessibility" version="4.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.CSharp" version="4.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.Office.Tools" version="10.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" processorArchitecture="msil" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.Office.Tools.Common" version="10.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" processorArchitecture="msil" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.Office.Tools.v4.0.Framework" version="10.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" processorArchitecture="msil" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.Office.Tools.Word" version="10.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" processorArchitecture="msil" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="Microsoft.VisualStudio.Tools.Applications.Runtime" version="10.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" processorArchitecture="msil" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="mscorlib" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="stdole" version="7.0.3300.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Core" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Data" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Data.DataSetExtensions" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Drawing" version="4.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Windows.Forms" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Xml" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
|
||||
<assemblyIdentity name="System.Xml.Linq" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Microsoft.Office.Tools.Common.v4.0.Utilities.dll" size="32664">
|
||||
<assemblyIdentity name="Microsoft.Office.Tools.Common.v4.0.Utilities" version="10.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>jLCTF8Mm6bD4PDN+rnzN6q0+ReXaNgPh68kMWgatFwI=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="TestWordAddIn1.dll" size="28672">
|
||||
<assemblyIdentity name="TestWordAddIn1" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>yl0efTqJKDcvrAsIOAU0HXFgwjAS+iL1bY0IlTRGEpQ=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<vstav3:addIn xmlns:vstav3="urn:schemas-microsoft-com:vsta.v3">
|
||||
<vstav3:entryPointsCollection>
|
||||
<vstav3:entryPoints>
|
||||
<vstav3:entryPoint class="TestWordAddIn1.ThisAddIn">
|
||||
<assemblyIdentity name="TestWordAddIn1" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
|
||||
</vstav3:entryPoint>
|
||||
</vstav3:entryPoints>
|
||||
</vstav3:entryPointsCollection>
|
||||
<vstav3:update enabled="true">
|
||||
<vstav3:expiration maximumAge="7" unit="days" />
|
||||
</vstav3:update>
|
||||
<vstav3:application>
|
||||
<vstov4:customizations xmlns:vstov4="urn:schemas-microsoft-com:vsto.v4">
|
||||
<vstov4:customization>
|
||||
<vstov4:appAddIn application="Word" loadBehavior="3" keyName="TestWordAddIn1">
|
||||
<vstov4:friendlyName>TestWordAddIn1</vstov4:friendlyName>
|
||||
<vstov4:description>TestWordAddIn1</vstov4:description>
|
||||
<vstov4.1:ribbonTypes xmlns:vstov4.1="urn:schemas-microsoft-com:vsto.v4.1">
|
||||
<vstov4.1:ribbonType name="TestWordAddIn1.Ribbon1, TestWordAddIn1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
|
||||
</vstov4.1:ribbonTypes>
|
||||
</vstov4:appAddIn>
|
||||
</vstov4:customization>
|
||||
</vstov4:customizations>
|
||||
</vstav3:application>
|
||||
</vstav3:addIn>
|
||||
<publisherIdentity name="CN=HOMEDEV\home-dev" issuerKeyHash="52017d5a90338a3517a76f387e2780f12fefbe76" /><Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /><DigestValue>1FGRfzUcRAVVyliyycKLcSJasSWkks+qivclkuWiNxs=</DigestValue></Reference></SignedInfo><SignatureValue>ZlbrrnBsO0O6h+ef8tUqN3cTWM1xZ0Df5O5YhwYsPlEsip6CjnHMTr7P335JxDKnY0eEWqRXazu03xT6qQ9J4RPqBtk1kcOOUpe+IvjHfT29Q/fkHPSe8PfwemzvJ+uK+cqfyRvlh4RVasUMEOthsC/jrPtuQn9P/sZnzprkrZQ=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>txUdurGTZRvUFLzUgOyFmMXylssAYI+b05Ejg/+o+qnzVhKuYhwHISNImDK6dCZpaoihu/pYHAb7asdNBKFkDqmVC/dwwnYcMtlA9prTa2pa83Rq+jioQsxrMObeol6wPDzU13dhR01hjebL6pA1RG7R/YlNQOg7Oi4QjvApxNU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="1b37a2e59225f78aaacf92a425b15a22718bc2c9b258ca5505441c357f9151d4" Description="" Url=""><as:assemblyIdentity name="TestWordAddIn1.dll" version="1.0.0.0" publicKeyToken="ed9e2ef98bb1d102" language="neutral" processorArchitecture="msil" type="win32" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=HOMEDEV\home-dev</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /><DigestValue>iLkA/knbQyhKtLCF70VIeFJv3S4Mnl2qgMHvQQfPlJs=</DigestValue></Reference></SignedInfo><SignatureValue>rhz8AEk0TtBRpJzEjDlzj7uJeozhL7psUqKeDWN/47ANHWmWSd6AlkXDejmf1sQjZTrF95O5y0owttwcQJfn9ywzJPO1Mge/wDlqvuvqtcYSDLQb5GTKQqOvISpcBK2IrWkeo/1U/xrruqyNjTiWx93U8+GAUhQY1Imy3t2dupI=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>txUdurGTZRvUFLzUgOyFmMXylssAYI+b05Ejg/+o+qnzVhKuYhwHISNImDK6dCZpaoihu/pYHAb7asdNBKFkDqmVC/dwwnYcMtlA9prTa2pa83Rq+jioQsxrMObeol6wPDzU13dhR01hjebL6pA1RG7R/YlNQOg7Oi4QjvApxNU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIB2TCCAUKgAwIBAgIQT/24iygaaY1J3MDjVc3PHDANBgkqhkiG9w0BAQsFADArMSkwJwYDVQQDHiAASABPAE0ARQBEAEUAVgBcAGgAbwBtAGUALQBkAGUAdjAeFw0yMzA3MTAxMDQ4MDZaFw0yNDA3MDkxNjQ4MDZaMCsxKTAnBgNVBAMeIABIAE8ATQBFAEQARQBWAFwAaABvAG0AZQAtAGQAZQB2MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3FR26sZNlG9QUvNSA7IWYxfKWywBgj5vTkSOD/6j6qfNWEq5iHAchI0iYMrp0JmlqiKG7+lgcBvtqx00EoWQOqZUL93DCdhwy2UD2mtNralrzdGr6OKhCzGsw5t6iXrA8PNTXd2FHTWGN5svqkDVEbtH9iU1A6Ds6LhCO8CnE1QIDAQABMA0GCSqGSIb3DQEBCwUAA4GBABfM5SOoFxwCKEVI5EyW8+JOr7ql7MaUbSRY5bWhVqJQaxkcPUmhifjjI+0J/fHwkhQ9Zxinq1Jp0tBN+RfqIqWxVkz8fM0kcWdVs4Vyn69PksrgeSbT6teFfTbXbGeiVhkw1G+2i2PhIh7PrfqTZ+v09BJsBTz0KA7IhnxjdGMd</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>
|
BIN
TestWordAddIn1/bin/Release/TestWordAddIn1.pdb
Normal file
BIN
TestWordAddIn1/bin/Release/TestWordAddIn1.pdb
Normal file
Binary file not shown.
21
TestWordAddIn1/bin/Release/TestWordAddIn1.vsto
Normal file
21
TestWordAddIn1/bin/Release/TestWordAddIn1.vsto
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<assemblyIdentity name="TestWordAddIn1.vsto" version="1.0.0.0" publicKeyToken="ed9e2ef98bb1d102" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
|
||||
<description asmv2:publisher="TestWordAddIn1" asmv2:product="TestWordAddIn1" xmlns="urn:schemas-microsoft-com:asm.v1" />
|
||||
<deployment install="false" />
|
||||
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<framework targetVersion="4.6.2" profile="Full" supportedRuntime="4.0.30319" />
|
||||
</compatibleFrameworks>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" codebase="TestWordAddIn1.dll.manifest" size="13292">
|
||||
<assemblyIdentity name="TestWordAddIn1.dll" version="1.0.0.0" publicKeyToken="ed9e2ef98bb1d102" language="neutral" processorArchitecture="msil" type="win32" />
|
||||
<hash>
|
||||
<dsig:Transforms>
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
|
||||
<dsig:DigestValue>nI/Ql57xbXZCf80NY6gA6dKBylbd9z5syX7SSvyclpY=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<publisherIdentity name="CN=HOMEDEV\home-dev" issuerKeyHash="52017d5a90338a3517a76f387e2780f12fefbe76" /><Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /><DigestValue>7Ojm2huZE8SgTTvU8oghYEGkYULbBHHW0giv91h31vk=</DigestValue></Reference></SignedInfo><SignatureValue>Fdb0k3fLfzIOOoAOm0C6IFkSWdCp7J7dw+0LvGwPVjzdNXpGG+yFZN0N9zdqwlRKLq/sRNONcVfwKmxaAMogoZ6bZgI854PhjgHmx/8aKifzPXY33RO16HMTltkJAJronqAyUVs/HGvKZOKFu9XuNIzJwbHfcfLIOXMVeSuWz00=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>txUdurGTZRvUFLzUgOyFmMXylssAYI+b05Ejg/+o+qnzVhKuYhwHISNImDK6dCZpaoihu/pYHAb7asdNBKFkDqmVC/dwwnYcMtlA9prTa2pa83Rq+jioQsxrMObeol6wPDzU13dhR01hjebL6pA1RG7R/YlNQOg7Oi4QjvApxNU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="f9d67758f7af08d2d67104db4261a441602188f2d43b4da0c413991bdae6e8ec" Description="" Url=""><as:assemblyIdentity name="TestWordAddIn1.vsto" version="1.0.0.0" publicKeyToken="ed9e2ef98bb1d102" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=HOMEDEV\home-dev</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /><DigestValue>0TzZiHOxhy3/Ez36t7+h1vbH0Wh3TJGoHTdOMdLbfpA=</DigestValue></Reference></SignedInfo><SignatureValue>kdGGZqGxkWDQLC+euFtP67TdIZklfTSyfcfCv6qdPQZ4HanTv/SRiYPHCPkRPcymlltLvKY8w6824A5V8Er8KDNZ00wLaQDfvWDiIJNwMu7Jt/VFCSPNh2RZWzWqV97/MRRa85dTUGLK7f2zgfwxUoJharPYLOz70ZY66oDc3sU=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>txUdurGTZRvUFLzUgOyFmMXylssAYI+b05Ejg/+o+qnzVhKuYhwHISNImDK6dCZpaoihu/pYHAb7asdNBKFkDqmVC/dwwnYcMtlA9prTa2pa83Rq+jioQsxrMObeol6wPDzU13dhR01hjebL6pA1RG7R/YlNQOg7Oi4QjvApxNU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIB2TCCAUKgAwIBAgIQT/24iygaaY1J3MDjVc3PHDANBgkqhkiG9w0BAQsFADArMSkwJwYDVQQDHiAASABPAE0ARQBEAEUAVgBcAGgAbwBtAGUALQBkAGUAdjAeFw0yMzA3MTAxMDQ4MDZaFw0yNDA3MDkxNjQ4MDZaMCsxKTAnBgNVBAMeIABIAE8ATQBFAEQARQBWAFwAaABvAG0AZQAtAGQAZQB2MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3FR26sZNlG9QUvNSA7IWYxfKWywBgj5vTkSOD/6j6qfNWEq5iHAchI0iYMrp0JmlqiKG7+lgcBvtqx00EoWQOqZUL93DCdhwy2UD2mtNralrzdGr6OKhCzGsw5t6iXrA8PNTXd2FHTWGN5svqkDVEbtH9iU1A6Ds6LhCO8CnE1QIDAQABMA0GCSqGSIb3DQEBCwUAA4GBABfM5SOoFxwCKEVI5EyW8+JOr7ql7MaUbSRY5bWhVqJQaxkcPUmhifjjI+0J/fHwkhQ9Zxinq1Jp0tBN+RfqIqWxVkz8fM0kcWdVs4Vyn69PksrgeSbT6teFfTbXbGeiVhkw1G+2i2PhIh7PrfqTZ+v09BJsBTz0KA7IhnxjdGMd</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>
|
@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
TestWordAddIn1/obj/Debug/TestWordAddIn1.Form1.resources
Normal file
BIN
TestWordAddIn1/obj/Debug/TestWordAddIn1.Form1.resources
Normal file
Binary file not shown.
BIN
TestWordAddIn1/obj/Debug/TestWordAddIn1.ProofreadItem.resources
Normal file
BIN
TestWordAddIn1/obj/Debug/TestWordAddIn1.ProofreadItem.resources
Normal file
Binary file not shown.
BIN
TestWordAddIn1/obj/Debug/TestWordAddIn1.ProofreadPanel.resources
Normal file
BIN
TestWordAddIn1/obj/Debug/TestWordAddIn1.ProofreadPanel.resources
Normal file
Binary file not shown.
Binary file not shown.
BIN
TestWordAddIn1/obj/Debug/TestWordAddIn1.Ribbon1.resources
Normal file
BIN
TestWordAddIn1/obj/Debug/TestWordAddIn1.Ribbon1.resources
Normal file
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
46fabd4c02277f5287e9e4cc8a8baf270df54dfc
|
@ -0,0 +1,31 @@
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\TestWordAddIn1.dll
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\TestWordAddIn1.pdb
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\TestWordAddIn1.dll.manifest
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\TestWordAddIn1.vsto
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\Microsoft.Office.Tools.Common.v4.0.Utilities.dll
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Debug\TestWordAddIn1.csproj.AssemblyReference.cache
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Debug\TestWordAddIn1.Properties.Resources.resources
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Debug\TestWordAddIn1.Ribbon1.resources
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Debug\TestWordAddIn1.csproj.GenerateResource.cache
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Debug\TestWordAddIn1.csproj.CoreCompileInputs.cache
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Debug\TestWordAddIn1.csproj.CopyComplete
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Debug\TestWordAddIn1.dll
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Debug\TestWordAddIn1.pdb
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Debug\TestWordAddIn1.Form1.resources
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\Newtonsoft.Json.dll
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\Newtonsoft.Json.xml
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Debug\TestWordAddIn1.ProofreadPanel.resources
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\runtimes\win-x86\native\WebView2Loader.dll
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\runtimes\win-x64\native\WebView2Loader.dll
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\runtimes\win-arm64\native\WebView2Loader.dll
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\Microsoft.Web.WebView2.Core.dll
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\Microsoft.Web.WebView2.WinForms.dll
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\Microsoft.Web.WebView2.Wpf.dll
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\Microsoft.Web.WebView2.Core.xml
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\Microsoft.Web.WebView2.WinForms.xml
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\Microsoft.Web.WebView2.Wpf.xml
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\web\index.html
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Debug\TestWordAddIn1.ProofreadItem.resources
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\UtilLib.dll
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\UtilLib.pdb
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Debug\UtilLib.dll.config
|
Binary file not shown.
BIN
TestWordAddIn1/obj/Debug/TestWordAddIn1.dll
Normal file
BIN
TestWordAddIn1/obj/Debug/TestWordAddIn1.dll
Normal file
Binary file not shown.
BIN
TestWordAddIn1/obj/Debug/TestWordAddIn1.pdb
Normal file
BIN
TestWordAddIn1/obj/Debug/TestWordAddIn1.pdb
Normal file
Binary file not shown.
@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
TestWordAddIn1/obj/Release/TestWordAddIn1.Form1.resources
Normal file
BIN
TestWordAddIn1/obj/Release/TestWordAddIn1.Form1.resources
Normal file
Binary file not shown.
Binary file not shown.
BIN
TestWordAddIn1/obj/Release/TestWordAddIn1.Ribbon1.resources
Normal file
BIN
TestWordAddIn1/obj/Release/TestWordAddIn1.Ribbon1.resources
Normal file
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
487d1bb5458f1f46fd33ce520a82e0b8d2655794
|
@ -0,0 +1,14 @@
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\TestWordAddIn1.dll
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\TestWordAddIn1.pdb
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\TestWordAddIn1.dll.manifest
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\TestWordAddIn1.vsto
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\bin\Release\Microsoft.Office.Tools.Common.v4.0.Utilities.dll
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Release\TestWordAddIn1.csproj.AssemblyReference.cache
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Release\TestWordAddIn1.Form1.resources
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Release\TestWordAddIn1.Properties.Resources.resources
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Release\TestWordAddIn1.Ribbon1.resources
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Release\TestWordAddIn1.csproj.GenerateResource.cache
|
||||
C:\Users\home-dev\source\repos\TestWordAddIn1\TestWordAddIn1\obj\Release\TestWordAddIn1.csproj.CoreCompileInputs.cache
|
||||
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
|
Binary file not shown.
BIN
TestWordAddIn1/obj/Release/TestWordAddIn1.dll
Normal file
BIN
TestWordAddIn1/obj/Release/TestWordAddIn1.dll
Normal file
Binary file not shown.
BIN
TestWordAddIn1/obj/Release/TestWordAddIn1.pdb
Normal file
BIN
TestWordAddIn1/obj/Release/TestWordAddIn1.pdb
Normal file
Binary file not shown.
5
TestWordAddIn1/packages.config
Normal file
5
TestWordAddIn1/packages.config
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Web.WebView2" version="1.0.2151.40" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
|
||||
</packages>
|
24
TestWordAddIn1/web/index.html
Normal file
24
TestWordAddIn1/web/index.html
Normal file
@ -0,0 +1,24 @@
|
||||
<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()">xxx</button>
|
||||
|
||||
<script>
|
||||
function sendToBehavior() {
|
||||
window.postMessage(JSON.stringify({
|
||||
code: 1, message: 'from web'
|
||||
}));
|
||||
}
|
||||
function testBridge() {
|
||||
console.log(window.bridge)
|
||||
}
|
||||
window.addEventListener('message', e => {
|
||||
console.log('on-message', e)
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user