'commit'
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
13
WordAddIn/Switch_To_WPS.bat
Normal file
13
WordAddIn/Switch_To_WPS.bat
Normal file
@@ -0,0 +1,13 @@
|
||||
@echo off
|
||||
echo ==========================================
|
||||
echo Switching to WPS Office Mode
|
||||
echo ==========================================
|
||||
echo.
|
||||
if exist "%~dp0WpsInstaller\bin\Debug\WpsInstaller.exe" (
|
||||
"%~dp0WpsInstaller\bin\Debug\WpsInstaller.exe" wps
|
||||
) else (
|
||||
echo Error: WpsInstaller.exe not found.
|
||||
echo Please build the solution first.
|
||||
)
|
||||
echo.
|
||||
pause
|
||||
13
WordAddIn/Switch_To_Word.bat
Normal file
13
WordAddIn/Switch_To_Word.bat
Normal file
@@ -0,0 +1,13 @@
|
||||
@echo off
|
||||
echo ==========================================
|
||||
echo Switching to MS Word Mode (VSTO)
|
||||
echo ==========================================
|
||||
echo.
|
||||
if exist "%~dp0WpsInstaller\bin\Debug\WpsInstaller.exe" (
|
||||
"%~dp0WpsInstaller\bin\Debug\WpsInstaller.exe" word
|
||||
) else (
|
||||
echo Error: WpsInstaller.exe not found.
|
||||
echo Please build the solution first.
|
||||
)
|
||||
echo.
|
||||
pause
|
||||
1
WordAddIn/WordAddIn/.vs/WordAddIn.csproj.dtbcache.json
Normal file
1
WordAddIn/WordAddIn/.vs/WordAddIn.csproj.dtbcache.json
Normal file
File diff suppressed because one or more lines are too long
49
WordAddIn/WordAddIn/AddInContext.cs
Normal file
49
WordAddIn/WordAddIn/AddInContext.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Word = Microsoft.Office.Interop.Word;
|
||||
|
||||
namespace WordAddIn
|
||||
{
|
||||
/// <summary>
|
||||
/// 全局上下文,用于存储当前 Word 应用程序实例。
|
||||
/// 兼容 VSTO (Office) 和 COM Add-in (WPS)。
|
||||
/// </summary>
|
||||
public static class AddInContext
|
||||
{
|
||||
private static Word.Application _application;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置当前的 Word 应用程序实例。
|
||||
/// </summary>
|
||||
public static Word.Application CurrentApplication
|
||||
{
|
||||
get
|
||||
{
|
||||
// 如果尚未设置(例如在非 VSTO 环境下且未初始化),尝试回退到 Globals(仅限 VSTO)
|
||||
if (_application == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 注意:如果不在 VSTO 环境下,访问 Globals.ThisAddIn 可能会抛出异常或返回 null
|
||||
if (Globals.ThisAddIn != null)
|
||||
{
|
||||
_application = Globals.ThisAddIn.Application;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// 忽略异常,说明可能不是 VSTO 环境
|
||||
}
|
||||
}
|
||||
return _application;
|
||||
}
|
||||
set
|
||||
{
|
||||
_application = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,9 @@ namespace WordAddIn
|
||||
//
|
||||
// txtTopic
|
||||
//
|
||||
this.txtTopic.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.txtTopic.Location = new System.Drawing.Point(20, 50);
|
||||
this.txtTopic.Multiline = true;
|
||||
this.txtTopic.Name = "txtTopic";
|
||||
@@ -58,6 +61,7 @@ namespace WordAddIn
|
||||
//
|
||||
// btnGenerate
|
||||
//
|
||||
this.btnGenerate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnGenerate.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.btnGenerate.Location = new System.Drawing.Point(240, 310);
|
||||
this.btnGenerate.Name = "btnGenerate";
|
||||
@@ -69,6 +73,7 @@ namespace WordAddIn
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Location = new System.Drawing.Point(360, 310);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
@@ -83,13 +88,14 @@ namespace WordAddIn
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(500, 370);
|
||||
this.MinimumSize = new System.Drawing.Size(400, 300);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnGenerate);
|
||||
this.Controls.Add(this.txtTopic);
|
||||
this.Controls.Add(this.lblTopic);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
|
||||
this.MaximizeBox = true;
|
||||
this.MinimizeBox = true;
|
||||
this.Name = "CreateOutlineForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "创建大纲 - AI助手";
|
||||
|
||||
@@ -90,10 +90,12 @@ namespace WordAddIn
|
||||
{
|
||||
this.Text = "生成配图选项 - 支持编辑提示词";
|
||||
this.Size = new Size(500, 520);
|
||||
this.MinimumSize = new Size(400, 400); // 设置最小尺寸
|
||||
this.StartPosition = FormStartPosition.CenterParent;
|
||||
this.FormBorderStyle = FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.AutoScaleMode = AutoScaleMode.Font; // 支持 DPI 缩放
|
||||
this.FormBorderStyle = FormBorderStyle.Sizable; // 允许调整大小
|
||||
this.MaximizeBox = true; // 允许最大化
|
||||
this.MinimizeBox = true;
|
||||
|
||||
this.lblStyle = new Label();
|
||||
this.cmbStyles = new ComboBox();
|
||||
@@ -114,6 +116,7 @@ namespace WordAddIn
|
||||
this.cmbStyles.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
this.cmbStyles.Location = new Point(20, 45);
|
||||
this.cmbStyles.Size = new Size(440, 25);
|
||||
this.cmbStyles.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; // 宽度自适应
|
||||
foreach (var key in _styleTemplates.Keys)
|
||||
{
|
||||
this.cmbStyles.Items.Add(key);
|
||||
@@ -130,19 +133,22 @@ namespace WordAddIn
|
||||
this.txtFinalPrompt.Multiline = true;
|
||||
this.txtFinalPrompt.ScrollBars = ScrollBars.Vertical;
|
||||
this.txtFinalPrompt.Size = new Size(440, 280);
|
||||
this.txtFinalPrompt.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; // 全向自适应
|
||||
|
||||
// chkOptimize
|
||||
this.chkOptimize.AutoSize = true;
|
||||
this.chkOptimize.Location = new Point(20, 400);
|
||||
this.chkOptimize.Size = new Size(400, 20);
|
||||
this.chkOptimize.Text = "使用 AI 优化提示词 (自动翻译成英文并丰富细节)";
|
||||
this.chkOptimize.Checked = true;
|
||||
this.chkOptimize.Checked = true;
|
||||
this.chkOptimize.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; // 底部固定
|
||||
|
||||
// btnOk
|
||||
this.btnOk.Text = "开始生成";
|
||||
this.btnOk.DialogResult = DialogResult.OK;
|
||||
this.btnOk.Location = new Point(280, 430);
|
||||
this.btnOk.Size = new Size(90, 30);
|
||||
this.btnOk.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; // 右下固定
|
||||
this.btnOk.Click += BtnOk_Click;
|
||||
|
||||
// btnCancel
|
||||
@@ -150,6 +156,7 @@ namespace WordAddIn
|
||||
this.btnCancel.DialogResult = DialogResult.Cancel;
|
||||
this.btnCancel.Location = new Point(380, 430);
|
||||
this.btnCancel.Size = new Size(80, 30);
|
||||
this.btnCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; // 右下固定
|
||||
|
||||
this.Controls.Add(this.lblStyle);
|
||||
this.Controls.Add(this.cmbStyles);
|
||||
|
||||
@@ -44,6 +44,9 @@ namespace WordAddIn
|
||||
//
|
||||
// tabControl
|
||||
//
|
||||
this.tabControl.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.tabControl.Location = new System.Drawing.Point(12, 12);
|
||||
this.tabControl.Name = "tabControl";
|
||||
this.tabControl.SelectedIndex = 0;
|
||||
@@ -52,6 +55,7 @@ namespace WordAddIn
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.btnSave.Location = new System.Drawing.Point(210, 310);
|
||||
this.btnSave.Name = "btnSave";
|
||||
@@ -63,6 +67,7 @@ namespace WordAddIn
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Location = new System.Drawing.Point(320, 310);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
@@ -78,12 +83,13 @@ namespace WordAddIn
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(450, 360);
|
||||
this.MinimumSize = new System.Drawing.Size(350, 300);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnSave);
|
||||
this.Controls.Add(this.tabControl);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
|
||||
this.MaximizeBox = true;
|
||||
this.MinimizeBox = true;
|
||||
this.Name = "OutlineSettingsForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "大纲样式配置";
|
||||
|
||||
@@ -77,6 +77,9 @@ namespace WordAddIn
|
||||
//
|
||||
// tabControl
|
||||
//
|
||||
this.tabControl.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.tabControl.Controls.Add(this.tabFile);
|
||||
this.tabControl.Controls.Add(this.tabText);
|
||||
this.tabControl.Font = new System.Drawing.Font("微软雅黑", 11F);
|
||||
@@ -111,6 +114,8 @@ namespace WordAddIn
|
||||
//
|
||||
// txtFilePath
|
||||
//
|
||||
this.txtFilePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtFilePath.Font = new System.Drawing.Font("微软雅黑", 11F);
|
||||
this.txtFilePath.Location = new System.Drawing.Point(30, 100);
|
||||
this.txtFilePath.Name = "txtFilePath";
|
||||
@@ -120,6 +125,7 @@ namespace WordAddIn
|
||||
//
|
||||
// btnBrowse
|
||||
//
|
||||
this.btnBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnBrowse.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnBrowse.Font = new System.Drawing.Font("微软雅黑", 10F);
|
||||
this.btnBrowse.Location = new System.Drawing.Point(440, 98);
|
||||
@@ -155,6 +161,7 @@ namespace WordAddIn
|
||||
//
|
||||
// lblWordCount
|
||||
//
|
||||
this.lblWordCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.lblWordCount.AutoSize = true;
|
||||
this.lblWordCount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold);
|
||||
this.lblWordCount.Location = new System.Drawing.Point(30, 355);
|
||||
@@ -165,6 +172,7 @@ namespace WordAddIn
|
||||
//
|
||||
// numWordCount
|
||||
//
|
||||
this.numWordCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.numWordCount.Font = new System.Drawing.Font("微软雅黑", 14F);
|
||||
this.numWordCount.Increment = new decimal(new int[] {
|
||||
100,
|
||||
@@ -193,6 +201,7 @@ namespace WordAddIn
|
||||
//
|
||||
// lblWordUnit
|
||||
//
|
||||
this.lblWordUnit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.lblWordUnit.AutoSize = true;
|
||||
this.lblWordUnit.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.lblWordUnit.Location = new System.Drawing.Point(330, 355);
|
||||
@@ -203,6 +212,7 @@ namespace WordAddIn
|
||||
//
|
||||
// btnGenerate
|
||||
//
|
||||
this.btnGenerate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnGenerate.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(87)))), ((int)(((byte)(154)))));
|
||||
this.btnGenerate.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnGenerate.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
@@ -220,6 +230,7 @@ namespace WordAddIn
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
@@ -238,15 +249,16 @@ namespace WordAddIn
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(650, 520);
|
||||
this.MinimumSize = new System.Drawing.Size(500, 400);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnGenerate);
|
||||
this.Controls.Add(this.lblWordUnit);
|
||||
this.Controls.Add(this.numWordCount);
|
||||
this.Controls.Add(this.lblWordCount);
|
||||
this.Controls.Add(this.tabControl);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
|
||||
this.MaximizeBox = true;
|
||||
this.MinimizeBox = true;
|
||||
this.Name = "ReferenceGeneratorForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "素材写作 - AI助手";
|
||||
|
||||
120
WordAddIn/WordAddIn/WpsAddIn.cs
Normal file
120
WordAddIn/WordAddIn/WpsAddIn.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Extensibility;
|
||||
using Microsoft.Office.Core;
|
||||
using Word = Microsoft.Office.Interop.Word;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WordAddIn
|
||||
{
|
||||
/// <summary>
|
||||
/// WPS Office 兼容入口类。
|
||||
/// 实现标准的 COM Add-in 接口 (IDTExtensibility2),以便 WPS 可以加载此插件。
|
||||
/// 同时继承自 AiRibbon,复用 Ribbon UI 和业务逻辑。
|
||||
/// </summary>
|
||||
[ComVisible(true)]
|
||||
[Guid("D8E52004-9D68-4509-8A11-66774D4F0523")] // 固定的 COM GUID
|
||||
[ProgId("WordAddIn.WpsAddIn")] // 注册表中的 ProgID
|
||||
public class WpsAddIn : AiRibbon, IDTExtensibility2, IRibbonExtensibility
|
||||
{
|
||||
private Word.Application _application;
|
||||
private object _addInInstance;
|
||||
|
||||
private void Log(string message)
|
||||
{
|
||||
try
|
||||
{
|
||||
string logPath = @"C:\Temp\WpsAddIn.log";
|
||||
string dir = System.IO.Path.GetDirectoryName(logPath);
|
||||
if (!System.IO.Directory.Exists(dir))
|
||||
{
|
||||
System.IO.Directory.CreateDirectory(dir);
|
||||
}
|
||||
System.IO.File.AppendAllText(logPath, $"{DateTime.Now}: {message}{Environment.NewLine}");
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
#region IDTExtensibility2 成员
|
||||
|
||||
/// <summary>
|
||||
/// 插件加载时调用
|
||||
/// </summary>
|
||||
public void OnConnection(object Application, ext_ConnectMode ConnectMode, object AddInInst, ref Array custom)
|
||||
{
|
||||
Log("OnConnection called");
|
||||
try
|
||||
{
|
||||
_application = Application as Word.Application;
|
||||
_addInInstance = AddInInst;
|
||||
|
||||
if (_application == null)
|
||||
{
|
||||
Log("Application is null in OnConnection");
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("Application obtained successfully");
|
||||
}
|
||||
|
||||
// 初始化全局上下文,确保 AiRibbon 中的功能可以正常获取 Application 对象
|
||||
AddInContext.CurrentApplication = _application;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"Error in OnConnection: {ex.Message}");
|
||||
MessageBox.Show("WPS 插件加载失败: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 插件卸载时调用
|
||||
/// </summary>
|
||||
public void OnDisconnection(ext_DisconnectMode RemoveMode, ref Array custom)
|
||||
{
|
||||
Log("OnDisconnection called");
|
||||
_application = null;
|
||||
_addInInstance = null;
|
||||
// 清理上下文
|
||||
if (AddInContext.CurrentApplication == _application)
|
||||
{
|
||||
AddInContext.CurrentApplication = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnAddInsUpdate(ref Array custom)
|
||||
{
|
||||
Log("OnAddInsUpdate called");
|
||||
}
|
||||
|
||||
public void OnStartupComplete(ref Array custom)
|
||||
{
|
||||
Log("OnStartupComplete called");
|
||||
}
|
||||
|
||||
public void OnBeginShutdown(ref Array custom)
|
||||
{
|
||||
Log("OnBeginShutdown called");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// 显式实现 IRibbonExtensibility,虽然基类实现了,但为了确保 COM 可见性和调试,这里显式重写/覆盖
|
||||
public new string GetCustomUI(string RibbonID)
|
||||
{
|
||||
Log($"GetCustomUI called for RibbonID: {RibbonID}");
|
||||
try
|
||||
{
|
||||
// 调用基类的方法获取 XML
|
||||
string xml = base.GetCustomUI(RibbonID);
|
||||
Log("GetCustomUI XML retrieved successfully");
|
||||
return xml;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log($"Error in GetCustomUI: {ex.Message}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
WordAddIn/WordAddIn/bin/Debug/WordAddIn.tlb
Normal file
BIN
WordAddIn/WordAddIn/bin/Debug/WordAddIn.tlb
Normal file
Binary file not shown.
Binary file not shown.
BIN
WordAddIn/WordAddIn/bin/Release/Newtonsoft.Json.dll
Normal file
BIN
WordAddIn/WordAddIn/bin/Release/Newtonsoft.Json.dll
Normal file
Binary file not shown.
11698
WordAddIn/WordAddIn/bin/Release/Newtonsoft.Json.xml
Normal file
11698
WordAddIn/WordAddIn/bin/Release/Newtonsoft.Json.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
WordAddIn/WordAddIn/bin/Release/WordAddIn.dll
Normal file
BIN
WordAddIn/WordAddIn/bin/Release/WordAddIn.dll
Normal file
Binary file not shown.
203
WordAddIn/WordAddIn/bin/Release/WordAddIn.dll.manifest
Normal file
203
WordAddIn/WordAddIn/bin/Release/WordAddIn.dll.manifest
Normal file
@@ -0,0 +1,203 @@
|
||||
<?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="WordAddIn.dll" version="1.0.0.5" publicKeyToken="06a92c46db516926" language="neutral" processorArchitecture="msil" type="win32" />
|
||||
<description xmlns="urn:schemas-microsoft-com:asm.v1">WordAddIn</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.Net.Http" version="4.2.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="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="Newtonsoft.Json.dll" size="721320">
|
||||
<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>8MB68OhNTdTaS9eCO6RTW8BIGzv2I+1Atlm2gUemu3U=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WordAddIn.dll" size="92160">
|
||||
<assemblyIdentity name="WordAddIn" 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>Xc75xyRYUsYQipvtLXm0QDx+Cld2d4Let98h0RoSn60=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<vstav3:addIn xmlns:vstav3="urn:schemas-microsoft-com:vsta.v3">
|
||||
<vstav3:entryPointsCollection>
|
||||
<vstav3:entryPoints>
|
||||
<vstav3:entryPoint class="WordAddIn.ThisAddIn">
|
||||
<assemblyIdentity name="WordAddIn" 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="WordAddIn">
|
||||
<vstov4:friendlyName>WordAddIn</vstov4:friendlyName>
|
||||
<vstov4:description>WordAddIn</vstov4:description>
|
||||
<vstov4.1:ribbonTypes xmlns:vstov4.1="urn:schemas-microsoft-com:vsto.v4.1" />
|
||||
</vstov4:appAddIn>
|
||||
</vstov4:customization>
|
||||
</vstov4:customizations>
|
||||
</vstav3:application>
|
||||
</vstav3:addIn>
|
||||
<publisherIdentity name="CN=DESKTOP-Q6H7B6L\Administrator" issuerKeyHash="42606c52715d5764c2f9dab5bee6dcd76cc7a67d" /><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>C9avRX9nfKTHDCTvRZPXB995lkAo4zeFxLdQ276wuO4=</DigestValue></Reference></SignedInfo><SignatureValue>TdnelO/cwCkCCeDawTU6BuIEGjlDYbfV5PB+3/qnqGqnR6J4Y1uoIby1tsVvkS9DDMRC+1IixlDEeYKSn5LsDgSJW3Ayi8TBALUW9wvmVWyHlFCdGeCjpZi9SEVbKazkolOki6LiXJjS+7Rg+IwAYXfPunMYtWUizUXWNof7Aq0=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>23ghUI75yy8GcLhPT5yA+v2ssRfSW+chNqMI+pq5OAr7RXQJOt/+bHdoT9NoS9GQkvblc7ekoUNShIcN601ZZOPgAxkXaQS+La14Wp8GOwnM1qHNJwgla4VAIYjmCj3CUMXLsxspOFVZKRnB6/idYku4Gzhc7NjRBAwe8qWBXaE=</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="eeb8b0bedb50b7c48537e328409679df07d79345ef240cc7a47c677f45afd60b" Description="" Url=""><as:assemblyIdentity name="WordAddIn.dll" version="1.0.0.5" publicKeyToken="06a92c46db516926" language="neutral" processorArchitecture="msil" type="win32" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=DESKTOP-Q6H7B6L\Administrator</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>iYwkWAWU35knc6kiYK6gTxxE/Nh3uHxhbLQwEgreJ0M=</DigestValue></Reference></SignedInfo><SignatureValue>zJiYXR8G+maT6VbsHD2w6q1pgH76qSQ/KAXVc2T/fdOjU+a+9TGWKBIGseWr4x0G4lpY95+eD7msW9p1YMtV3P+H4shh1c5rLhwel6TYItdrtbcnqqLNzBbbtdhbGJ3jxH9JK9CSmIy636BegAEs+klj3T4zcEMw1PVYeCgjr1E=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>23ghUI75yy8GcLhPT5yA+v2ssRfSW+chNqMI+pq5OAr7RXQJOt/+bHdoT9NoS9GQkvblc7ekoUNShIcN601ZZOPgAxkXaQS+La14Wp8GOwnM1qHNJwgla4VAIYjmCj3CUMXLsxspOFVZKRnB6/idYku4Gzhc7NjRBAwe8qWBXaE=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIICDTCCAXagAwIBAgIQJpSlsxfGbpRNgyjD5Q/yDjANBgkqhkiG9w0BAQsFADBFMUMwQQYDVQQDHjoARABFAFMASwBUAE8AUAAtAFEANgBIADcAQgA2AEwAXABBAGQAbQBpAG4AaQBzAHQAcgBhAHQAbwByMB4XDTI2MDEyNDAwMzYxNVoXDTI3MDEyNDA2MzYxNVowRTFDMEEGA1UEAx46AEQARQBTAEsAVABPAFAALQBRADYASAA3AEIANgBMAFwAQQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA23ghUI75yy8GcLhPT5yA+v2ssRfSW+chNqMI+pq5OAr7RXQJOt/+bHdoT9NoS9GQkvblc7ekoUNShIcN601ZZOPgAxkXaQS+La14Wp8GOwnM1qHNJwgla4VAIYjmCj3CUMXLsxspOFVZKRnB6/idYku4Gzhc7NjRBAwe8qWBXaECAwEAATANBgkqhkiG9w0BAQsFAAOBgQC3GjWMhEFFrn9PGYrQVGNAaibG1sR/eRX3ZWNRjYLhiqbsdeHvm4CX/W0EWd9yZlbaej87XyeUbX+mC3q3yMFVPCRn/W65WYyBPbWTWmSfU9VLKKULAH6WqjS7CqEU3cQSuKcU6nYG4AJu2/FkQJaA82tr3pvcQD28HmOlDeNh0Q==</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>
|
||||
BIN
WordAddIn/WordAddIn/bin/Release/WordAddIn.pdb
Normal file
BIN
WordAddIn/WordAddIn/bin/Release/WordAddIn.pdb
Normal file
Binary file not shown.
21
WordAddIn/WordAddIn/bin/Release/WordAddIn.vsto
Normal file
21
WordAddIn/WordAddIn/bin/Release/WordAddIn.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="WordAddIn.vsto" version="1.0.0.5" publicKeyToken="06a92c46db516926" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
|
||||
<description asmv2:publisher="WordAddIn" asmv2:product="WordAddIn" xmlns="urn:schemas-microsoft-com:asm.v1" />
|
||||
<deployment install="false" />
|
||||
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
|
||||
<framework targetVersion="4.7.2" profile="Full" supportedRuntime="4.0.30319" />
|
||||
</compatibleFrameworks>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" codebase="WordAddIn.dll.manifest" size="14626">
|
||||
<assemblyIdentity name="WordAddIn.dll" version="1.0.0.5" publicKeyToken="06a92c46db516926" 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>uc4ted455t5fnD/+JbLpdaTFK8cohGlzP/okvRpZkaY=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<publisherIdentity name="CN=DESKTOP-Q6H7B6L\Administrator" issuerKeyHash="42606c52715d5764c2f9dab5bee6dcd76cc7a67d" /><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>u2iS9Fgei3TF/Y3nkcEa9EOIDuiXBAsXxxjBTjNWjyo=</DigestValue></Reference></SignedInfo><SignatureValue>qqTHg6m3s7kQmUxARD8Qs8ewpwcejuUvjYC5Y7gkadIdT1HDSFT2qGhJBzrjlJVE2jlj2azutIuYzz2Birxhhn3TQRatXfEcqirHeHJhLGw8rQNy6DJzltFeGGjoNDkojdVB9EdTBNG5WNXEMPQhXYAJQEZwvsoJzApigWljHF8=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>23ghUI75yy8GcLhPT5yA+v2ssRfSW+chNqMI+pq5OAr7RXQJOt/+bHdoT9NoS9GQkvblc7ekoUNShIcN601ZZOPgAxkXaQS+La14Wp8GOwnM1qHNJwgla4VAIYjmCj3CUMXLsxspOFVZKRnB6/idYku4Gzhc7NjRBAwe8qWBXaE=</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="2a8f56334ec118c7170b0497e80e8843f41ac191e78dfdc5748b1e58f49268bb" Description="" Url=""><as:assemblyIdentity name="WordAddIn.vsto" version="1.0.0.5" publicKeyToken="06a92c46db516926" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=DESKTOP-Q6H7B6L\Administrator</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>jNYRbwZELLiwmbasEVrI9F5SBTc5CX/3KhyNXa+oBJ8=</DigestValue></Reference></SignedInfo><SignatureValue>SO2h00e50l0Pn6zBPURS24wQu10eljbiaskGqQmZfBqsO0BRE6i2sDfoZKvA33Vp1hOeGml4boP+jPh6uezIWf74o7g6vH+f0iTtAOHrWiuKvlFV53YHOoH5Ps7Tq+U0bQ8LLyjx5ZEUBj+mlGel9U8QGnCIBx1rwZlyc+azI8k=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>23ghUI75yy8GcLhPT5yA+v2ssRfSW+chNqMI+pq5OAr7RXQJOt/+bHdoT9NoS9GQkvblc7ekoUNShIcN601ZZOPgAxkXaQS+La14Wp8GOwnM1qHNJwgla4VAIYjmCj3CUMXLsxspOFVZKRnB6/idYku4Gzhc7NjRBAwe8qWBXaE=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIICDTCCAXagAwIBAgIQJpSlsxfGbpRNgyjD5Q/yDjANBgkqhkiG9w0BAQsFADBFMUMwQQYDVQQDHjoARABFAFMASwBUAE8AUAAtAFEANgBIADcAQgA2AEwAXABBAGQAbQBpAG4AaQBzAHQAcgBhAHQAbwByMB4XDTI2MDEyNDAwMzYxNVoXDTI3MDEyNDA2MzYxNVowRTFDMEEGA1UEAx46AEQARQBTAEsAVABPAFAALQBRADYASAA3AEIANgBMAFwAQQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA23ghUI75yy8GcLhPT5yA+v2ssRfSW+chNqMI+pq5OAr7RXQJOt/+bHdoT9NoS9GQkvblc7ekoUNShIcN601ZZOPgAxkXaQS+La14Wp8GOwnM1qHNJwgla4VAIYjmCj3CUMXLsxspOFVZKRnB6/idYku4Gzhc7NjRBAwe8qWBXaECAwEAATANBgkqhkiG9w0BAQsFAAOBgQC3GjWMhEFFrn9PGYrQVGNAaibG1sR/eRX3ZWNRjYLhiqbsdeHvm4CX/W0EWd9yZlbaej87XyeUbX+mC3q3yMFVPCRn/W65WYyBPbWTWmSfU9VLKKULAH6WqjS7CqEU3cQSuKcU6nYG4AJu2/FkQJaA82tr3pvcQD28HmOlDeNh0Q==</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
dfceb9c0bcd6af0f5cce32fa9dd10ad83abf5bbc482d468e26e2dc4a9ed71baf
|
||||
@@ -0,0 +1,14 @@
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\bin\Release\WordAddIn.dll
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\bin\Release\WordAddIn.pdb
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\bin\Release\WordAddIn.dll.manifest
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\bin\Release\WordAddIn.vsto
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\bin\Release\Microsoft.Office.Tools.Common.v4.0.Utilities.dll
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\bin\Release\Newtonsoft.Json.dll
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\bin\Release\Newtonsoft.Json.xml
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\obj\Release\WordAddIn.csproj.AssemblyReference.cache
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\obj\Release\WordAddIn.Properties.Resources.resources
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\obj\Release\WordAddIn.csproj.GenerateResource.cache
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\obj\Release\WordAddIn.csproj.CoreCompileInputs.cache
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\obj\Release\WordAddIn.csproj.Up2Date
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\obj\Release\WordAddIn.dll
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\obj\Release\WordAddIn.pdb
|
||||
Binary file not shown.
BIN
WordAddIn/WordAddIn/obj/Release/WordAddIn.dll
Normal file
BIN
WordAddIn/WordAddIn/obj/Release/WordAddIn.dll
Normal file
Binary file not shown.
BIN
WordAddIn/WordAddIn/obj/Release/WordAddIn.pdb
Normal file
BIN
WordAddIn/WordAddIn/obj/Release/WordAddIn.pdb
Normal file
Binary file not shown.
344
WordAddIn/WpsInstaller/Program.cs
Normal file
344
WordAddIn/WpsInstaller/Program.cs
Normal file
@@ -0,0 +1,344 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.Win32;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace WpsInstaller
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("========================================");
|
||||
Console.WriteLine(" WPS Add-in Installer Tool");
|
||||
Console.WriteLine("========================================");
|
||||
Console.WriteLine();
|
||||
|
||||
string mode = "wps"; // default
|
||||
if (args.Length > 0)
|
||||
{
|
||||
mode = args[0].ToLower();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// 1. Locate WordAddIn.dll and WordAddIn.vsto
|
||||
string currentDir = AppDomain.CurrentDomain.BaseDirectory;
|
||||
string dllPath = Path.Combine(currentDir, "WordAddIn.dll");
|
||||
string vstoPath = Path.Combine(currentDir, "WordAddIn.vsto");
|
||||
|
||||
if (!File.Exists(dllPath))
|
||||
{
|
||||
// Fallback for Dev scenario
|
||||
string devPathDll = Path.GetFullPath(Path.Combine(currentDir, @"..\..\..\WordAddIn\bin\Debug\WordAddIn.dll"));
|
||||
if (!File.Exists(devPathDll))
|
||||
{
|
||||
devPathDll = Path.GetFullPath(Path.Combine(currentDir, @"..\..\..\WordAddIn\bin\Release\WordAddIn.dll"));
|
||||
}
|
||||
|
||||
if (File.Exists(devPathDll))
|
||||
{
|
||||
dllPath = devPathDll;
|
||||
vstoPath = Path.ChangeExtension(dllPath, ".vsto");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Error: Could not find WordAddIn.dll.");
|
||||
Pause();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("Found DLL: " + dllPath);
|
||||
|
||||
if (mode == "word")
|
||||
{
|
||||
Console.WriteLine("Mode: Switch to MS Word (VSTO)");
|
||||
// 1. Clean WPS Keys
|
||||
CleanupWpsKeys();
|
||||
|
||||
// 1.5 Clear ClickOnce cache to avoid upgrade conflicts
|
||||
Console.WriteLine("Clearing ClickOnce cache to avoid upgrade conflicts...");
|
||||
ClearClickOnceCache();
|
||||
|
||||
// 2. Register VSTO
|
||||
if (RegisterVsto(vstoPath))
|
||||
{
|
||||
Console.WriteLine(" [OK] VSTO registered successfully.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine(" [FAIL] Failed to register VSTO.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Mode: Switch to WPS Office");
|
||||
// 1. Register Assembly (COM Registration)
|
||||
Console.WriteLine("Registering Assembly for COM Interop...");
|
||||
if (RegisterAssembly(dllPath))
|
||||
{
|
||||
Console.WriteLine(" [OK] Assembly registered successfully.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine(" [FAIL] Failed to register assembly.");
|
||||
Pause();
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. Register for WPS (Registry Keys)
|
||||
Console.WriteLine("Configuring WPS Registry Keys...");
|
||||
if (RegisterForWPS())
|
||||
{
|
||||
Console.WriteLine(" [OK] WPS Registry keys configured successfully.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine(" [FAIL] Failed to configure WPS registry keys.");
|
||||
Pause();
|
||||
return;
|
||||
}
|
||||
|
||||
// 3. Cleanup conflicting VSTO registration
|
||||
Console.WriteLine("Checking for conflicting VSTO registrations...");
|
||||
CleanupVstoKeys();
|
||||
}
|
||||
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("========================================");
|
||||
Console.WriteLine(" Operation Completed Successfully!");
|
||||
Console.WriteLine("========================================");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("An unexpected error occurred: " + ex.Message);
|
||||
Console.WriteLine(ex.StackTrace);
|
||||
}
|
||||
|
||||
Pause();
|
||||
}
|
||||
|
||||
static void Pause()
|
||||
{
|
||||
Console.WriteLine("\nPress any key to exit...");
|
||||
Console.ReadKey();
|
||||
}
|
||||
|
||||
static void ClearClickOnceCache()
|
||||
{
|
||||
try
|
||||
{
|
||||
string localApp = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
string cachePath = System.IO.Path.Combine(localApp, "Apps", "2.0");
|
||||
if (Directory.Exists(cachePath))
|
||||
{
|
||||
Directory.Delete(cachePath, true);
|
||||
Console.WriteLine(" [OK] Cleared ClickOnce cache at " + cachePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine(" ClickOnce cache not found, skipping.");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(" Warning: Failed to clear ClickOnce cache: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
static bool RegisterVsto(string vstoPath)
|
||||
{
|
||||
if (!File.Exists(vstoPath))
|
||||
{
|
||||
Console.WriteLine(" Error: .vsto file not found at " + vstoPath);
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Register via Registry for Development/Local use
|
||||
// HKCU\Software\Microsoft\Office\Word\Addins\WordAddIn
|
||||
string keyPath = @"Software\Microsoft\Office\Word\Addins\WordAddIn";
|
||||
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(keyPath))
|
||||
{
|
||||
if (key == null) return false;
|
||||
|
||||
key.SetValue("Description", "WordAddIn", RegistryValueKind.String);
|
||||
key.SetValue("FriendlyName", "WordAddIn", RegistryValueKind.String);
|
||||
key.SetValue("LoadBehavior", 3, RegistryValueKind.DWord);
|
||||
// Point to vsto file with |vstolocal to indicate local file
|
||||
key.SetValue("Manifest", vstoPath + "|vstolocal", RegistryValueKind.String);
|
||||
|
||||
Console.WriteLine(" Created Key: HKCU\\" + keyPath);
|
||||
Console.WriteLine(" Manifest: " + vstoPath + "|vstolocal");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(" Error registering VSTO: " + ex.Message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static void CleanupWpsKeys()
|
||||
{
|
||||
try
|
||||
{
|
||||
string keyPath = @"Software\Kingsoft\Office\Word\Addins\WordAddIn.WpsAddIn";
|
||||
using (RegistryKey key = Registry.CurrentUser.OpenSubKey(keyPath, true))
|
||||
{
|
||||
if (key != null)
|
||||
{
|
||||
Console.WriteLine(" Found WPS key. Deleting...");
|
||||
Registry.CurrentUser.DeleteSubKeyTree(keyPath);
|
||||
Console.WriteLine(" [OK] WPS key deleted.");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(" Warning: Failed to cleanup WPS keys: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
static bool RegisterAssembly(string assemblyPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Use RegistrationServices to register the assembly
|
||||
// This is equivalent to regasm /codebase
|
||||
// Note: This requires the assembly to be strong-named if registered in GAC,
|
||||
// but for simple codebase registration, it might work if run as Admin.
|
||||
|
||||
// However, standard RegistrationServices doesn't easily support /codebase option programmatically
|
||||
// without some caveats.
|
||||
// The most robust way for a utility is often to shell out to RegAsm.exe if available,
|
||||
// OR use RegistrationServices.RegisterAssembly.
|
||||
|
||||
// Let's try RegistrationServices first.
|
||||
RegistrationServices regService = new RegistrationServices();
|
||||
Assembly asm = Assembly.LoadFrom(assemblyPath);
|
||||
|
||||
// RegisterAssembly adds entries to HKCR\CLSID\{GUID}
|
||||
// We need to set the CodeBase registry key manually if not in GAC,
|
||||
// or ensure RegistrationServices does it.
|
||||
// Actually, RegistrationServices.RegisterAssembly does NOT set the CodeBase by default.
|
||||
// It works like RegAsm without /codebase.
|
||||
|
||||
// So calling RegAsm.exe via process is safer to ensure /codebase behavior.
|
||||
string regAsmPath = GetRegAsmPath();
|
||||
if (string.IsNullOrEmpty(regAsmPath))
|
||||
{
|
||||
Console.WriteLine(" Warning: Could not find RegAsm.exe. Attempting manual registration...");
|
||||
return ManualRegister(asm, assemblyPath);
|
||||
}
|
||||
|
||||
string args = string.Format("\"{0}\" /codebase /tlb", assemblyPath);
|
||||
ProcessStartInfo psi = new ProcessStartInfo(regAsmPath, args);
|
||||
psi.UseShellExecute = false;
|
||||
psi.RedirectStandardOutput = true;
|
||||
psi.CreateNoWindow = true;
|
||||
|
||||
Console.WriteLine(string.Format(" Executing: {0} {1}", psi.FileName, psi.Arguments));
|
||||
|
||||
using (Process p = Process.Start(psi))
|
||||
{
|
||||
string output = p.StandardOutput.ReadToEnd();
|
||||
p.WaitForExit();
|
||||
Console.WriteLine(output);
|
||||
return p.ExitCode == 0;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(" Error registering assembly: " + ex.Message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static bool ManualRegister(Assembly asm, string assemblyPath)
|
||||
{
|
||||
// Fallback: This is complex to do fully manually for all COM types.
|
||||
// If RegAsm is missing, we might be in trouble.
|
||||
// But usually on a machine with .NET Framework (needed to run this app), RegAsm is present.
|
||||
return false;
|
||||
}
|
||||
|
||||
static string GetRegAsmPath()
|
||||
{
|
||||
// Usually in C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe
|
||||
// or Framework64
|
||||
string windir = Environment.GetEnvironmentVariable("windir");
|
||||
string fxDir = Path.Combine(windir, @"Microsoft.NET\Framework\v4.0.30319");
|
||||
// Check for 64 bit OS and prefer Framework64 if this process is 64 bit,
|
||||
// BUT WordAddIn is likely AnyCPU.
|
||||
// If Word/WPS is 32-bit, we need 32-bit RegAsm. If 64-bit, we need 64-bit RegAsm.
|
||||
// Ideally register both.
|
||||
|
||||
// For safety, let's try to find the one matching the current process architecture,
|
||||
// or just use the 32-bit one as it is most common for Office.
|
||||
|
||||
string regAsm = Path.Combine(fxDir, "RegAsm.exe");
|
||||
if (File.Exists(regAsm)) return regAsm;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
static bool RegisterForWPS()
|
||||
{
|
||||
try
|
||||
{
|
||||
string keyPath = @"Software\Kingsoft\Office\Word\Addins\WordAddIn.WpsAddIn";
|
||||
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(keyPath))
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
Console.WriteLine(" Error: Could not create registry key HKCU\\" + keyPath);
|
||||
return false;
|
||||
}
|
||||
|
||||
key.SetValue("LoadBehavior", 3, RegistryValueKind.DWord);
|
||||
key.SetValue("FriendlyName", "AI Word Assistant for WPS", RegistryValueKind.String);
|
||||
key.SetValue("Description", "AI Assistant", RegistryValueKind.String);
|
||||
key.SetValue("CommandLineSafe", 0, RegistryValueKind.DWord);
|
||||
|
||||
Console.WriteLine(" Created Key: HKCU\\" + keyPath);
|
||||
Console.WriteLine(" Set LoadBehavior = 3");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(" Error writing WPS registry keys: " + ex.Message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static void CleanupVstoKeys()
|
||||
{
|
||||
try
|
||||
{
|
||||
// VSTO adds keys in HKCU\Software\Microsoft\Office\Word\Addins\WordAddIn
|
||||
string vstoKeyPath = @"Software\Microsoft\Office\Word\Addins\WordAddIn";
|
||||
|
||||
using (RegistryKey key = Registry.CurrentUser.OpenSubKey(vstoKeyPath, true))
|
||||
{
|
||||
if (key != null)
|
||||
{
|
||||
Console.WriteLine(" Found VSTO key in HKCU\\" + vstoKeyPath + ". Deleting to avoid conflicts...");
|
||||
Registry.CurrentUser.DeleteSubKeyTree(vstoKeyPath);
|
||||
Console.WriteLine(" [OK] VSTO key deleted.");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(" Warning: Failed to cleanup VSTO keys: " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
36
WordAddIn/WpsInstaller/Properties/AssemblyInfo.cs
Normal file
36
WordAddIn/WpsInstaller/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("WpsInstaller")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("WpsInstaller")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("a1b2c3d4-e5f6-4789-0011-223344556677")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
58
WordAddIn/WpsInstaller/WpsInstaller.csproj
Normal file
58
WordAddIn/WpsInstaller/WpsInstaller.csproj
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{A1B2C3D4-E5F6-4789-0011-223344556677}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>WpsInstaller</RootNamespace>
|
||||
<AssemblyName>WpsInstaller</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.manifest" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
11
WordAddIn/WpsInstaller/app.manifest
Normal file
11
WordAddIn/WpsInstaller/app.manifest
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="WpsInstaller.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
BIN
WordAddIn/WpsInstaller/bin/Debug/WpsInstaller.exe
Normal file
BIN
WordAddIn/WpsInstaller/bin/Debug/WpsInstaller.exe
Normal file
Binary file not shown.
BIN
WordAddIn/WpsInstaller/bin/Debug/WpsInstaller.pdb
Normal file
BIN
WordAddIn/WpsInstaller/bin/Debug/WpsInstaller.pdb
Normal file
Binary file not shown.
BIN
WordAddIn/WpsInstaller/bin/Release/WpsInstaller.exe
Normal file
BIN
WordAddIn/WpsInstaller/bin/Release/WpsInstaller.exe
Normal file
Binary file not shown.
BIN
WordAddIn/WpsInstaller/bin/Release/WpsInstaller.pdb
Normal file
BIN
WordAddIn/WpsInstaller/bin/Release/WpsInstaller.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.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
D:\dsWork\aiData\WordAddIn\WpsInstaller\bin\Debug\WpsInstaller.exe
|
||||
D:\dsWork\aiData\WordAddIn\WpsInstaller\bin\Debug\WpsInstaller.pdb
|
||||
D:\dsWork\aiData\WordAddIn\WpsInstaller\obj\Debug\WpsInstaller.exe
|
||||
D:\dsWork\aiData\WordAddIn\WpsInstaller\obj\Debug\WpsInstaller.pdb
|
||||
d:\dsWork\aiData\WordAddIn\WpsInstaller\obj\Debug\WpsInstaller.csprojResolveAssemblyReference.cache
|
||||
Binary file not shown.
BIN
WordAddIn/WpsInstaller/obj/Debug/WpsInstaller.exe
Normal file
BIN
WordAddIn/WpsInstaller/obj/Debug/WpsInstaller.exe
Normal file
Binary file not shown.
BIN
WordAddIn/WpsInstaller/obj/Debug/WpsInstaller.pdb
Normal file
BIN
WordAddIn/WpsInstaller/obj/Debug/WpsInstaller.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.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
979fc59c1f2afcc3443738cd70ff09bf60f7ecb8fbff0eec3eb8b752a83b3e04
|
||||
@@ -0,0 +1,6 @@
|
||||
D:\dsWork\aiData\WordAddIn\WpsInstaller\bin\Release\WpsInstaller.exe
|
||||
D:\dsWork\aiData\WordAddIn\WpsInstaller\bin\Release\WpsInstaller.pdb
|
||||
D:\dsWork\aiData\WordAddIn\WpsInstaller\obj\Release\WpsInstaller.csproj.AssemblyReference.cache
|
||||
D:\dsWork\aiData\WordAddIn\WpsInstaller\obj\Release\WpsInstaller.csproj.CoreCompileInputs.cache
|
||||
D:\dsWork\aiData\WordAddIn\WpsInstaller\obj\Release\WpsInstaller.exe
|
||||
D:\dsWork\aiData\WordAddIn\WpsInstaller\obj\Release\WpsInstaller.pdb
|
||||
BIN
WordAddIn/WpsInstaller/obj/Release/WpsInstaller.exe
Normal file
BIN
WordAddIn/WpsInstaller/obj/Release/WpsInstaller.exe
Normal file
Binary file not shown.
BIN
WordAddIn/WpsInstaller/obj/Release/WpsInstaller.pdb
Normal file
BIN
WordAddIn/WpsInstaller/obj/Release/WpsInstaller.pdb
Normal file
Binary file not shown.
Reference in New Issue
Block a user