'commit'
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,12 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "D:\\dsWork\\aiData\\WordAddIn\\",
|
||||
"Documents": [],
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}|WordAddIn\\WordAddIn.csproj|d:\\dswork\\aidata\\wordaddin\\wordaddin\\modeldefinitions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}|WordAddIn\\WordAddIn.csproj|solutionrelative:wordaddin\\modeldefinitions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
@@ -9,11 +14,24 @@
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": -1,
|
||||
"SelectedChildIndex": 1,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "ModelDefinitions.cs",
|
||||
"DocumentMoniker": "D:\\dsWork\\aiData\\WordAddIn\\WordAddIn\\ModelDefinitions.cs",
|
||||
"RelativeDocumentMoniker": "WordAddIn\\ModelDefinitions.cs",
|
||||
"ToolTip": "D:\\dsWork\\aiData\\WordAddIn\\WordAddIn\\ModelDefinitions.cs",
|
||||
"RelativeToolTip": "WordAddIn\\ModelDefinitions.cs",
|
||||
"ViewState": "AgIAAAkAAAAAAAAAAAAuwBIAAAAoAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2026-01-28T13:21:19.787Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "D:\\dsWork\\aiData\\WordAddIn\\",
|
||||
"Documents": [],
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}|WordAddIn\\WordAddIn.csproj|d:\\dswork\\aidata\\wordaddin\\wordaddin\\modeldefinitions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}|WordAddIn\\WordAddIn.csproj|solutionrelative:wordaddin\\modeldefinitions.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
@@ -9,11 +14,24 @@
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": -1,
|
||||
"SelectedChildIndex": 1,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "ModelDefinitions.cs",
|
||||
"DocumentMoniker": "D:\\dsWork\\aiData\\WordAddIn\\WordAddIn\\ModelDefinitions.cs",
|
||||
"RelativeDocumentMoniker": "WordAddIn\\ModelDefinitions.cs",
|
||||
"ToolTip": "D:\\dsWork\\aiData\\WordAddIn\\WordAddIn\\ModelDefinitions.cs",
|
||||
"RelativeToolTip": "WordAddIn\\ModelDefinitions.cs",
|
||||
"ViewState": "AgIAAAkAAAAAAAAAAAAuwBIAAAAoAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2026-01-28T13:21:19.787Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.14.36915.13 d17.14
|
||||
VisualStudioVersion = 17.14.36915.13
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WordAddIn", "WordAddIn\WordAddIn.csproj", "{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}"
|
||||
EndProject
|
||||
@@ -10,17 +10,37 @@ EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}.Release|x64.Build.0 = Release|Any CPU
|
||||
{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{EC0A80FA-FCBD-4239-945A-627B20CCCBAA}.Release|x86.Build.0 = Release|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A1B2C3D4-E5F6-4789-0011-223344556677}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Office = Microsoft.Office.Core;
|
||||
@@ -56,7 +57,28 @@ namespace WordAddIn
|
||||
/// <returns>包含 Ribbon 定义的 XML 字符串</returns>
|
||||
public string GetCustomUI(string ribbonID)
|
||||
{
|
||||
return GetResourceText("WordAddIn.AiRibbon.xml");
|
||||
try
|
||||
{
|
||||
string xml = GetResourceText("WordAddIn.AiRibbon.xml");
|
||||
// 移除 XML 声明,防止编码不一致导致 VSTO 加载失败
|
||||
if (xml != null)
|
||||
{
|
||||
int index = xml.IndexOf("?>");
|
||||
if (index > -1)
|
||||
{
|
||||
xml = xml.Substring(index + 2).Trim();
|
||||
}
|
||||
}
|
||||
|
||||
File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", $"{DateTime.Now} GetCustomUI called. Result length: {(xml?.Length ?? 0)}\n");
|
||||
if (xml == null) File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", $"{DateTime.Now} ERROR: GetResourceText returned null for 'WordAddIn.AiRibbon.xml'\n");
|
||||
return xml;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", $"{DateTime.Now} ERROR in GetCustomUI: {ex.Message}\n");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -70,9 +92,15 @@ namespace WordAddIn
|
||||
/// <param name="ribbonUI">Ribbon UI 实例</param>
|
||||
public void Ribbon_Load(Office.IRibbonUI ribbonUI)
|
||||
{
|
||||
try
|
||||
{
|
||||
File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", $"{DateTime.Now} Ribbon_Load called.\n");
|
||||
}
|
||||
catch {}
|
||||
this.ribbon = ribbonUI;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// 获取组合的上下文信息,包含全文背景和外部参考资料。
|
||||
/// 将 _documentContext (全文背景) 和 _referenceContext (外部参考) 拼接成一个字符串。
|
||||
@@ -97,6 +125,49 @@ namespace WordAddIn
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
#region DropDown Callbacks (Model Selection)
|
||||
|
||||
public int GetModelCount(Office.IRibbonControl control)
|
||||
{
|
||||
return ModelConfig.AvailableModels.Count;
|
||||
}
|
||||
|
||||
public string GetModelLabel(Office.IRibbonControl control, int index)
|
||||
{
|
||||
var model = ModelConfig.AvailableModels[index];
|
||||
return $"{model.Provider} - {model.Name}";
|
||||
}
|
||||
|
||||
public int GetSelectedModelIndex(Office.IRibbonControl control)
|
||||
{
|
||||
string currentId = Settings.Default.SelectedModel;
|
||||
int index = ModelConfig.AvailableModels.FindIndex(m => m.Id == currentId);
|
||||
return index >= 0 ? index : 0;
|
||||
}
|
||||
|
||||
public void OnModelSelection(Office.IRibbonControl control, string selectedId, int selectedIndex)
|
||||
{
|
||||
var model = ModelConfig.AvailableModels[selectedIndex];
|
||||
Settings.Default.SelectedModel = model.Id;
|
||||
Settings.Default.Save();
|
||||
|
||||
// 刷新标签显示
|
||||
ribbon.InvalidateControl("lblCurrentModel");
|
||||
}
|
||||
|
||||
public string GetCurrentModelLabel(Office.IRibbonControl control)
|
||||
{
|
||||
string currentId = Settings.Default.SelectedModel;
|
||||
var model = ModelConfig.AvailableModels.Find(m => m.Id == currentId);
|
||||
if (model != null)
|
||||
{
|
||||
return $"当前: {model.Name}";
|
||||
}
|
||||
return "当前: 未知";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 【补充背景】按钮点击事件处理。
|
||||
/// 允许用户导入外部文档 (txt, doc, docx) 作为背景资料。
|
||||
@@ -194,7 +265,7 @@ namespace WordAddIn
|
||||
}
|
||||
|
||||
// 调用 AI 服务进行文档分析
|
||||
_documentContext = await Task.Run(() => _aiService.AnalyzeDocument(fullText));
|
||||
_documentContext = await Task.Run(() => _aiService.AnalyzeDocument(fullText, loading.UpdateProgress));
|
||||
|
||||
if (!string.IsNullOrEmpty(_documentContext))
|
||||
{
|
||||
@@ -265,7 +336,7 @@ namespace WordAddIn
|
||||
loading.Refresh();
|
||||
|
||||
// 3. 调用 AI 服务进行总结
|
||||
string outlineText = await Task.Run(() => _aiService.SummarizeToOutline(originalText));
|
||||
string outlineText = await Task.Run(() => _aiService.SummarizeToOutline(originalText, loading.UpdateProgress));
|
||||
|
||||
loading.CloseSafe();
|
||||
loading.Dispose();
|
||||
@@ -366,7 +437,7 @@ namespace WordAddIn
|
||||
loading.Refresh();
|
||||
|
||||
// 3. 在后台线程运行 AI 请求,传入原文和组合上下文
|
||||
string polishedText = await Task.Run(() => _aiService.PolishText(originalText, GetCombinedContext()));
|
||||
string polishedText = await Task.Run(() => _aiService.PolishText(originalText, GetCombinedContext(), loading.UpdateProgress));
|
||||
|
||||
if (!string.IsNullOrEmpty(polishedText))
|
||||
{
|
||||
@@ -450,7 +521,7 @@ namespace WordAddIn
|
||||
loading.Refresh();
|
||||
|
||||
// 2. 调用 AI 服务进行深度升华
|
||||
string elevatedText = await Task.Run(() => _aiService.ElevateText(originalText, GetCombinedContext()));
|
||||
string elevatedText = await Task.Run(() => _aiService.ElevateText(originalText, GetCombinedContext(), loading.UpdateProgress));
|
||||
|
||||
if (!string.IsNullOrEmpty(elevatedText))
|
||||
{
|
||||
@@ -552,7 +623,7 @@ namespace WordAddIn
|
||||
|
||||
// 3. 调用 AI 服务进行生成
|
||||
// 传入原文(上下文)、参考素材、字数限制、全文背景
|
||||
string result = await Task.Run(() => _aiService.GenerateWithReference(originalText, referenceContent, wordLimit, GetCombinedContext()));
|
||||
string result = await Task.Run(() => _aiService.GenerateWithReference(originalText, referenceContent, wordLimit, GetCombinedContext(), loading.UpdateProgress));
|
||||
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
@@ -643,7 +714,7 @@ namespace WordAddIn
|
||||
|
||||
// 3. AI 分析结构:识别标题及其层级
|
||||
// 这一步是关键,利用大模型理解语义来判断哪些行是标题,比正则更准确
|
||||
var headings = await Task.Run(() => _aiService.AnalyzeStructure(fullText));
|
||||
var headings = await Task.Run(() => _aiService.AnalyzeStructure(fullText, loading.UpdateProgress));
|
||||
|
||||
// 即使 headings 为空,我们也要继续处理正文缩进,所以这里不再直接 return
|
||||
if (headings == null)
|
||||
@@ -820,6 +891,16 @@ namespace WordAddIn
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 【关于】按钮点击事件处理。
|
||||
/// 显示插件版本和作者信息。
|
||||
/// </summary>
|
||||
/// <param name="control">触发事件的 Ribbon 控件</param>
|
||||
public void OnAboutClick(Office.IRibbonControl control)
|
||||
{
|
||||
MessageBox.Show("Version 0.2\n作者:黄海", "关于 AI 助手");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 【创建大纲】按钮点击事件处理。
|
||||
/// 功能描述:
|
||||
@@ -854,7 +935,7 @@ namespace WordAddIn
|
||||
{
|
||||
// 4. 异步调用 AI 服务生成大纲
|
||||
// 使用 Task.Run 将耗时操作放入后台线程,避免阻塞 Word UI 主线程
|
||||
List<OutlineItem> outline = await Task.Run(() => _aiService.GenerateOutline(topic));
|
||||
List<OutlineItem> outline = await Task.Run(() => _aiService.GenerateOutline(topic, loading.UpdateProgress));
|
||||
|
||||
if (outline == null || outline.Count == 0)
|
||||
{
|
||||
@@ -862,54 +943,106 @@ namespace WordAddIn
|
||||
return;
|
||||
}
|
||||
|
||||
outline = NormalizeOutlineLevels(outline);
|
||||
|
||||
// 5. 获取大纲样式配置
|
||||
// 从用户设置中读取 JSON 字符串并反序列化,如果为空则使用默认样式
|
||||
string styleJson = Settings.Default.OutlineStyles;
|
||||
OutlineStyleConfig styleConfig = string.IsNullOrEmpty(styleJson)
|
||||
? new OutlineStyleConfig()
|
||||
: JsonConvert.DeserializeObject<OutlineStyleConfig>(styleJson);
|
||||
OutlineStyleConfig styleConfig = null;
|
||||
try
|
||||
{
|
||||
styleConfig = string.IsNullOrEmpty(styleJson)
|
||||
? new OutlineStyleConfig()
|
||||
: JsonConvert.DeserializeObject<OutlineStyleConfig>(styleJson);
|
||||
}
|
||||
catch
|
||||
{
|
||||
styleConfig = new OutlineStyleConfig();
|
||||
}
|
||||
if (styleConfig == null) styleConfig = new OutlineStyleConfig();
|
||||
var defaultStyleConfig = new OutlineStyleConfig();
|
||||
if (styleConfig.MainTitle == null) styleConfig.MainTitle = defaultStyleConfig.MainTitle;
|
||||
if (styleConfig.Heading1 == null) styleConfig.Heading1 = defaultStyleConfig.Heading1;
|
||||
if (styleConfig.Heading2 == null) styleConfig.Heading2 = defaultStyleConfig.Heading2;
|
||||
if (styleConfig.Heading3 == null) styleConfig.Heading3 = defaultStyleConfig.Heading3;
|
||||
|
||||
var doc = AddInContext.CurrentApplication.ActiveDocument;
|
||||
var selection = AddInContext.CurrentApplication.Selection;
|
||||
Word.Range insertRange = selection.Range;
|
||||
insertRange.Collapse(Word.WdCollapseDirection.wdCollapseEnd);
|
||||
int insertStart = insertRange.Start;
|
||||
try
|
||||
{
|
||||
File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", $"{DateTime.Now} CreateOutline StylesFix Build={Assembly.GetExecutingAssembly().GetName().Version}\n");
|
||||
}
|
||||
catch { }
|
||||
|
||||
// 6. 遍历生成的大纲项,逐行插入文档
|
||||
foreach (var item in outline)
|
||||
{
|
||||
// 在当前光标位置添加新段落
|
||||
Word.Paragraph p = doc.Content.Paragraphs.Add(insertRange);
|
||||
p.Range.Text = item.Title + "\n";
|
||||
// 必须手动添加换行符,否则会替换掉段落标记导致合并
|
||||
p.Range.Text = item.Title.Trim() + "\r";
|
||||
|
||||
// 7. 根据层级应用对应的样式 (字体、大小、加粗、对齐)
|
||||
TextStyle ts = null;
|
||||
switch (item.Level)
|
||||
try
|
||||
{
|
||||
case 0: // 主标题
|
||||
ts = styleConfig.MainTitle;
|
||||
p.set_Style(Word.WdBuiltinStyle.wdStyleTitle);
|
||||
break;
|
||||
case 1: // 一级标题
|
||||
ts = styleConfig.Heading1;
|
||||
p.set_Style(Word.WdBuiltinStyle.wdStyleHeading1);
|
||||
break;
|
||||
case 2: // 二级标题
|
||||
ts = styleConfig.Heading2;
|
||||
p.set_Style(Word.WdBuiltinStyle.wdStyleHeading2);
|
||||
break;
|
||||
case 3: // 三级标题
|
||||
ts = styleConfig.Heading3;
|
||||
p.set_Style(Word.WdBuiltinStyle.wdStyleHeading3);
|
||||
break;
|
||||
default:
|
||||
ts = styleConfig.Heading3;
|
||||
break;
|
||||
File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", $"{DateTime.Now} Processing Item: {item.Title}, Level: {item.Level}\n");
|
||||
|
||||
switch (item.Level)
|
||||
{
|
||||
case 0: // 主标题
|
||||
ts = styleConfig.MainTitle;
|
||||
p.set_Style(Word.WdBuiltinStyle.wdStyleTitle);
|
||||
p.Format.OutlineLevel = Word.WdOutlineLevel.wdOutlineLevelBodyText;
|
||||
p.Range.ParagraphFormat.OutlineLevel = Word.WdOutlineLevel.wdOutlineLevelBodyText;
|
||||
break;
|
||||
case 1: // 一级标题
|
||||
ts = styleConfig.Heading1;
|
||||
p.set_Style(Word.WdBuiltinStyle.wdStyleHeading1);
|
||||
p.Format.OutlineLevel = Word.WdOutlineLevel.wdOutlineLevel1;
|
||||
p.Range.ParagraphFormat.OutlineLevel = Word.WdOutlineLevel.wdOutlineLevel1;
|
||||
break;
|
||||
case 2: // 二级标题
|
||||
ts = styleConfig.Heading2;
|
||||
p.set_Style(Word.WdBuiltinStyle.wdStyleHeading2);
|
||||
p.Format.OutlineLevel = Word.WdOutlineLevel.wdOutlineLevel2;
|
||||
p.Range.ParagraphFormat.OutlineLevel = Word.WdOutlineLevel.wdOutlineLevel2;
|
||||
break;
|
||||
case 3: // 三级标题
|
||||
ts = styleConfig.Heading3;
|
||||
p.set_Style(Word.WdBuiltinStyle.wdStyleHeading3);
|
||||
p.Format.OutlineLevel = Word.WdOutlineLevel.wdOutlineLevel3;
|
||||
p.Range.ParagraphFormat.OutlineLevel = Word.WdOutlineLevel.wdOutlineLevel3;
|
||||
break;
|
||||
default:
|
||||
ts = styleConfig.Heading3;
|
||||
// 默认也应用三级标题样式,确保出现在大纲中
|
||||
p.set_Style(Word.WdBuiltinStyle.wdStyleHeading3);
|
||||
p.Format.OutlineLevel = Word.WdOutlineLevel.wdOutlineLevel3;
|
||||
p.Range.ParagraphFormat.OutlineLevel = Word.WdOutlineLevel.wdOutlineLevel3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", $"{DateTime.Now} Error setting style: {ex.Message}\n");
|
||||
// Fallback: try setting style by name if object fails
|
||||
try
|
||||
{
|
||||
if (item.Level == 0) p.set_Style("标题");
|
||||
else p.set_Style("标题 " + item.Level);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
// 应用自定义样式属性
|
||||
if (ts != null)
|
||||
{
|
||||
p.Range.Font.Name = ts.FontName;
|
||||
try { p.Range.Font.NameFarEast = ts.FontName; } catch { }
|
||||
p.Range.Font.Size = ts.FontSize;
|
||||
p.Range.Font.Bold = ts.IsBold ? 1 : 0;
|
||||
p.Range.Font.Color = Word.WdColor.wdColorBlack; // 强制设为黑色,避免出现默认蓝色的情况
|
||||
@@ -924,6 +1057,16 @@ namespace WordAddIn
|
||||
insertRange = p.Range;
|
||||
insertRange.Collapse(Word.WdCollapseDirection.wdCollapseEnd);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
int insertEnd = insertRange.End;
|
||||
ApplyHeadingStylesToInsertedRange(doc, insertStart, insertEnd, styleConfig);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
try { File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", $"{DateTime.Now} CreateOutline PostFix Error: {ex.Message}\n"); } catch { }
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -938,6 +1081,151 @@ namespace WordAddIn
|
||||
}
|
||||
}
|
||||
|
||||
private static List<OutlineItem> NormalizeOutlineLevels(List<OutlineItem> outline)
|
||||
{
|
||||
if (outline == null || outline.Count == 0) return outline;
|
||||
|
||||
var normalized = outline
|
||||
.Where(o => o != null && !string.IsNullOrWhiteSpace(o.Title))
|
||||
.Select(o => new OutlineItem { Title = o.Title, Level = o.Level })
|
||||
.ToList();
|
||||
|
||||
if (normalized.Count == 0) return normalized;
|
||||
|
||||
int minLevel = normalized.Min(i => i.Level);
|
||||
if (minLevel > 0)
|
||||
{
|
||||
for (int i = 0; i < normalized.Count; i++)
|
||||
{
|
||||
normalized[i].Level = normalized[i].Level - minLevel;
|
||||
}
|
||||
}
|
||||
|
||||
if (LooksLikeChapterTitle(normalized[0].Title) && normalized[0].Level == 0)
|
||||
{
|
||||
for (int i = 0; i < normalized.Count; i++)
|
||||
{
|
||||
normalized[i].Level = normalized[i].Level + 1;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < normalized.Count; i++)
|
||||
{
|
||||
if (normalized[i].Level < 0) normalized[i].Level = 0;
|
||||
if (normalized[i].Level > 3) normalized[i].Level = 3;
|
||||
}
|
||||
|
||||
return normalized;
|
||||
}
|
||||
|
||||
private static bool LooksLikeChapterTitle(string title)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(title)) return false;
|
||||
var t = title.Trim();
|
||||
if (Regex.IsMatch(t, @"^第[一二三四五六七八九十0-9]+章")) return true;
|
||||
if (Regex.IsMatch(t, @"^\d+(\.\d+)*\s")) return true;
|
||||
if (Regex.IsMatch(t, @"^[一二三四五六七八九十]+、")) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private static void ApplyHeadingStylesToInsertedRange(Word.Document doc, int start, int end, OutlineStyleConfig styleConfig)
|
||||
{
|
||||
if (doc == null) return;
|
||||
if (end <= start) return;
|
||||
if (styleConfig == null) styleConfig = new OutlineStyleConfig();
|
||||
|
||||
var range = doc.Range(start, end);
|
||||
bool firstNonEmptyHandled = false;
|
||||
|
||||
foreach (Word.Paragraph p in range.Paragraphs)
|
||||
{
|
||||
string raw = p.Range.Text ?? "";
|
||||
string text = raw.Replace("\r", "").Replace("\a", "").Trim();
|
||||
if (string.IsNullOrWhiteSpace(text)) continue;
|
||||
|
||||
int level;
|
||||
if (!firstNonEmptyHandled && !LooksLikeChapterTitle(text))
|
||||
{
|
||||
level = 0;
|
||||
firstNonEmptyHandled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
firstNonEmptyHandled = true;
|
||||
level = GuessHeadingLevel(text);
|
||||
}
|
||||
|
||||
ApplyParagraphStyle(p, level, styleConfig);
|
||||
}
|
||||
}
|
||||
|
||||
private static int GuessHeadingLevel(string text)
|
||||
{
|
||||
var t = (text ?? "").Trim();
|
||||
if (string.IsNullOrWhiteSpace(t)) return 1;
|
||||
|
||||
if (Regex.IsMatch(t, @"^第[一二三四五六七八九十0-9]+章")) return 1;
|
||||
if (Regex.IsMatch(t, @"^(附录|结语|结论|参考文献|致谢)\b")) return 1;
|
||||
if (Regex.IsMatch(t, @"^\d+\.\d+\.\d+")) return 3;
|
||||
if (Regex.IsMatch(t, @"^\d+\.\d+")) return 2;
|
||||
if (Regex.IsMatch(t, @"^\d+\s")) return 1;
|
||||
if (Regex.IsMatch(t, @"^[一二三四五六七八九十]+、")) return 2;
|
||||
return 1;
|
||||
}
|
||||
|
||||
private static void ApplyParagraphStyle(Word.Paragraph p, int level, OutlineStyleConfig styleConfig)
|
||||
{
|
||||
if (p == null) return;
|
||||
if (styleConfig == null) styleConfig = new OutlineStyleConfig();
|
||||
|
||||
if (level < 0) level = 0;
|
||||
if (level > 3) level = 3;
|
||||
|
||||
TextStyle ts;
|
||||
Word.WdOutlineLevel outlineLevel;
|
||||
|
||||
switch (level)
|
||||
{
|
||||
case 0:
|
||||
ts = styleConfig.MainTitle;
|
||||
p.set_Style(Word.WdBuiltinStyle.wdStyleTitle);
|
||||
outlineLevel = Word.WdOutlineLevel.wdOutlineLevel1;
|
||||
break;
|
||||
case 1:
|
||||
ts = styleConfig.Heading1;
|
||||
p.set_Style(Word.WdBuiltinStyle.wdStyleHeading1);
|
||||
outlineLevel = Word.WdOutlineLevel.wdOutlineLevel1;
|
||||
break;
|
||||
case 2:
|
||||
ts = styleConfig.Heading2;
|
||||
p.set_Style(Word.WdBuiltinStyle.wdStyleHeading2);
|
||||
outlineLevel = Word.WdOutlineLevel.wdOutlineLevel2;
|
||||
break;
|
||||
default:
|
||||
ts = styleConfig.Heading3;
|
||||
p.set_Style(Word.WdBuiltinStyle.wdStyleHeading3);
|
||||
outlineLevel = Word.WdOutlineLevel.wdOutlineLevel3;
|
||||
break;
|
||||
}
|
||||
|
||||
try { p.Format.OutlineLevel = outlineLevel; } catch { }
|
||||
try { p.Range.ParagraphFormat.OutlineLevel = outlineLevel; } catch { }
|
||||
|
||||
if (ts != null)
|
||||
{
|
||||
try { p.Range.Font.Name = ts.FontName; } catch { }
|
||||
try { p.Range.Font.NameFarEast = ts.FontName; } catch { }
|
||||
try { p.Range.Font.Size = ts.FontSize; } catch { }
|
||||
try { p.Range.Font.Bold = ts.IsBold ? 1 : 0; } catch { }
|
||||
try { p.Range.Font.Color = Word.WdColor.wdColorBlack; } catch { }
|
||||
|
||||
if (level == 0)
|
||||
{
|
||||
try { p.Format.Alignment = (Word.WdParagraphAlignment)ts.Alignment; } catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 【大纲配置】按钮点击事件处理。
|
||||
/// 打开大纲样式配置窗口,允许用户自定义各级标题的字体、字号等。
|
||||
@@ -1035,4 +1323,4 @@ namespace WordAddIn
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
|
||||
<ribbon>
|
||||
<tabs>
|
||||
@@ -15,6 +14,11 @@
|
||||
<button id="btnFormat" label="格式美化" imageMso="FontColorCycle" size="large" onAction="OnFormatClick" />
|
||||
<button id="btnImage" label="生成配图" size="large" onAction="OnImageClick" imageMso="PictureInsertFromFile" />
|
||||
</group>
|
||||
<group id="groupConfig" label="设置">
|
||||
<labelControl id="lblCurrentModel" getLabel="GetCurrentModelLabel" />
|
||||
<dropDown id="ddlModelSelect" label="模型选择" sizeString="WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" onAction="OnModelSelection" getItemCount="GetModelCount" getItemLabel="GetModelLabel" getSelectedItemIndex="GetSelectedModelIndex" imageMso="ServerConnection" />
|
||||
<button id="btnAbout" label="关于" size="large" onAction="OnAboutClick" imageMso="Info" />
|
||||
</group>
|
||||
</tab>
|
||||
</tabs>
|
||||
</ribbon>
|
||||
|
||||
@@ -21,13 +21,10 @@ namespace WordAddIn
|
||||
/// </summary>
|
||||
public class AiService
|
||||
{
|
||||
// 兔子平台配置 (兼容 OpenAI 接口格式)
|
||||
private const string ApiKey = "sk-FCwlaMANKdSlXlY7HkzZncSp0N5gecfpQdk0iR059Hfk4dQ1";
|
||||
private const string BaseUrl = "https://api.tu-zi.com/v1";
|
||||
|
||||
// 模型配置
|
||||
private const string TextModel = "gemini-3-flash-preview"; // 默认文本模型,速度快,成本低
|
||||
private const string ImageModel = "gemini-3-pro-image-preview"; // 默认生图模型,支持高质量绘图
|
||||
// TextModel 由 Settings.Default.SelectedModel 动态决定
|
||||
// ImageModel 目前使用默认的 Gemini 绘图模型,后续可扩展为可配置
|
||||
private const string ImageModel = "gemini-3-pro-image-preview";
|
||||
|
||||
private static readonly HttpClient _httpClient;
|
||||
|
||||
@@ -38,7 +35,7 @@ namespace WordAddIn
|
||||
|
||||
_httpClient = new HttpClient();
|
||||
_httpClient.Timeout = TimeSpan.FromSeconds(120); // 设置 120 秒超时,防止生图或长文本生成时连接断开
|
||||
_httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {ApiKey}");
|
||||
// _httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {Config.TuZiApiKey}"); // Moved to per-request
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +45,7 @@ namespace WordAddIn
|
||||
/// <param name="originalText">原文</param>
|
||||
/// <param name="documentContext">文档全文上下文</param>
|
||||
/// <returns>润色后的文本</returns>
|
||||
public async Task<string> PolishText(string originalText, string documentContext = null)
|
||||
public async Task<string> PolishText(string originalText, string documentContext = null, Action<string> onProgress = null)
|
||||
{
|
||||
string systemPrompt = "你是一个专业的文字编辑和润色专家。请对用户提供的文本进行深度润色和梳理。目标是:1. 提升语言的流畅度和专业性;2. 修正语法错误和用词不当;3. 优化逻辑结构,使表达更清晰;4. 保持原意不变。请直接输出润色后的内容,不要包含任何解释或客套话。请直接输出纯文本,不要使用任何Markdown标记。";
|
||||
|
||||
@@ -63,7 +60,7 @@ namespace WordAddIn
|
||||
new Message { role = "user", content = $"请润色以下内容:\n\n{originalText}" }
|
||||
};
|
||||
|
||||
return await GetChatCompletion(messages);
|
||||
return await GetChatCompletion(messages, onProgress);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -72,7 +69,7 @@ namespace WordAddIn
|
||||
/// <param name="originalText">原文</param>
|
||||
/// <param name="documentContext">文档全文上下文</param>
|
||||
/// <returns>升华后的文本</returns>
|
||||
public async Task<string> ElevateText(string originalText, string documentContext = null)
|
||||
public async Task<string> ElevateText(string originalText, string documentContext = null, Action<string> onProgress = null)
|
||||
{
|
||||
string systemPrompt = "你是一个资深的领域专家和思想家。用户提供了一段文本,请你根据自己的广博知识和深刻理解,对其进行深度升华。目标是:1. 挖掘深度:透过现象看本质,补充更有见地的分析;2. 拓展广度:引入相关的行业背景、前沿趋势或跨学科视角;3. 提升价值:将普通的描述提升为具有指导意义或启发性的洞见;4. 高于原文:不要局限于原文的字面意思,要大胆进行思想层面的拔高。请直接输出升华后的纯文本内容,保持逻辑连贯,不要使用任何Markdown标记。";
|
||||
|
||||
@@ -87,7 +84,7 @@ namespace WordAddIn
|
||||
new Message { role = "user", content = $"请对以下内容进行深度升华和价值提升:\n\n{originalText}" }
|
||||
};
|
||||
|
||||
return await GetChatCompletion(messages);
|
||||
return await GetChatCompletion(messages, onProgress);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -98,7 +95,7 @@ namespace WordAddIn
|
||||
/// <param name="wordLimit">字数限制</param>
|
||||
/// <param name="documentContext">文档全文上下文</param>
|
||||
/// <returns>生成的内容</returns>
|
||||
public async Task<string> GenerateWithReference(string originalText, string referenceContent, int wordLimit, string documentContext = null)
|
||||
public async Task<string> GenerateWithReference(string originalText, string referenceContent, int wordLimit, string documentContext = null, Action<string> onProgress = null)
|
||||
{
|
||||
string systemPrompt = "你是一个专业的文档写作助手。请根据提供的参考资料,撰写或重写目标文本。请直接输出纯文本内容,不要使用任何Markdown标记。";
|
||||
|
||||
@@ -135,7 +132,7 @@ namespace WordAddIn
|
||||
new Message { role = "user", content = userPrompt.ToString() }
|
||||
};
|
||||
|
||||
return await GetChatCompletion(messages);
|
||||
return await GetChatCompletion(messages, onProgress);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -143,7 +140,7 @@ namespace WordAddIn
|
||||
/// </summary>
|
||||
/// <param name="originalText">原文</param>
|
||||
/// <returns>大纲文本</returns>
|
||||
public async Task<string> SummarizeToOutline(string originalText)
|
||||
public async Task<string> SummarizeToOutline(string originalText, Action<string> onProgress = null)
|
||||
{
|
||||
string systemPrompt = "你是一个专业的文档总结助手。请将用户提供的长文本总结为一个层级分明的大纲。要求:1. 结构清晰,使用缩进或序号表示层级;2. 语言精练,概括重点;3. 适合用于制作PPT或架构图。请直接输出大纲文本,不要包含Markdown代码块标记。";
|
||||
|
||||
@@ -153,31 +150,33 @@ namespace WordAddIn
|
||||
new Message { role = "user", content = $"请将以下内容总结为大纲:\n\n{originalText}" }
|
||||
};
|
||||
|
||||
return await GetChatCompletion(messages);
|
||||
return await GetChatCompletion(messages, onProgress);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成大纲:根据主题生成结构化的 JSON 大纲。
|
||||
/// 功能描述:
|
||||
/// 1. 构造 Prompt,要求 AI 返回特定格式的 JSON 数组 (OutlineItem)。
|
||||
/// 1. 构造 Prompt,要求 AI 返回 Markdown 格式的大纲。
|
||||
/// 2. 调用 AI 接口。
|
||||
/// 3. 清理 AI 可能返回的 Markdown 代码块标记 (```json ... ```)。
|
||||
/// 4. 反序列化 JSON 为对象列表。
|
||||
/// 3. 解析 Markdown 为对象列表。
|
||||
/// </summary>
|
||||
/// <param name="topic">大纲主题或简要描述</param>
|
||||
/// <returns>大纲项列表 (包含标题和层级)</returns>
|
||||
public async Task<List<OutlineItem>> GenerateOutline(string topic)
|
||||
public async Task<List<OutlineItem>> GenerateOutline(string topic, Action<string> onProgress = null)
|
||||
{
|
||||
string systemPrompt = @"你是一个专业的文档大纲生成助手。请根据用户提供的主题或描述,生成一个结构化的文档大纲。
|
||||
要求包含:
|
||||
1. 主标题 (Level 0)
|
||||
2. 一级目录 (Level 1)
|
||||
3. 二级目录 (Level 2)
|
||||
4. 三级目录 (Level 3)
|
||||
请直接输出 Markdown 格式的大纲,不要包含任何前言、后语或 Markdown 代码块标记(如 ```markdown)。
|
||||
格式要求:
|
||||
- 主标题使用 # (一级标题)
|
||||
- 一级目录使用 ## (二级标题)
|
||||
- 二级目录使用 ### (三级标题)
|
||||
- 三级目录使用 #### (四级标题)
|
||||
|
||||
请只返回一个JSON数组,数组中的每个元素包含 'Title' (标题文本) 和 'Level' (整数层级,0-3)。
|
||||
例如:[{""Title"": ""关于人工智能的发展报告"", ""Level"": 0}, {""Title"": ""第一章 绪论"", ""Level"": 1}, {""Title"": ""1.1 研究背景"", ""Level"": 2}]
|
||||
请确保返回的是合法的JSON格式,不包含Markdown标记。";
|
||||
例如:
|
||||
# 关于人工智能的发展报告
|
||||
## 第一章 绪论
|
||||
### 1.1 研究背景
|
||||
";
|
||||
|
||||
var messages = new List<Message>
|
||||
{
|
||||
@@ -185,23 +184,62 @@ namespace WordAddIn
|
||||
new Message { role = "user", content = topic }
|
||||
};
|
||||
|
||||
string jsonResponse = await GetChatCompletion(messages);
|
||||
string markdownResponse = await GetChatCompletion(messages, onProgress);
|
||||
|
||||
// 清理可能存在的 Markdown 代码块标记
|
||||
// 某些模型即使被要求不返回 Markdown,仍可能习惯性地加上 ```json
|
||||
jsonResponse = jsonResponse.Replace("```json", "").Replace("```", "").Trim();
|
||||
// 记录原始响应以便调试
|
||||
try { System.IO.File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", $"{DateTime.Now} GenerateOutline Markdown Raw: {markdownResponse}\n"); } catch { }
|
||||
|
||||
// 清理可能存在的 Markdown 代码块标记
|
||||
markdownResponse = markdownResponse.Replace("```markdown", "").Replace("```", "").Trim();
|
||||
|
||||
var result = new List<OutlineItem>();
|
||||
try
|
||||
{
|
||||
return JsonConvert.DeserializeObject<List<OutlineItem>>(jsonResponse);
|
||||
var lines = markdownResponse.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach (var line in lines)
|
||||
{
|
||||
var trimmed = line.Trim();
|
||||
if (string.IsNullOrWhiteSpace(trimmed)) continue;
|
||||
|
||||
int level = -1;
|
||||
string title = trimmed;
|
||||
|
||||
// 解析 Markdown 标题层级
|
||||
if (trimmed.StartsWith("####"))
|
||||
{
|
||||
level = 3;
|
||||
title = trimmed.Substring(4).Trim();
|
||||
}
|
||||
else if (trimmed.StartsWith("###"))
|
||||
{
|
||||
level = 2;
|
||||
title = trimmed.Substring(3).Trim();
|
||||
}
|
||||
else if (trimmed.StartsWith("##"))
|
||||
{
|
||||
level = 1;
|
||||
title = trimmed.Substring(2).Trim();
|
||||
}
|
||||
else if (trimmed.StartsWith("#"))
|
||||
{
|
||||
level = 0;
|
||||
title = trimmed.Substring(1).Trim();
|
||||
}
|
||||
|
||||
// 如果识别到有效标题,则加入列表
|
||||
if (level >= 0)
|
||||
{
|
||||
result.Add(new OutlineItem { Title = title, Level = level });
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("JSON Parsing Failed: " + ex.Message);
|
||||
// 这里可以考虑返回一个空列表,或者抛出异常让上层处理
|
||||
// 目前选择返回空列表,由 UI 层提示失败
|
||||
return new List<OutlineItem>();
|
||||
try { System.IO.File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", $"{DateTime.Now} Markdown Parse Error: {ex.Message}\n"); } catch { }
|
||||
Console.WriteLine("Markdown Parsing Failed: " + ex.Message);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -213,7 +251,7 @@ namespace WordAddIn
|
||||
/// </summary>
|
||||
/// <param name="text">文档全文内容 (或截断后的部分内容)</param>
|
||||
/// <returns>标题信息列表 (包含标题文本和层级)</returns>
|
||||
public async Task<List<HeadingInfo>> AnalyzeStructure(string text)
|
||||
public async Task<List<HeadingInfo>> AnalyzeStructure(string text, Action<string> onProgress = null)
|
||||
{
|
||||
string systemPrompt = @"你是一个文档格式专家。请分析用户提供的文档内容,识别出所有的标题及其对应的层级(1级、2级、3级...)。
|
||||
请只返回一个JSON数组,数组中的每个元素包含 'text' (标题所在行的完整纯文本内容,包含序号) 和 'level' (整数层级)。
|
||||
@@ -227,7 +265,7 @@ namespace WordAddIn
|
||||
new Message { role = "user", content = text }
|
||||
};
|
||||
|
||||
string jsonResponse = await GetChatCompletion(messages);
|
||||
string jsonResponse = await GetChatCompletion(messages, onProgress);
|
||||
|
||||
// 清理可能存在的 Markdown 代码块标记
|
||||
jsonResponse = jsonResponse.Replace("```json", "").Replace("```", "").Trim();
|
||||
@@ -254,7 +292,7 @@ namespace WordAddIn
|
||||
/// </summary>
|
||||
/// <param name="fullText">全文内容</param>
|
||||
/// <returns>文档画像描述</returns>
|
||||
public async Task<string> AnalyzeDocument(string fullText)
|
||||
public async Task<string> AnalyzeDocument(string fullText, Action<string> onProgress = null)
|
||||
{
|
||||
var messages = new List<Message>
|
||||
{
|
||||
@@ -262,13 +300,13 @@ namespace WordAddIn
|
||||
new Message { role = "user", content = $"请分析以下文档全文:\n\n{fullText}" }
|
||||
};
|
||||
|
||||
return await GetChatCompletion(messages);
|
||||
return await GetChatCompletion(messages, onProgress);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 格式化文本(保留接口,目前逻辑主要在 AnalyzeStructure 中实现)。
|
||||
/// </summary>
|
||||
public async Task<string> FormatText(string originalText)
|
||||
public async Task<string> FormatText(string originalText, Action<string> onProgress = null)
|
||||
{
|
||||
var messages = new List<Message>
|
||||
{
|
||||
@@ -276,7 +314,7 @@ namespace WordAddIn
|
||||
new Message { role = "user", content = $"请对以下文本进行格式化和润色:修正错别字、规范标点符号、优化分段,使其看起来更专业:\n\n{originalText}" }
|
||||
};
|
||||
|
||||
return await GetChatCompletion(messages);
|
||||
return await GetChatCompletion(messages, onProgress);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -313,7 +351,7 @@ namespace WordAddIn
|
||||
var json = JsonConvert.SerializeObject(requestBody);
|
||||
var content = new StringContent(json, Encoding.UTF8, "application/json");
|
||||
|
||||
var response = await _httpClient.PostAsync($"{BaseUrl}/images/generations", content);
|
||||
var response = await _httpClient.PostAsync($"{Config.TuZiBaseUrl}/images/generations", content);
|
||||
var responseString = await response.Content.ReadAsStringAsync();
|
||||
|
||||
if (!response.IsSuccessStatusCode)
|
||||
@@ -387,29 +425,204 @@ namespace WordAddIn
|
||||
/// <summary>
|
||||
/// 通用聊天补全请求方法。
|
||||
/// </summary>
|
||||
private async Task<string> GetChatCompletion(List<Message> messages)
|
||||
private async Task<string> GetChatCompletion(List<Message> messages, Action<string> onProgress = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var requestBody = new ChatCompletionRequest
|
||||
// 获取当前选择的模型
|
||||
string selectedModelId = Properties.Settings.Default.SelectedModel;
|
||||
// 如果未设置,默认使用第一个 (qwen-plus)
|
||||
if (string.IsNullOrEmpty(selectedModelId)) selectedModelId = "qwen-plus";
|
||||
|
||||
var modelInfo = ModelConfig.GetModel(selectedModelId);
|
||||
|
||||
string apiKey = "";
|
||||
string requestUrl = "";
|
||||
string jsonContent = "";
|
||||
|
||||
// 根据模型类型配置请求
|
||||
if (modelInfo.ApiType == "Native") // DashScope Native (e.g., qwen-plus)
|
||||
{
|
||||
messages = messages,
|
||||
model = TextModel
|
||||
};
|
||||
|
||||
var json = JsonConvert.SerializeObject(requestBody);
|
||||
var content = new StringContent(json, Encoding.UTF8, "application/json");
|
||||
|
||||
var response = await _httpClient.PostAsync($"{BaseUrl}/chat/completions", content);
|
||||
var responseString = await response.Content.ReadAsStringAsync();
|
||||
|
||||
if (!response.IsSuccessStatusCode)
|
||||
apiKey = Config.DashScopeApiKey;
|
||||
requestUrl = Config.DashScopeNativeUrl;
|
||||
|
||||
// 构造 DashScope Native 格式请求体
|
||||
var requestBody = new
|
||||
{
|
||||
model = modelInfo.Id,
|
||||
input = new
|
||||
{
|
||||
messages = messages
|
||||
},
|
||||
parameters = new
|
||||
{
|
||||
result_format = "message",
|
||||
incremental_output = (onProgress != null) // 如果有进度回调,则开启增量输出
|
||||
}
|
||||
};
|
||||
jsonContent = JsonConvert.SerializeObject(requestBody);
|
||||
}
|
||||
else // Compatible (TuZi, DeepSeek, etc.)
|
||||
{
|
||||
throw new Exception($"API Error ({response.StatusCode}): {responseString}");
|
||||
apiKey = Config.TuZiApiKey;
|
||||
requestUrl = $"{Config.TuZiBaseUrl}/chat/completions";
|
||||
|
||||
// 构造 OpenAI 兼容格式请求体
|
||||
var requestDict = new Dictionary<string, object>
|
||||
{
|
||||
{ "model", modelInfo.Id },
|
||||
{ "messages", messages },
|
||||
{ "temperature", 0.7 }
|
||||
};
|
||||
|
||||
if (onProgress != null)
|
||||
{
|
||||
requestDict["stream"] = true;
|
||||
}
|
||||
|
||||
// 针对 glm-4.7 开启思考模式
|
||||
if (modelInfo.Id == "glm-4.7")
|
||||
{
|
||||
requestDict["enable_thinking"] = true;
|
||||
}
|
||||
|
||||
jsonContent = JsonConvert.SerializeObject(requestDict);
|
||||
}
|
||||
|
||||
var result = JsonConvert.DeserializeObject<ChatCompletionResponse>(responseString);
|
||||
return result?.choices?.FirstOrDefault()?.message?.content;
|
||||
var content = new StringContent(jsonContent, Encoding.UTF8, "application/json");
|
||||
|
||||
// 创建新的 HttpRequestMessage 以设置特定的 Authorization Header
|
||||
using (var request = new HttpRequestMessage(HttpMethod.Post, requestUrl))
|
||||
{
|
||||
request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", apiKey);
|
||||
request.Content = content;
|
||||
|
||||
// 如果是流式请求,使用 ResponseHeadersRead
|
||||
var completionOption = onProgress != null ? HttpCompletionOption.ResponseHeadersRead : HttpCompletionOption.ResponseContentRead;
|
||||
|
||||
using (var response = await _httpClient.SendAsync(request, completionOption))
|
||||
{
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
var errorString = await response.Content.ReadAsStringAsync();
|
||||
throw new Exception($"API Error ({response.StatusCode}): {errorString}");
|
||||
}
|
||||
|
||||
if (onProgress != null)
|
||||
{
|
||||
// 处理流式响应
|
||||
using (var stream = await response.Content.ReadAsStreamAsync())
|
||||
using (var reader = new System.IO.StreamReader(stream))
|
||||
{
|
||||
string line;
|
||||
StringBuilder fullContent = new StringBuilder();
|
||||
int lineCount = 0;
|
||||
|
||||
while ((line = await reader.ReadLineAsync()) != null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(line)) continue;
|
||||
|
||||
// Debug logging: Log first 5 lines
|
||||
if (lineCount < 5)
|
||||
{
|
||||
try { System.IO.File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", $"{DateTime.Now} Stream Line {lineCount}: {line}\n"); } catch { }
|
||||
lineCount++;
|
||||
}
|
||||
|
||||
string dataStr = null;
|
||||
if (line.StartsWith("data:"))
|
||||
{
|
||||
dataStr = line.Substring(5).Trim();
|
||||
}
|
||||
else if (line.Trim().StartsWith("{") && line.Trim().EndsWith("}"))
|
||||
{
|
||||
// Fallback: If not SSE but standard JSON (maybe incremental_output ignored)
|
||||
dataStr = line.Trim();
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(dataStr))
|
||||
{
|
||||
if (dataStr == "[DONE]") break;
|
||||
|
||||
try
|
||||
{
|
||||
var json = JObject.Parse(dataStr);
|
||||
string contentDelta = "";
|
||||
|
||||
if (modelInfo.ApiType == "Native")
|
||||
{
|
||||
// Check for DashScope API Error in stream
|
||||
if (json["code"] != null)
|
||||
{
|
||||
string errorCode = json["code"].ToString();
|
||||
string errorMsg = json["message"]?.ToString() ?? "Unknown error";
|
||||
try { System.IO.File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", $"{DateTime.Now} DashScope Stream Error: {errorCode} - {errorMsg}\n"); } catch { }
|
||||
throw new Exception($"DashScope Error: {errorCode} - {errorMsg}");
|
||||
}
|
||||
|
||||
// DashScope Native incremental output
|
||||
// Priority 1: output.choices[0].message.content (Standard for result_format='message')
|
||||
if (json["output"]?["choices"]?[0]?["message"]?["content"] != null)
|
||||
{
|
||||
contentDelta = json["output"]["choices"][0]["message"]["content"].ToString();
|
||||
}
|
||||
// Priority 2: output.text (Standard for result_format='text' or older models)
|
||||
else if (json["output"]?["text"] != null)
|
||||
{
|
||||
contentDelta = json["output"]["text"].ToString();
|
||||
}
|
||||
// Priority 3: output.choices[0].delta.content (OpenAI compatible style)
|
||||
else if (json["output"]?["choices"]?[0]?["delta"]?["content"] != null)
|
||||
{
|
||||
contentDelta = json["output"]["choices"][0]["delta"]["content"].ToString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// OpenAI Compatible
|
||||
contentDelta = json["choices"]?[0]?["delta"]?["content"]?.ToString();
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(contentDelta))
|
||||
{
|
||||
onProgress(contentDelta);
|
||||
fullContent.Append(contentDelta);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Ignore parse errors
|
||||
}
|
||||
}
|
||||
}
|
||||
return fullContent.ToString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 非流式处理
|
||||
var responseString = await response.Content.ReadAsStringAsync();
|
||||
|
||||
if (modelInfo.ApiType == "Native")
|
||||
{
|
||||
// 解析 DashScope Native 响应
|
||||
var json = JObject.Parse(responseString);
|
||||
var contentText = json["output"]?["text"]?.ToString();
|
||||
if (contentText == null)
|
||||
{
|
||||
contentText = json["output"]?["choices"]?[0]?["message"]?["content"]?.ToString();
|
||||
}
|
||||
return contentText ?? responseString;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 解析 OpenAI 兼容响应
|
||||
var result = JsonConvert.DeserializeObject<ChatCompletionResponse>(responseString);
|
||||
return result?.choices?.FirstOrDefault()?.message?.content;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -84,8 +84,8 @@ namespace WordAddIn
|
||||
//
|
||||
// CreateOutlineForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
// this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(500, 370);
|
||||
this.MinimumSize = new System.Drawing.Size(400, 300);
|
||||
|
||||
@@ -50,6 +50,11 @@ namespace WordAddIn
|
||||
{
|
||||
InitializeTemplates();
|
||||
InitializeComponent();
|
||||
|
||||
foreach (var key in _styleTemplates.Keys)
|
||||
{
|
||||
this.cmbStyles.Items.Add(key);
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeTemplates()
|
||||
@@ -92,7 +97,7 @@ namespace WordAddIn
|
||||
this.Size = new Size(500, 520);
|
||||
this.MinimumSize = new Size(400, 400); // 设置最小尺寸
|
||||
this.StartPosition = FormStartPosition.CenterParent;
|
||||
this.AutoScaleMode = AutoScaleMode.Font; // 支持 DPI 缩放
|
||||
this.AutoScaleMode = AutoScaleMode.Dpi; // 支持 DPI 缩放
|
||||
this.FormBorderStyle = FormBorderStyle.Sizable; // 允许调整大小
|
||||
this.MaximizeBox = true; // 允许最大化
|
||||
this.MinimizeBox = true;
|
||||
@@ -117,10 +122,6 @@ namespace WordAddIn
|
||||
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);
|
||||
}
|
||||
this.cmbStyles.SelectedIndexChanged += CmbStyles_SelectedIndexChanged;
|
||||
|
||||
// lblPrompt
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace WordAddIn
|
||||
public class LoadingForm : Form
|
||||
{
|
||||
private System.Windows.Forms.Label lblMessage;
|
||||
private System.Windows.Forms.RichTextBox txtProgress;
|
||||
private System.Windows.Forms.Timer animationTimer;
|
||||
private System.ComponentModel.IContainer components;
|
||||
private int _spinnerAngle = 0;
|
||||
@@ -46,6 +47,7 @@ namespace WordAddIn
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.lblMessage = new System.Windows.Forms.Label();
|
||||
this.txtProgress = new System.Windows.Forms.RichTextBox();
|
||||
this.animationTimer = new System.Windows.Forms.Timer(this.components);
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -55,13 +57,27 @@ namespace WordAddIn
|
||||
this.lblMessage.Dock = System.Windows.Forms.DockStyle.None;
|
||||
this.lblMessage.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblMessage.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.lblMessage.Location = new System.Drawing.Point(0, 160);
|
||||
this.lblMessage.Location = new System.Drawing.Point(0, 150);
|
||||
this.lblMessage.Name = "lblMessage";
|
||||
this.lblMessage.Size = new System.Drawing.Size(500, 40);
|
||||
this.lblMessage.Size = new System.Drawing.Size(500, 30);
|
||||
this.lblMessage.TabIndex = 0;
|
||||
this.lblMessage.Text = "AI 正在思考中...";
|
||||
this.lblMessage.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// txtProgress
|
||||
//
|
||||
this.txtProgress.BackColor = System.Drawing.Color.White;
|
||||
this.txtProgress.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.txtProgress.Font = new System.Drawing.Font("Microsoft YaHei UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtProgress.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.txtProgress.Location = new System.Drawing.Point(40, 190);
|
||||
this.txtProgress.Name = "txtProgress";
|
||||
this.txtProgress.ReadOnly = true;
|
||||
this.txtProgress.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
|
||||
this.txtProgress.Size = new System.Drawing.Size(420, 190);
|
||||
this.txtProgress.TabIndex = 1;
|
||||
this.txtProgress.Text = "";
|
||||
//
|
||||
// animationTimer
|
||||
//
|
||||
this.animationTimer.Enabled = true;
|
||||
@@ -70,10 +86,11 @@ namespace WordAddIn
|
||||
//
|
||||
// LoadingForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
// this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.ClientSize = new System.Drawing.Size(500, 250);
|
||||
this.ClientSize = new System.Drawing.Size(500, 400);
|
||||
this.Controls.Add(this.txtProgress);
|
||||
this.Controls.Add(this.lblMessage);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "LoadingForm";
|
||||
@@ -151,6 +168,20 @@ namespace WordAddIn
|
||||
/// 线程安全的关闭方法。
|
||||
/// 允许从非 UI 线程调用。
|
||||
/// </summary>
|
||||
public void UpdateProgress(string content)
|
||||
{
|
||||
if (this.IsDisposed) return;
|
||||
if (this.InvokeRequired)
|
||||
{
|
||||
this.Invoke(new Action<string>(UpdateProgress), content);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtProgress.AppendText(content);
|
||||
this.txtProgress.ScrollToCaret();
|
||||
}
|
||||
}
|
||||
|
||||
public void CloseSafe()
|
||||
{
|
||||
if (this.IsDisposed) return;
|
||||
|
||||
@@ -122,8 +122,8 @@ namespace WordAddIn
|
||||
// LoginForm
|
||||
//
|
||||
this.AcceptButton = this.btnLogin;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
// this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(500, 320);
|
||||
|
||||
@@ -78,6 +78,7 @@ namespace WordAddIn
|
||||
//
|
||||
// OutlineResultForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.ClientSize = new System.Drawing.Size(584, 461);
|
||||
this.Controls.Add(this.btnClose);
|
||||
this.Controls.Add(this.btnCopy);
|
||||
|
||||
@@ -79,8 +79,8 @@ namespace WordAddIn
|
||||
// OutlineSettingsForm
|
||||
//
|
||||
this.AcceptButton = this.btnSave;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
// this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(450, 360);
|
||||
this.MinimumSize = new System.Drawing.Size(350, 300);
|
||||
|
||||
12
WordAddIn/WordAddIn/Properties/Settings.Designer.cs
generated
12
WordAddIn/WordAddIn/Properties/Settings.Designer.cs
generated
@@ -82,5 +82,17 @@ namespace WordAddIn.Properties {
|
||||
this["OutlineStyles"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("qwen-plus")]
|
||||
public string SelectedModel {
|
||||
get {
|
||||
return ((string)(this["SelectedModel"]));
|
||||
}
|
||||
set {
|
||||
this["SelectedModel"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,5 +19,8 @@
|
||||
<Setting Name="OutlineStyles" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="SelectedModel" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">qwen-plus</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
|
||||
@@ -244,8 +244,8 @@ namespace WordAddIn
|
||||
// ReferenceGeneratorForm
|
||||
//
|
||||
this.AcceptButton = this.btnGenerate;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
// this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(650, 520);
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
using Word = Microsoft.Office.Interop.Word;
|
||||
using Office = Microsoft.Office.Core;
|
||||
using Microsoft.Office.Tools.Word;
|
||||
using System.IO;
|
||||
|
||||
namespace WordAddIn
|
||||
{
|
||||
public partial class ThisAddIn
|
||||
@@ -10,13 +20,36 @@ namespace WordAddIn
|
||||
/// <returns>IRibbonExtensibility 接口实现</returns>
|
||||
protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
|
||||
{
|
||||
return new AiRibbon();
|
||||
try
|
||||
{
|
||||
// 尝试写入日志,如果失败则忽略,避免因为日志权限问题导致崩溃
|
||||
try { File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", DateTime.Now + " CreateRibbonExtensibilityObject called.\n"); } catch {}
|
||||
|
||||
return new AiRibbon();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("创建 Ribbon 界面失败: " + ex.ToString());
|
||||
// 记录详细错误到日志
|
||||
try { File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", DateTime.Now + " ERROR: " + ex.ToString() + "\n"); } catch {}
|
||||
throw; // 重新抛出异常,让 VSTO 知道初始化失败
|
||||
}
|
||||
}
|
||||
|
||||
private void ThisAddIn_Startup(object sender, System.EventArgs e)
|
||||
{
|
||||
// 初始化全局上下文,供 AiRibbon 等使用
|
||||
AddInContext.CurrentApplication = this.Application;
|
||||
try
|
||||
{
|
||||
try { File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", DateTime.Now + " ThisAddIn_Startup called.\n"); } catch {}
|
||||
|
||||
// 初始化全局上下文,供 AiRibbon 等使用
|
||||
AddInContext.CurrentApplication = this.Application;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("插件启动初始化失败: " + ex.ToString());
|
||||
try { File.AppendAllText(@"C:\Users\Public\WordAddInLog.txt", DateTime.Now + " STARTUP ERROR: " + ex.ToString() + "\n"); } catch {}
|
||||
}
|
||||
}
|
||||
|
||||
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
|
||||
|
||||
@@ -248,6 +248,7 @@
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Config.cs" />
|
||||
<Compile Include="ThisAddIn.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -257,6 +258,9 @@
|
||||
<Compile Include="Models.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ModelDefinitions.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ImageOptionsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -288,18 +292,21 @@
|
||||
<None Include="ThisAddIn.Designer.xml">
|
||||
<DependentUpon>ThisAddIn.cs</DependentUpon>
|
||||
</None>
|
||||
<Compile Include="AddInContext.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WpsAddIn.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AddInContext.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WpsAddIn.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ThisAddIn.Designer.cs">
|
||||
<DependentUpon>ThisAddIn.Designer.xml</DependentUpon>
|
||||
</Compile>
|
||||
<AppDesigner Include="Properties\" />
|
||||
<None Include="WordAddIn_TemporaryKey.pfx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Test\" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
<PublishUrlHistory>D:\办公\</PublishUrlHistory>
|
||||
<InstallUrlHistory />
|
||||
<SupportUrlHistory />
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,203 +0,0 @@
|
||||
<?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="98816">
|
||||
<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>7zXanmFKW8rfBCQZX7ppBtABOc2pdXJG1SvwKHdlaHM=</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>MX0OcTmNbrJm6U9dkilxZisvL1NcqKQwS/O5HzEfK8c=</DigestValue></Reference></SignedInfo><SignatureValue>iUXnLUEc4RK0kHUR+ntcwfk1oyorIMye08lCaa2O2s2oYz9qED7J+sTgz0LaUHKt68VdKfwPPituBAIW2WxQCIqzdn9HT8230+f2Kl8oKk47JRzKW4gDgqOTf+KGF5XvAoXj68RrWTv/uwa8zJ6hiv3YqCHdPClmVi2wkX+y6LI=</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="c72b1f311fb9f34b30a4a85c532f2f2b667129925d4fe966b26e8d39710e7d31" 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>gxVlMLILST0l5MXxWhgiyjXV0uin5VywdE0lnEL0sdM=</DigestValue></Reference></SignedInfo><SignatureValue>oOM3Allutv+cuMtJeNLSE+jNzj7daIE1wnvZArg0M+3Y5zcOcNmlbdI5DT/WC8pw+il/Hy2wx/LvA5c5KnHrzeEPDGUWgX4P+Vr+K2EI0fU3qerHIpEHUY16LDwq39IkVAhnzUbxDxhiYMCKiDyTtpzhJS92Yew0fkJwMUgkozw=</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.
@@ -1,21 +0,0 @@
|
||||
<?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>JFxcDqTXA+7AjzUW97YoJ63KNke/KOZhQOjlegJDpCk=</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>VkiZ+y4H/hcb1yQg8BG6Ua0d5N/j6D4AcVs6C7CQWrw=</DigestValue></Reference></SignedInfo><SignatureValue>UgENk7DSSlRUuKqa1QdDtbD6Q72PVZmvBGBw3aoqNNvyYG/g0plqQTKO3zHd3cdI6gl7QVZekqmTcIepQcIZJdKe0nUy3uXt2YgAmikvTJDH90YunPZ6VCSgbkkdsxeCXEotjiJVXZ6PoZ3x3DeGAP1vHyhrkPLkWCfZ5eCwP8Y=</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="bc5a90b00b3a5b71003ee8e3dfe41dad51ba11f02024d71b17fe072efb994856" 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>SCNblBMUJn632sbfyxAd48c6urWHFRRJX6rRL4Jv7GQ=</DigestValue></Reference></SignedInfo><SignatureValue>ZP/rFAV9IwnUQGufXeBuRfnAL+jmpfcDongw9mnP2it/XcF+KBree43W2KG5r56z3zQLdx3LNReBBOKT8k6Nwrds3YFuK8MmHLaWU0KQdu29jIF5S9tfgHL2SEJcYY69Q1Bt7WW2btHSRx9CfBt+Y7cgP+7lSUW0A0LtO9mZn8I=</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.
@@ -166,14 +166,14 @@
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WordAddIn.dll" size="92160">
|
||||
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WordAddIn.dll" size="109568">
|
||||
<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>
|
||||
<dsig:DigestValue>b7Cc32gOO4NDdlCmmAwOKVKIxiGSuuKv6qdRFKUoZo8=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
@@ -200,4 +200,4 @@
|
||||
</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>
|
||||
<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>UhpvvvhZ0JKx4s3N602bgk5DyV5yFn1sFdOJrcd9Vjg=</DigestValue></Reference></SignedInfo><SignatureValue>GZa7zL6wJ+jKnaAHu66eweHxTbmrpypWRicD0zClj3D28NdnnNe1IO51tYdaVglSZ9frQUYeS0mDj2FrUXr26NET0eFZTrfjXBwXtTsiiVnD53Zfd/MGpLF1LlXran/i7/Q8CknNtNDechzMVjs7uDS2Gx+PsycmEu03QrNpC1Y=</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="38567dc7ad89d3156c7d16725ec9434e829b4debcdcde2b192d059f8be6f1a52" 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>vkwRm4lIKJ57QGSD+RJm0qwloH1cmITo8KKjBN5VXXY=</DigestValue></Reference></SignedInfo><SignatureValue>Sk6rRKpxCaPMi39cj35dPg3SXlS0etffN9z9NtdtGDm2TdptcSY9ljLa1p8fhfNBSTQn2T8wpTC+BYYgLfBI0ymRfH38uKAFdfXvTkOTfM0LPWguRxvu/GLrXsh9K3SrxJnuLk3Dc1Rdh5/BG91NPAtojdkcVvXhnB4fdPZlboM=</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.
@@ -7,15 +7,15 @@
|
||||
<framework targetVersion="4.7.2" profile="Full" supportedRuntime="4.0.30319" />
|
||||
</compatibleFrameworks>
|
||||
<dependency>
|
||||
<dependentAssembly dependencyType="install" codebase="WordAddIn.dll.manifest" size="14626">
|
||||
<dependentAssembly dependencyType="install" codebase="WordAddIn.dll.manifest" size="14627">
|
||||
<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>
|
||||
<dsig:DigestValue>obQbc7h6zkA0TnoIduOuBc41vNKQMHpPh/AfJA2YISk=</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>
|
||||
<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>ZwzyY1yEsVCU4BhxJzLlO8ZQHNeXqVPqlmSJisLn3tY=</DigestValue></Reference></SignedInfo><SignatureValue>crILPNEfy0A7RZ296BpImLzFIcUZ0g/jODUjoCsDq5DmdI/7irDKROQteazqexi045TvacD9fYe6amgHBgdxM4ET4/rIoivBaRBjMdzsUKvowukrNf9VhMJC3RpRd8HWkugN8+7/JfKjXTsCdZyVXNNOzKr0eYJeuYe3ghBj33E=</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="d6dee7c28a896496ea53a997d71c50c63be532277118e09450b1845c63f20c67" 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>2aT8MYvx/mBGrPRVOvz9piTveMU6NJjxI8LltLyjLWw=</DigestValue></Reference></SignedInfo><SignatureValue>hqq7e3z1TzCr+rHGXu1pVw078sk9+Ur7YDZf2YI3Pw1Y5+78F0ize4FhdGdcVjmBmq7f0/5qrA3jqbCcf0hUwd+4AiQSlEeAV50B9SlrvcoRwVjXl6CjkSnKyUEOChNJgA7rgr931hNUXsdIUQ6vtEqdHMLf4WT1bSDiqqvfxYI=</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.
@@ -1 +0,0 @@
|
||||
5cf5c0a43cd482b679e7e2b7f6131b108dbaf0753d9a650271203dc323e3d3cd
|
||||
@@ -12,17 +12,3 @@ D:\dsWork\aiData\addOne\WordAddIn\WordAddIn\obj\Debug\WordAddIn.csproj.CoreCompi
|
||||
D:\dsWork\aiData\addOne\WordAddIn\WordAddIn\obj\Debug\WordAddIn.csproj.Up2Date
|
||||
D:\dsWork\aiData\addOne\WordAddIn\WordAddIn\obj\Debug\WordAddIn.dll
|
||||
D:\dsWork\aiData\addOne\WordAddIn\WordAddIn\obj\Debug\WordAddIn.pdb
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\bin\Debug\WordAddIn.dll
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\bin\Debug\WordAddIn.pdb
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\bin\Debug\WordAddIn.dll.manifest
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\bin\Debug\WordAddIn.vsto
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\bin\Debug\Microsoft.Office.Tools.Common.v4.0.Utilities.dll
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\bin\Debug\Newtonsoft.Json.dll
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\bin\Debug\Newtonsoft.Json.xml
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\obj\Debug\WordAddIn.csproj.AssemblyReference.cache
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\obj\Debug\WordAddIn.Properties.Resources.resources
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\obj\Debug\WordAddIn.csproj.GenerateResource.cache
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\obj\Debug\WordAddIn.csproj.CoreCompileInputs.cache
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\obj\Debug\WordAddIn.csproj.Up2Date
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\obj\Debug\WordAddIn.dll
|
||||
D:\dsWork\aiData\WordAddIn\WordAddIn\obj\Debug\WordAddIn.pdb
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
dfceb9c0bcd6af0f5cce32fa9dd10ad83abf5bbc482d468e26e2dc4a9ed71baf
|
||||
e154ea9669b13c0b299747f4b6bfc75e5ab40e13fd7d98491977bb58e397c4dc
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,6 @@
|
||||
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.csproj.AssemblyReference.cache
|
||||
D:\dsWork\aiData\WordAddIn\WpsInstaller\obj\Debug\WpsInstaller.csproj.CoreCompileInputs.cache
|
||||
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.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user