Commit 24dedb12 authored by lijingang's avatar lijingang

Initial commit

parents
Pipeline #285 failed with stages
# 如果要从更高级别的目录继承 .editorconfig 设置,请删除以下行
root = true
# c# 文件
[*.cs]
#### Core EditorConfig 选项 ####
# 缩进和间距
indent_size = 4
indent_style = space
tab_width = 4
# 新行首选项
end_of_line = crlf
insert_final_newline = false
#### .NET 代码操作 ####
# 类型成员
dotnet_hide_advanced_members = false
dotnet_member_insertion_location = with_other_members_of_the_same_kind
dotnet_property_generation_behavior = prefer_throwing_properties
# 符号搜索
dotnet_search_reference_assemblies = true
#### .NET 编码约定 ####
# 组织 Using
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = false
file_header_template = unset
# this. 和 Me. 首选项
dotnet_style_qualification_for_event = false
dotnet_style_qualification_for_field = false
dotnet_style_qualification_for_method = false
dotnet_style_qualification_for_property = false
# 语言关键字与 bcl 类型首选项
dotnet_style_predefined_type_for_locals_parameters_members = true
dotnet_style_predefined_type_for_member_access = true
# 括号首选项
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
# 修饰符首选项
dotnet_style_require_accessibility_modifiers = for_non_interface_members
# 表达式级首选项
dotnet_prefer_system_hash_code = true
dotnet_style_coalesce_expression = true
dotnet_style_collection_initializer = true
dotnet_style_explicit_tuple_names = true
dotnet_style_namespace_match_folder = true
dotnet_style_null_propagation = true
dotnet_style_object_initializer = true
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_prefer_auto_properties = true
dotnet_style_prefer_collection_expression = when_types_loosely_match
dotnet_style_prefer_compound_assignment = true
dotnet_style_prefer_conditional_expression_over_assignment = true
dotnet_style_prefer_conditional_expression_over_return = true
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
dotnet_style_prefer_inferred_anonymous_type_member_names = true
dotnet_style_prefer_inferred_tuple_names = true
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
dotnet_style_prefer_simplified_boolean_expressions = true
dotnet_style_prefer_simplified_interpolation = true
# 字段首选项
dotnet_style_readonly_field = true
# 参数首选项
dotnet_code_quality_unused_parameters = all
# 禁止显示首选项
dotnet_remove_unnecessary_suppression_exclusions = none
# 新行首选项
dotnet_style_allow_multiple_blank_lines_experimental = true
dotnet_style_allow_statement_immediately_after_block_experimental = true
#### c# 编码约定 ####
# var 首选项
csharp_style_var_elsewhere = false:silent
csharp_style_var_for_built_in_types = false:silent
csharp_style_var_when_type_is_apparent = false:silent
# Expression-bodied 成员
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
# 模式匹配首选项
csharp_style_pattern_matching_over_as_with_null_check = true
csharp_style_pattern_matching_over_is_with_cast_check = true
csharp_style_prefer_extended_property_pattern = true
csharp_style_prefer_not_pattern = true
csharp_style_prefer_pattern_matching = true
csharp_style_prefer_switch_expression = true
# Null 检查首选项
csharp_style_conditional_delegate_call = true:suggestion
# 修饰符首选项
csharp_prefer_static_anonymous_function = true
csharp_prefer_static_local_function = true
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
csharp_style_prefer_readonly_struct = true
csharp_style_prefer_readonly_struct_member = true
# 代码块首选项
csharp_prefer_braces = true:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_system_threading_lock = true
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_primary_constructors = true
csharp_style_prefer_top_level_statements = true
# 表达式级首选项
csharp_prefer_simple_default_expression = true
csharp_style_deconstructed_variable_declaration = true
csharp_style_implicit_object_creation_when_type_is_apparent = true
csharp_style_inlined_variable_declaration = true
csharp_style_prefer_implicitly_typed_lambda_expression = true
csharp_style_prefer_index_operator = true
csharp_style_prefer_local_over_anonymous_function = true
csharp_style_prefer_null_check_over_type_check = true
csharp_style_prefer_range_operator = true
csharp_style_prefer_tuple_swap = true
csharp_style_prefer_unbound_generic_type_in_nameof = true
csharp_style_prefer_utf8_string_literals = true
csharp_style_throw_expression = true
csharp_style_unused_value_assignment_preference = discard_variable
csharp_style_unused_value_expression_statement_preference = discard_variable
# "using" 指令首选项
csharp_using_directive_placement = outside_namespace:silent
# 新行首选项
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
csharp_style_allow_embedded_statements_on_same_line_experimental = true
#### C# 格式规则 ####
# 新行首选项
csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_open_brace = all
csharp_new_line_between_query_expression_clauses = true
# 缩进首选项
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_labels = one_less_than_current
csharp_indent_switch_labels = true
# 空格键首选项
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
# 包装首选项
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
#### 命名样式 ####
# 命名规则
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
# 符号规范
dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
# 命名样式
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case
[*.{cs,vb}]
end_of_line = crlf
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_property = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_event = false:silent
tab_width = 4
indent_size = 4
dotnet_style_operator_placement_when_wrapping = beginning_of_line
\ No newline at end of file
<Project ToolsVersion="17.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<!--
This section defines project-level properties.
AssemblyName
Name of the output assembly.
Configuration
Specifies a default value for debug.
OutputType
Must be "Library" for VSTO.
Platform
Specifies what CPU the output of this project can run on.
NoStandardLibraries
Set to "false" for VSTO.
RootNamespace
In C#, this specifies the namespace given to new files. In VB, all objects are
wrapped in this namespace at runtime.
-->
<PropertyGroup>
<ProjectTypeGuids>{BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8522A81B-9EC2-469D-BA74-17A5974E6D0F}</ProjectGuid>
<OutputType>Library</OutputType>
<NoStandardLibraries>false</NoStandardLibraries>
<RootNamespace>ExcelAddInDg</RootNamespace>
<AssemblyName>ExcelAddInDg</AssemblyName>
<LoadBehavior>3</LoadBehavior>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<DefineConstants>VSTO40;UseOfficeInterop</DefineConstants>
<BootstrapperEnabled>true</BootstrapperEnabled>
<BootstrapperComponentsLocation>HomeSite</BootstrapperComponentsLocation>
<ResolveComReferenceSilent>true</ResolveComReferenceSilent>
</PropertyGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.VSTORuntime.4.0">
<Visible>False</Visible>
<ProductName>Microsoft Visual Studio 2010 Tools for Office Runtime %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<PropertyGroup>
<!--
OfficeApplication
Add-in host application
-->
<OfficeApplication>Excel</OfficeApplication>
</PropertyGroup>
<!--
This section defines properties that are set when the "Debug" configuration is selected.
DebugSymbols
If "true", create symbols (.pdb). If "false", do not create symbols.
DefineConstants
Constants defined for the preprocessor.
EnableUnmanagedDebugging
If "true", starting the debugger will attach both managed and unmanaged debuggers.
Optimize
If "true", optimize the build output. If "false", do not optimize.
OutputPath
Output path of project relative to the project file.
WarningLevel
Warning level for the compiler.
-->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<!--
This section defines properties that are set when the "Release" configuration is selected.
DebugSymbols
If "true", create symbols (.pdb). If "false", do not create symbols.
DefineConstants
Constants defined for the preprocessor.
EnableUnmanagedDebugging
If "true", starting the debugger will attach both managed and unmanaged debuggers.
Optimize
If "true", optimize the build output. If "false", do not optimize.
OutputPath
Output path of project relative to the project file.
WarningLevel
Warning level for the compiler.
-->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<!--
This section specifies references for the project.
-->
<ItemGroup>
<Reference Include="Accessibility" />
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.13.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=6.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>packages\NLog.6.0.6\lib\net46\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Office.Tools.v4.0.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Tools.Applications.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Office.Tools, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Office.Tools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Office.Tools.Excel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Office.Tools.Common.v4.0.Utilities, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
</ItemGroup>
<Choose>
<When Condition="$([System.String]::Copy(&quot;;$(DefineConstants);&quot;).ToLower().Contains(';useofficeinterop;')) or $([System.String]::Copy(&quot;,$(DefineConstants),&quot;).ToLower().Contains(',useofficeinterop,'))">
<ItemGroup>
<Reference Include="Office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<Private>False</Private>
<EmbedInteropTypes>true</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<Private>False</Private>
<EmbedInteropTypes>true</EmbedInteropTypes>
</Reference>
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<COMReference Include="Microsoft.Office.Core">
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>7</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>true</EmbedInteropTypes>
</COMReference>
<COMReference Include="Microsoft.Office.Interop.Excel">
<Guid>{00020813-0000-0000-C000-000000000046}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>8</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>true</EmbedInteropTypes>
</COMReference>
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup>
<Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>False</Private>
</Reference>
</ItemGroup>
<!--
This section defines the user source files that are part of the project.
A "Compile" element specifies a source file to compile.
An "EmbeddedResource" element specifies an .resx file for embedded resources.
A "None" element specifies a file that is not to be passed to the compiler (for instance,
a text file or XML file).
The "AppDesigner" element specifies the directory where the application properties files
can be found.
-->
<ItemGroup>
<Compile Include="ExcelEventSubscriptions.cs" />
<Compile Include="ExcelEventSubscriptions.Events.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include=".editorconfig" />
<None Include="ExcelAddInDg_TemporaryKey.pfx" />
<None Include="NLog.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="ThisAddIn.cs">
<SubType>Code</SubType>
</Compile>
<None Include="ThisAddIn.Designer.xml">
<DependentUpon>ThisAddIn.cs</DependentUpon>
</None>
<Compile Include="ThisAddIn.Designer.cs">
<DependentUpon>ThisAddIn.Designer.xml</DependentUpon>
</Compile>
<AppDesigner Include="Properties\" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>ExcelAddInDg_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>B8190791046344980B81F5CAF87946938F5F7408</ManifestCertificateThumbprint>
</PropertyGroup>
<!-- Include the build rules for a C# project. -->
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- Include additional build rules for an Office application add-in. -->
<Import Project="$(VSToolsPath)\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets" Condition="'$(VSToolsPath)' != ''" />
<!-- This section defines VSTO properties that describe the host-changeable project properties. -->
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{BAA0C2D2-18E2-41B9-852F-F413020CAA33}">
<ProjectProperties HostName="Excel" HostPackage="{29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1}" OfficeVersion="15.0" VstxVersion="4.0" ApplicationType="Excel" Language="cs" TemplatesPath="" DebugInfoExeName="#Software\Microsoft\Office\16.0\Excel\InstallRoot\Path#excel.exe" DebugInfoCommandLine="/x" AddItemTemplatesGuid="{51063C3A-E220-4D12-8922-BDA915ACD783}" />
<Host Name="Excel" GeneratedCodeNamespace="ExcelAddInDg" IconIndex="0">
<HostItem Name="ThisAddIn" Code="ThisAddIn.cs" CanonicalName="AddIn" CanActivate="false" IconIndex="1" Blueprint="ThisAddIn.Designer.xml" GeneratedCode="ThisAddIn.Designer.cs" />
</Host>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartAction>Program</StartAction>
<StartArguments>"C:\Users\Administrator\Desktop\Excel附注模版.xlsx"</StartArguments>
<StartProgram>C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE</StartProgram>
</PropertyGroup>
</Project>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36221.1 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExcelAddInDg", "ExcelAddInDg.csproj", "{8522A81B-9EC2-469D-BA74-17A5974E6D0F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8522A81B-9EC2-469D-BA74-17A5974E6D0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8522A81B-9EC2-469D-BA74-17A5974E6D0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8522A81B-9EC2-469D-BA74-17A5974E6D0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8522A81B-9EC2-469D-BA74-17A5974E6D0F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E33CBB15-5516-49DF-8C71-03DABC8FEB62}
EndGlobalSection
EndGlobal
using Newtonsoft.Json;
using NLog;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using Excel = Microsoft.Office.Interop.Excel;
namespace ExcelAddInDg
{
public class RowRangeModel
{
public string startRowRid { get; set; }
public string endRowRid { get; set; }
}
internal partial class ExcelEventSubscriptions
{
private Excel.Workbook _activeWorkbook;
private Excel.Worksheet _activeWorksheet;
private int _lastUsedRows;
private Excel.Range _lastHighlightedRow; // 用于跟踪上一次高亮的行
private static readonly Logger LogManagerCall = LogManager.GetCurrentClassLogger();
// 将打开工作簿的处理逻辑集中到此文件中,便于管理其他事件处理器。
private void OnWorkbookOpen(Excel.Workbook workbook)
{
try
{
LogManagerCall.Info("Workbook opened: {0}", workbook?.Name);
// 在此添加打开工作簿时需要执行的逻辑
InitializeWorksheetTracking(workbook);
}
catch (Exception ex)
{
LogManagerCall.Error(ex, "OnWorkbookOpen 异常");
}
}
private void OnWorkbookActivate(Excel.Workbook workbook) {
try
{
LogManagerCall.Info("OnWorkbookActivate opened: {0}", workbook?.Name);
// 在此添加打开工作簿时需要执行的逻辑
InitializeWorksheetTracking(workbook);
}
catch (Exception ex)
{
LogManagerCall.Error(ex, "OnWorkbookActivate 异常");
}
}
// 窗口激活事件处理
private void Application_WindowActivate(Excel.Workbook Wb, Excel.Window Wn)
{
if (Wn.Application.ActiveWorkbook != null)
{
InitializeWorksheetTracking(Wb);
}
}
// 当切换工作表时触发
private void OnSheetActivated(object Sh)
{
if (Sh is Excel.Worksheet sheet)
{
// 解除旧工作表的事件绑定
if (_activeWorksheet != null)
{
ReleaseComObjectSafe(_activeWorksheet);
}
// 绑定新工作表
_activeWorksheet = sheet;
_activeWorkbook = sheet.Parent as Excel.Workbook;
if (!_activeWorksheet.ProtectContents)
{
_lastUsedRows = GetUsedRowCount(sheet);
var ComCount1 = FindSpecialComments(_activeWorksheet, "}.主键");
LogManagerCall.Debug($"当前sheet页是特殊表:{_activeWorkbook.Name},{_activeWorksheet.Name}{ComCount1.Count()}个");
if (ComCount1.Count() > 0)
{
// 先解绑再绑定,确保只绑定一次
sheet.Change -= OnWorksheetChanged;
sheet.Change += OnWorksheetChanged;
}
}
}
}
// 你可以在此文件中继续添加更多事件处理函数,例如:
// private void OnSomeOtherEvent(...) { ... }
// 工作表内容变化事件处理
private void OnWorksheetChanged(Excel.Range Target)
{
try
{
LogManagerCall.Debug($"sheet页内容变动:{Target.Address} 定位行号:{Target.Row}");
int currentRows = GetUsedRowCount(_activeWorksheet);
LogManagerCall.Debug($"行数变化:新增后vs 前- {currentRows} vs {_lastUsedRows}");
if (currentRows == _lastUsedRows)
{
return;
}
if (currentRows < _lastUsedRows)
{
// 删除行操作
_lastUsedRows = currentRows;
return;
}
if (currentRows > _lastUsedRows)
{
int insertedRowCount = currentRows - _lastUsedRows;
int startRow = Target.Row;
// 触发新增行事件
HandleRowInserted(startRow, insertedRowCount);
_lastUsedRows = currentRows;
}
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine($"变动测错误: {ex.Message}");
LogManagerCall.Debug($"变动测错误: {ex.Message.ToString()}");
}
}
private void HandleRowInserted(int startRow, int rowCount)
{
string message = $"检测到新增行:起始行 {startRow}, 共 {rowCount} 行";
System.Diagnostics.Debug.WriteLine(message);
//_logPanelHost.AppendLog(message);
Excel.Worksheet worksheet = Globals.ThisAddIn.Application.ActiveSheet as Excel.Worksheet;
if (worksheet == null) return;
//第一阶段:查找所有包含 "p1" 的批注
List<Excel.Range> targetComments = FindCommentsWithPattern(worksheet, ".{浮动行范围}.");
LogManagerCall.Debug($"sheet表:{worksheet.Name} ,检查浮动表: {targetComments.Count} 个");
foreach (Excel.Range commentCell in targetComments)
{
try
{
// 第二阶段:解析批注内容
var comment = commentCell.Comment;
string commentText = comment.Text();
string[] parts = commentText.Split(new[] { ".{浮动行范围}." }, StringSplitOptions.RemoveEmptyEntries);
if (parts.Length < 2) continue;
// 提取 JSON 部分
string jsonPart = parts[1].Trim()
.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)
.FirstOrDefault()?
.Trim('"', ' ', ';');
if (string.IsNullOrEmpty(jsonPart)) continue;
// 第三阶段:解析 JSON
List<RowRangeModel> ranges = JsonConvert.DeserializeObject<List<RowRangeModel>>(jsonPart);
if (ranges == null || ranges.Count == 0) continue;
LogManagerCall.Debug($"浮动表批注解析起始行成功:{jsonPart},共 {ranges.Count} 个,当前批注表:{parts[0]}");
foreach (var range in ranges)
{
// 第四阶段:查找 RID 对应行号
Dictionary<string, int> ridRowMap = new Dictionary<string, int>();
FindRidRows(worksheet, new[] { range.startRowRid, range.endRowRid }, ridRowMap, parts[0]);
string message3 = $"设置行参数检查批注:{ridRowMap.Count()}: startRowRid:{range.startRowRid} endRowRid:{range.endRowRid}";
LogManagerCall.Debug(message3);
if (!ridRowMap.ContainsKey(range.startRowRid)) continue;
if (!ridRowMap.ContainsKey(range.endRowRid)) continue;
int rstartRow = ridRowMap[range.startRowRid];
int endRow = ridRowMap[range.endRowRid];
int currentRow = startRow;
string message0 = $"设置行参数检查:起始行 {rstartRow} -{endRow} 当前行 {currentRow} 行";
LogManagerCall.Info(message0);
// 第五阶段:验证行范围
if (currentRow > Math.Min(rstartRow, endRow) &&
currentRow < Math.Max(rstartRow, endRow))
{
HighlightCurrentRow(worksheet, parts[0], rowCount);
}
}
}
catch (JsonException) { /* JSON 解析失败 */ }
catch (COMException) { /* Excel 操作异常 */ }
finally
{
// 释放 COM 对象
if (commentCell != null) Marshal.ReleaseComObject(commentCell);
}
// 这里可以添加业务逻辑(如自动填充公式)
}
//MessageBox.Show(message, "新增行检测", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
// 核心方法:设置当前行背景色
public void HighlightCurrentRow(Excel.Worksheet worksheet, string noteName, int addRow)
{
try
{
Excel.Application excelApp = Globals.ThisAddIn.Application;
Excel.Range selectedRange = excelApp.Selection as Excel.Range;
if (selectedRange == null) return;
if (worksheet == null) return;
int firstUsedColumn = -1;
List<string> usedColumns = FindSpecialComments(worksheet, noteName + ".{表头结束列}");
if (usedColumns.Count == 0)
{
List<string> usedRow = FindSpecialComments(worksheet, noteName + ".{表头结束行}");
if (usedRow.Count > 0)
{
// List<string> a 是个数字字符串列表,转换成整形找到最大的数字
firstUsedColumn = usedRow.Select(int.Parse).Max(); // 转换整数并找到最大值
}
}
else
{
firstUsedColumn = int.Parse(usedColumns.First()); // 转换整数 usedColumns.First()
}
if (firstUsedColumn > 0)
{
LogManagerCall.Debug($"检测到当前sheet:{worksheet.Name}页已用列数:{firstUsedColumn}");
// 定位目标行范围 (从第1列到已用列)
Excel.Range targetRow = worksheet.Range[
worksheet.Cells[selectedRange.Row, 2],
worksheet.Cells[selectedRange.Row + addRow - 1, firstUsedColumn]
];
// 清除旧高亮
//ClearPreviousHighlight();
// 设置新背景色(浅黄色示例)191 G213 B238)
//targetRow.Interior.Color = RGB(255, 255, 153); // 使用自定义RGB方法
targetRow.Interior.Color = RGB(191, 213, 238); // 使用自定义RGB方法
_lastHighlightedRow = targetRow;
}
// 释放对象(targetRow在后续操作中还需使用,暂时不释放)
}
catch (COMException ex)
{
System.Diagnostics.Debug.WriteLine($"COM Error: {ex.Message}");
}
finally
{
// 确保释放非必要对象
//if (selectedRange != null) Marshal.ReleaseComObject(selectedRange);
//if (worksheet != null) Marshal.ReleaseComObject(worksheet);
}
}
// 获取当前行已用列数(优化逻辑)
private int GetUsedColumns(Excel.Worksheet worksheet, int row)
{
// 方式1:通过UsedRange快速检测(适合规则数据表)
Excel.Range usedRange = worksheet.UsedRange;
int maxUsedColumn = usedRange.Column + usedRange.Columns.Count - 1;
// 方式2:精确检测(遍历列,适合不规则数据)
// int dynamicMaxCol = 1;
// for (int col = 1; col <= 16384; col++)
// {
// {
// dynamicMaxCol = col;
// }
// }
Marshal.ReleaseComObject(usedRange);
return maxUsedColumn; // 或返回 dynamicMaxCol
}
// 自定义RGB转换(Excel使用BGR顺序)
private int RGB(int r, int g, int b)
{
return (b << 16) | (g << 8) | r;
}
// 初始化工作表追踪
private void InitializeWorksheetTracking(Excel.Workbook Wb)
{
try
{
LogManagerCall.Debug($"初始化当前激活工作表完成:{Wb.Name},总行数:{_lastUsedRows}");
_activeWorkbook = Wb.Application.ActiveWorkbook;
_activeWorksheet = _activeWorkbook.ActiveSheet as Excel.Worksheet;
if (_activeWorksheet != null)
{
LogManagerCall.Debug($"初始化当前激活工作表完成:{_activeWorksheet.Name},总行数:{_lastUsedRows}");
//var ComCount = FindSpecialComments(_activeWorksheet);
//if (ComCount.Count > 0)
//{
// _activeWorksheet.Change += OnWorksheetChanged;
//}
//_activeWorksheet.Change += OnWorksheetChanged;
if (!_activeWorksheet.ProtectContents)
{
_lastUsedRows = GetUsedRowCount(_activeWorksheet);
var ComCount1 = FindSpecialComments(_activeWorksheet, "}.主键");
LogManagerCall.Debug($"当前sheet页是特殊表:{_activeWorksheet.Name},主键:{ComCount1.Count()}个");
if (ComCount1.Count() > 0)
{
_activeWorksheet.Change -= OnWorksheetChanged;
_activeWorksheet.Change += OnWorksheetChanged;
}
}
}
}
catch (COMException ex)
{
System.Diagnostics.Debug.WriteLine($"初始化错误: {ex.Message}");
LogManagerCall.Debug($"初始化错误: {ex.Message}");
}
}
/****************** 工具函数 ******************/
// 查找包含指定模式的批注单元格
private List<Excel.Range> FindCommentsWithPattern(Excel.Worksheet worksheet, string pattern)
{
var result = new List<Excel.Range>();
Excel.Range commentsRange = null;
try
{
commentsRange = worksheet.Cells.SpecialCells(
Excel.XlCellType.xlCellTypeComments,
Type.Missing);
foreach (Excel.Range cell in commentsRange)
{
try
{
if (cell.Comment?.Text().Contains(pattern) == true)
{
result.Add(cell);
}
else
{
Marshal.ReleaseComObject(cell);
}
}
catch { /* 忽略无效单元格 */ }
}
}
catch (COMException) { /* 无批注情况 */ }
finally
{
if (commentsRange != null) Marshal.ReleaseComObject(commentsRange);
}
return result;
}
// 查找 RID 对应的实际行号
private void FindRidRows(Excel.Worksheet worksheet, string[] rids, Dictionary<string, int> resultMap, string noteName)
{
Excel.Range commentsRange = null;
try
{
commentsRange = worksheet.Cells.SpecialCells(
Excel.XlCellType.xlCellTypeComments,
Type.Missing);
foreach (Excel.Range cell in commentsRange)
{
try
{
string commentText = cell.Comment?.Text();
if (string.IsNullOrEmpty(commentText)) continue;
foreach (var rid in rids)
{
if (commentText.Contains(rid) && commentText.Contains("行配置标记") && !resultMap.ContainsKey(rid))
{
resultMap[rid] = cell.Row;
}
if (rid == "last")
{
List<Excel.Range> targetComments = FindCommentsWithPattern(worksheet, noteName + ".{表后注释}");
if (targetComments.Count > 0)
{
resultMap[rid] = targetComments.Last().Row;
LogManagerCall.Debug($"检测到表后注释:{targetComments.Last().Address},行号:{resultMap[rid]}");
}
}
}
}
finally
{
Marshal.ReleaseComObject(cell);
}
}
}
catch (COMException) { /* 无批注情况 */ }
finally
{
if (commentsRange != null) Marshal.ReleaseComObject(commentsRange);
}
}
// 获取当前工作表的已用行数(优化性能版)
private int GetUsedRowCount(Excel.Worksheet sheet)
{
int rowCount = 0;
Excel.Range usedRange = sheet.UsedRange;
try
{
// 从第1行开始遍历,直到连续遇到5个空行为止
for (int i = 1; i <= usedRange.Rows.Count; i++)
{
if (!string.IsNullOrEmpty(sheet.Cells[i, 1].Text.ToString()))
{
rowCount = i;
}
else if (i > rowCount + 5) // 连续5个空行视为结束
{
break;
}
}
return rowCount;
}
finally
{
ReleaseComObjectSafe(usedRange);
}
}
public List<string> FindSpecialComments(Excel.Worksheet wksheet, string kword = ".{浮动行范围}.")
{
List<string> result = new List<string>();
if (wksheet == null) return result;
Excel.Worksheet worksheet = wksheet;
Excel.Range commentsRange = null;
try
{
string sheetName = worksheet.Name;
// 获取所有包含批注的单元格
commentsRange = worksheet.Cells.SpecialCells(
Excel.XlCellType.xlCellTypeComments,
Type.Missing
);
// 遍历每个有批注的单元格
foreach (Excel.Range cell in commentsRange)
{
Excel.Comment comment = null;
try
{
comment = cell.Comment;
if (comment != null)
{
// 获取批注文本
string commentText = comment.Text();
// 检查是否包含目标字符串
if (commentText.Contains(kword))
{
string address = cell.Address;
LogManagerCall.Debug($"找到批注:{sheetName},单元格地址:{address},列地址:{cell.Column.ToString()}");
result.Add($"{cell.Column.ToString()}");
}
}
}
finally
{
ReleaseComObjectSafe(comment);
ReleaseComObjectSafe(cell);
}
}
}
catch (COMException ex)
{
LogManagerCall.Debug(ex.ToString());
// 处理无批注的情况(SpecialCells 找不到目标时会抛异常)
if (!ex.Message.Contains("未找到单元格"))
{
LogManagerCall.Debug("!未找到单元格");
//MessageBox.Show(ex.ToString());
}
}
finally
{
ReleaseComObjectSafe(commentsRange);
}
return result;
}
#region COM 帮助方法
private void ReleaseComObjectSafe(object comObj)
{
try
{
if (comObj == null) return;
// 只有 COM 对象需要释放,排除原始类型
if (Marshal.IsComObject(comObj))
{
while (Marshal.ReleaseComObject(comObj) > 0) { }
}
}
catch (Exception ex)
{
Debug.WriteLine("ReleaseComObjectSafe error: " + ex);
}
}
#endregion
}
}
\ No newline at end of file
using System;
using System.Diagnostics;
using System.Collections.Generic;
using Excel = Microsoft.Office.Interop.Excel;
using NLog;
namespace ExcelAddInDg
{
/// <summary>
/// 负责订阅与取消订阅 Excel 应用级别的事件(如打开工作簿、工作簿关闭前等)。
/// 在 ThisAddIn.Startup 中创建并调用 Subscribe,在 Shutdown 中调用 Unsubscribe 或 Dispose。
/// </summary>
internal partial class ExcelEventSubscriptions : IDisposable
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private readonly Excel.Application _excelApp;
private readonly Excel.AppEvents_Event _appEvents;
private bool _disposed = false;
// 保持对 delegate 的引用以防止被 GC 回收(这是 COM 事件的常见坑)
private Excel.AppEvents_WorkbookOpenEventHandler _workbookOpenHandler;
private Excel.AppEvents_WorkbookActivateEventHandler _workbookActivateHandler;
// 新增:保持对 Application.SheetActivate 处理器引用,防止 GC 回收
private Excel.AppEvents_SheetActivateEventHandler _sheetActivateHandler;
// 新增:保持对 WindowActivate 处理器引用,防止 GC 回收
private Excel.AppEvents_WindowActivateEventHandler _windowActivateHandler;
// 新增:用于指定只在某些工作簿上生效(若为空则对所有工作簿生效)
private readonly HashSet<string> _watchedWorkbookNames = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
private bool _isSubscribed;
public ExcelEventSubscriptions(Excel.Application excelApplication)
{
_excelApp = excelApplication ?? throw new ArgumentNullException(nameof(excelApplication));
_appEvents = _excelApp as Excel.AppEvents_Event;
Logger.Debug("ExcelEventSubscriptions 实例已创建。");
}
/// <summary>
/// 订阅需要的事件
/// </summary>
public void Subscribe()
{
if (_isSubscribed)
{
Logger.Debug("Subscribe 调用被忽略:已订阅。");
return;
}
if (_appEvents == null)
{
Logger.Warn("无法转换为 AppEvents_Event,事件订阅失败。");
return;
}
_workbookOpenHandler = new Excel.AppEvents_WorkbookOpenEventHandler(OnWorkbookOpen);
_appEvents.WorkbookOpen += _workbookOpenHandler;
// 订阅 Application 层的 SheetActivate,使切换工作表时触发(对所有工作簿,OnSheetActivated 内可筛选)
_sheetActivateHandler = new Excel.AppEvents_SheetActivateEventHandler(OnSheetActivated);
_appEvents.SheetActivate += _sheetActivateHandler;
// 订阅 WindowActivate(窗口激活时触发)
_windowActivateHandler = new Excel.AppEvents_WindowActivateEventHandler(Application_WindowActivate);
_appEvents.WindowActivate += _windowActivateHandler;
// 订阅 WorkbookActivate(在切换工作簿时触发)
_workbookActivateHandler = new Excel.AppEvents_WorkbookActivateEventHandler(OnWorkbookActivate);
_appEvents.WorkbookActivate += _workbookActivateHandler;
_isSubscribed = true;
Logger.Info("已订阅 Excel 应用级别事件(含 SheetActivate、WindowActivate)。");
}
/// <summary>
/// 取消订阅(并清理对 delegate 的引用)
/// </summary>
public void Unsubscribe()
{
if (!_isSubscribed)
{
Logger.Debug("Unsubscribe 调用被忽略:未处于订阅状态。");
return;
}
if (_appEvents != null)
{
if (_workbookOpenHandler != null) _appEvents.WorkbookOpen -= _workbookOpenHandler;
if (_workbookActivateHandler != null) _appEvents.WorkbookActivate -= _workbookActivateHandler;
if (_sheetActivateHandler != null) _appEvents.SheetActivate -= _sheetActivateHandler;
if (_windowActivateHandler != null) _appEvents.WindowActivate -= _windowActivateHandler;
}
_workbookOpenHandler = null;
_workbookActivateHandler = null;
_sheetActivateHandler = null;
_windowActivateHandler = null;
_isSubscribed = false;
Logger.Info("已取消订阅 Excel 应用级别事件。");
}
// 终结器:最后的保障
~ExcelEventSubscriptions()
{
Dispose(false);
}
protected virtual void Dispose(bool disposing)
{
if (_disposed) return;
if (disposing)
{
// 安全地释放托管资源
Unsubscribe(); // 取消事件订阅
}
// 这里可以释放非托管资源(如果有的话)
_disposed = true;
}
public void Dispose()
{
//Dispose(true);
GC.SuppressFinalize(this);
Logger.Debug("ExcelEventSubscriptions 已 Dispose。");
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
autoReload="true"
throwConfigExceptions="true">
<!-- 指定日志文件的存储位置 - 选择其中一种配置 -->
<!-- 选项1: 当前用户的MyDocuments文件夹下的Cpas6.0Addin/Logs目录(默认配置) -->
<!-- <variable name="logDirectory" value="${specialfolder:folder=MyDocuments}/Cpas6.0Addin/Logs" /> -->
<!-- 选项2: 程序运行目录下的Logs文件夹 -->
<variable name="logDirectory" value="${basedir}/../logs/vsto" />
<!-- 选项3: Windows临时文件夹下的Cpas6Logs目录 -->
<!-- <variable name="logDirectory" value="${specialfolder:folder=LocalApplicationData}/Cpas6Logs" /> -->
<!-- 选项4: 自定义绝对路径 (请根据实际需要修改路径) -->
<!-- <variable name="logDirectory" value="C:/MyApp/Logs" /> -->
<!-- 选项5: 系统公共文档目录下的Cpas6Logs文件夹 -->
<!-- <variable name="logDirectory" value="${specialfolder:folder=CommonDocuments}/Cpas6Logs" /> -->
<targets>
<!-- 输出日志到文件 -->
<target xsi:type="File"
name="file"
fileName="${logDirectory}/${shortdate}.log"
layout="${longdate} ${uppercase:${level}} ${message} ${exception:format=tostring}"
archiveFileName="${logDirectory}/archive/log.{####}.txt"
archiveEvery="Day"
archiveNumbering="Rolling"
maxArchiveFiles="10"
concurrentWrites="true"
keepFileOpen="false"
encoding="utf-8" />
<!-- 输出日志到 Visual Studio 调试窗口 -->
<target xsi:type="Debugger"
name="debug"
layout="${longdate} ${uppercase:${level}} ${message}" />
</targets>
<rules>
<!-- 记录所有级别的日志到文件 -->
<logger name="*" minlevel="Trace" writeTo="file" />
<!-- 仅在调试模式下记录日志到调试窗口 -->
<logger name="*" minlevel="Trace" writeTo="debug" final="true" enabled="true" />
</rules>
</nlog>
\ No newline at end of file
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("ExcelAddInDg")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ExcelAddInDg")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//将 ComVisible 设置为 false 将使此程序集中的类型
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("b8956e17-72de-40f9-b7af-bbb34d58f9ba")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ExcelAddInDg.Properties {
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ExcelAddInDg.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ExcelAddInDg.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#pragma warning disable 414
namespace ExcelAddInDg {
///
[Microsoft.VisualStudio.Tools.Applications.Runtime.StartupObjectAttribute(0)]
[global::System.Security.Permissions.PermissionSetAttribute(global::System.Security.Permissions.SecurityAction.Demand, Name="FullTrust")]
public sealed partial class ThisAddIn : Microsoft.Office.Tools.AddInBase {
internal Microsoft.Office.Tools.CustomTaskPaneCollection CustomTaskPanes;
internal Microsoft.Office.Tools.SmartTagCollection VstoSmartTags;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
private global::System.Object missing = global::System.Type.Missing;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
internal Microsoft.Office.Interop.Excel.Application Application;
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
public ThisAddIn(global::Microsoft.Office.Tools.Excel.ApplicationFactory factory, global::System.IServiceProvider serviceProvider) :
base(factory, serviceProvider, "AddIn", "ThisAddIn") {
Globals.Factory = factory;
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override void Initialize() {
base.Initialize();
this.Application = this.GetHostItem<Microsoft.Office.Interop.Excel.Application>(typeof(Microsoft.Office.Interop.Excel.Application), "Application");
Globals.ThisAddIn = this;
global::System.Windows.Forms.Application.EnableVisualStyles();
this.InitializeCachedData();
this.InitializeControls();
this.InitializeComponents();
this.InitializeData();
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override void FinishInitialization() {
this.InternalStartup();
this.OnStartup();
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override void InitializeDataBindings() {
this.BeginInitialization();
this.BindToData();
this.EndInitialization();
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
private void InitializeCachedData() {
if ((this.DataHost == null)) {
return;
}
if (this.DataHost.IsCacheInitialized) {
this.DataHost.FillCachedData(this);
}
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
private void InitializeData() {
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
private void BindToData() {
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
private void StartCaching(string MemberName) {
this.DataHost.StartCaching(this, MemberName);
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
private void StopCaching(string MemberName) {
this.DataHost.StopCaching(this, MemberName);
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
private bool IsCached(string MemberName) {
return this.DataHost.IsCached(this, MemberName);
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
private void BeginInitialization() {
this.BeginInit();
this.CustomTaskPanes.BeginInit();
this.VstoSmartTags.BeginInit();
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
private void EndInitialization() {
this.VstoSmartTags.EndInit();
this.CustomTaskPanes.EndInit();
this.EndInit();
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
private void InitializeControls() {
this.CustomTaskPanes = Globals.Factory.CreateCustomTaskPaneCollection(null, null, "CustomTaskPanes", "CustomTaskPanes", this);
this.VstoSmartTags = Globals.Factory.CreateSmartTagCollection(null, null, "VstoSmartTags", "VstoSmartTags", this);
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
private void InitializeComponents() {
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
private bool NeedsFill(string MemberName) {
return this.DataHost.NeedsFill(this, MemberName);
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override void OnShutdown() {
this.VstoSmartTags.Dispose();
this.CustomTaskPanes.Dispose();
base.OnShutdown();
}
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
internal sealed partial class Globals {
///
private Globals() {
}
private static ThisAddIn _ThisAddIn;
private static global::Microsoft.Office.Tools.Excel.ApplicationFactory _factory;
private static ThisRibbonCollection _ThisRibbonCollection;
internal static ThisAddIn ThisAddIn {
get {
return _ThisAddIn;
}
set {
if ((_ThisAddIn == null)) {
_ThisAddIn = value;
}
else {
throw new System.NotSupportedException();
}
}
}
internal static global::Microsoft.Office.Tools.Excel.ApplicationFactory Factory {
get {
return _factory;
}
set {
if ((_factory == null)) {
_factory = value;
}
else {
throw new System.NotSupportedException();
}
}
}
internal static ThisRibbonCollection Ribbons {
get {
if ((_ThisRibbonCollection == null)) {
_ThisRibbonCollection = new ThisRibbonCollection(_factory.GetRibbonFactory());
}
return _ThisRibbonCollection;
}
}
}
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "17.0.0.0")]
internal sealed partial class ThisRibbonCollection : Microsoft.Office.Tools.Ribbon.RibbonCollectionBase {
///
internal ThisRibbonCollection(global::Microsoft.Office.Tools.Ribbon.RibbonFactory factory) :
base(factory) {
}
}
}
<hostitem:hostItem hostitem:baseType="Microsoft.Office.Tools.AddInBase" hostitem:namespace="ExcelAddInDg" hostitem:className="ThisAddIn" hostitem:identifier="ThisAddIn" hostitem:primaryCookie="AddIn" hostitem:master="true" hostitem:factoryType="Microsoft.Office.Tools.Excel.ApplicationFactory" hostitem:startupIndex="0" xmlns:hostitem="http://schemas.microsoft.com/2004/VisualStudio/Tools/Applications/HostItem.xsd">
<hostitem:hostObject hostitem:name="Application" hostitem:identifier="Application" hostitem:type="Microsoft.Office.Interop.Excel.Application" hostitem:cookie="Application" hostitem:modifier="Internal" />
<hostitem:hostControl hostitem:name="CustomTaskPanes" hostitem:identifier="CustomTaskPanes" hostitem:type="Microsoft.Office.Tools.CustomTaskPaneCollection" hostitem:primaryCookie="CustomTaskPanes" hostitem:modifier="Internal" />
<hostitem:hostControl hostitem:name="VstoSmartTags" hostitem:identifier="VstoSmartTags" hostitem:type="Microsoft.Office.Tools.SmartTagCollection" hostitem:primaryCookie="VstoSmartTags" hostitem:modifier="Internal" />
</hostitem:hostItem>
\ No newline at end of file
using Microsoft.Office.Tools.Excel;
using NLog;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using Excel = Microsoft.Office.Interop.Excel;
using Office = Microsoft.Office.Core;
namespace ExcelAddInDg
{
public partial class ThisAddIn
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
// 管理 Excel 事件订阅的实例
private ExcelEventSubscriptions _excelEvents;
private readonly object _lockObject = new object();
private bool _isInitialized = false;
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
Logger.Info("Add-in 启动 - ThisAddIn_Startup 开始。");
lock (_lockObject)
{
if (_isInitialized) return; // 防止重复初始化
try
{
_excelEvents = new ExcelEventSubscriptions(this.Application);
_excelEvents.Subscribe();
_isInitialized = true;
Logger.Info("Excel Add-in 启动完成");
}
catch (Exception ex)
{
Logger.Info($"Add-in 启动失败: {ex}");
// 清理部分初始化的状态
_excelEvents?.Dispose();
_excelEvents = null;
}
}
}
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
Logger.Info("Add-in 关闭 - ThisAddIn_Shutdown 开始。");
lock (_lockObject)
{
try
{
if (_excelEvents != null)
{
_excelEvents.Dispose();
_excelEvents = null;
_isInitialized = false;
}
Logger.Info("Excel Add-in 关闭完成");
}
catch (Exception ex)
{
Logger.Info($"Add-in 关闭过程中发生异常: {ex}");
}
}
}
#region VSTO 生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InternalStartup()
{
this.Startup += new System.EventHandler(ThisAddIn_Startup);
this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
}
#endregion
}
}
<?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="ExcelAddInDg.dll" version="1.0.0.0" publicKeyToken="c95f25e5e8f049ef" language="neutral" processorArchitecture="msil" type="win32" />
<description xmlns="urn:schemas-microsoft-com:asm.v1">ExcelAddInDg</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.Excel" 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.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.Configuration" version="4.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="System.Core" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="System.Data" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="System.Data.DataSetExtensions" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="System.Drawing" version="4.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="neutral" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="System.Numerics" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="System.Runtime.Serialization" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="System.Windows.Forms" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="System.Xml" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
<assemblyIdentity name="System.Xml.Linq" version="4.0.0.0" publicKeyToken="B77A5C561934E089" language="neutral" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ExcelAddInDg.dll" size="31232">
<assemblyIdentity name="ExcelAddInDg" 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>KQTw57W7eCf1bRlzqznnOZX+NUBDcYcxu2G+mAt2UUs=</dsig:DigestValue>
</hash>
</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="NLog.dll" size="918528">
<assemblyIdentity name="NLog" version="6.0.0.0" publicKeyToken="5120E14C03D0593C" 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>fUVUxC0c42T81hAcq/Qspw1fOzK4dd9YKjHzz1ziXgg=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<vstav3:addIn xmlns:vstav3="urn:schemas-microsoft-com:vsta.v3">
<vstav3:entryPointsCollection>
<vstav3:entryPoints>
<vstav3:entryPoint class="ExcelAddInDg.ThisAddIn">
<assemblyIdentity name="ExcelAddInDg" 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="Excel" loadBehavior="3" keyName="ExcelAddInDg">
<vstov4:friendlyName>ExcelAddInDg</vstov4:friendlyName>
<vstov4:description>ExcelAddInDg</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=LJG\Administrator" issuerKeyHash="969545d3b46882fa38a64eca7ca918f832f919bd" /><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>rGO6so57SLvuLugSOtjyb2ydcn+t6v11Zg6E60fswXk=</DigestValue></Reference></SignedInfo><SignatureValue>zHAUgdoiIyYv2ssYeRhy57TxB9mSnIbJnDfy4GK+6Jl62Ltxke2JdyWo63QIJmQVqhM3McAurtAhX4ilXas9Vgwy4R2YiRE+LzYZpL7Glkxj/1WXzrQbRl5ON+BGC1PLfPD3e03xVC5GueF0/pc59bvWDc6hrP4kSJKjOcC+MD4=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>1AGZYZEYWDuHmU4Vm9OeccJ+bItBv/NlZ3LetBM7Ei/CbTpPkxaqfVHkqc7utAtRP/gc79esMCwdKqkKEW992YH9jVwPNvKlODJozJCVrbrOMiMO/cxddn5mRx2K3IwNGSHbqkGOQVnEvr+3T7OYj+88CWJ7ck5QAWqtsyunnCE=</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="79c1ec47eb840e6675fdeaad7f729d6c6ff2d83a12e82eeebb487b8eb2ba63ac" Description="" Url=""><as:assemblyIdentity name="ExcelAddInDg.dll" version="1.0.0.0" publicKeyToken="c95f25e5e8f049ef" language="neutral" processorArchitecture="msil" type="win32" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=LJG\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>oqgUKWgjCbML7ndSLrFlrhY5rDhQhV3JAQzSBEHp1n0=</DigestValue></Reference></SignedInfo><SignatureValue>spY5zIsN3dgfEeY1EMSqLE0tUlxl1cVdlq6zWZidMZtC6cBFKlNXfLd9yM6R6BC2G+K+BOtCVK87cbiY2DjteCpTDRBv2icot5PGNRo/Am1qN1TRgd7gfviXJQNJfZ2zp4uVitIaM95GTxQCyg4Fxe61exdf1dosV2qCMawPdoI=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>1AGZYZEYWDuHmU4Vm9OeccJ+bItBv/NlZ3LetBM7Ei/CbTpPkxaqfVHkqc7utAtRP/gc79esMCwdKqkKEW992YH9jVwPNvKlODJozJCVrbrOMiMO/cxddn5mRx2K3IwNGSHbqkGOQVnEvr+3T7OYj+88CWJ7ck5QAWqtsyunnCE=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIB3TCCAUagAwIBAgIQHQ1DcQBoz4RAl/8DrisoDDANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDHiIATABKAEcAXABBAGQAbQBpAG4AaQBzAHQAcgBhAHQAbwByMB4XDTI1MTEyNzAyMzM0NFoXDTI2MTEyNzA4MzM0NFowLTErMCkGA1UEAx4iAEwASgBHAFwAQQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1AGZYZEYWDuHmU4Vm9OeccJ+bItBv/NlZ3LetBM7Ei/CbTpPkxaqfVHkqc7utAtRP/gc79esMCwdKqkKEW992YH9jVwPNvKlODJozJCVrbrOMiMO/cxddn5mRx2K3IwNGSHbqkGOQVnEvr+3T7OYj+88CWJ7ck5QAWqtsyunnCECAwEAATANBgkqhkiG9w0BAQsFAAOBgQB4wf2tiJxXUwoU8XPKh/Eh/ulJycZLm/2GV9iHvI53C4Eo6q9uUJ17knyLYa/6Q6O+x9A1k5u99Rvdm5K7Q7XkEVYs2gV0739DLgQ9U+9N7edQfhQ5ZAcCHZyF/kz5jGkw0h8YwKNhaczoWqdkL+NbPPEATyHsfYelh2Pk0z1MQg==</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>
\ No newline at end of file
<?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="ExcelAddInDg.vsto" version="1.0.0.0" publicKeyToken="c95f25e5e8f049ef" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="ExcelAddInDg" asmv2:product="ExcelAddInDg" 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="ExcelAddInDg.dll.manifest" size="15224">
<assemblyIdentity name="ExcelAddInDg.dll" version="1.0.0.0" publicKeyToken="c95f25e5e8f049ef" 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>IaG4xQvtQJlxcsqCWNUdmkXWbYR/kGqVYCpkO1UjbIQ=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
<publisherIdentity name="CN=LJG\Administrator" issuerKeyHash="969545d3b46882fa38a64eca7ca918f832f919bd" /><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>499WdZd89XIxEfbh++trYMBz13wBxs9zOCgQXtHt5Nc=</DigestValue></Reference></SignedInfo><SignatureValue>BNeoBqcktwlGgIsBPTjG32jn/5nUcJKS+hdhNBE43oIObkNL1GjncoQFLAatWImX17fF3kUEpyyoPBa1tfJu4d5AGqP8Gd+czLtT3dzmu5KOnXS07uI5qtACxcaLHHMoktwHsP0Z+UDwrglnSVfsUOcNsC1fKgSlPKtvsQTV68M=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>1AGZYZEYWDuHmU4Vm9OeccJ+bItBv/NlZ3LetBM7Ei/CbTpPkxaqfVHkqc7utAtRP/gc79esMCwdKqkKEW992YH9jVwPNvKlODJozJCVrbrOMiMO/cxddn5mRx2K3IwNGSHbqkGOQVnEvr+3T7OYj+88CWJ7ck5QAWqtsyunnCE=</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="d7e4edd15e10283873cfc6017cd773c0606bebfbe1f6113172f57c977556dfe3" Description="" Url=""><as:assemblyIdentity name="ExcelAddInDg.vsto" version="1.0.0.0" publicKeyToken="c95f25e5e8f049ef" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=LJG\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>z2sBjfgeSd7elZ6mMVaEvdEkZHkB4BTe8tgciqSV1O4=</DigestValue></Reference></SignedInfo><SignatureValue>vr7/p5P6QWmPwBXyK5VVlzYiSNIrGEIkYyja4RLVBSjreIIm3liZhCmySGXciAGkk+rSMq6vkW85SPk/+RI3mSlSk3MRvsX8o+Dl8LwehHL7QBHLpydskUXiCUPOWE0KLjUUM+C8CyR9UMe2SC1EqOEYoYp+ggT5UpVxHg4gRz0=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>1AGZYZEYWDuHmU4Vm9OeccJ+bItBv/NlZ3LetBM7Ei/CbTpPkxaqfVHkqc7utAtRP/gc79esMCwdKqkKEW992YH9jVwPNvKlODJozJCVrbrOMiMO/cxddn5mRx2K3IwNGSHbqkGOQVnEvr+3T7OYj+88CWJ7ck5QAWqtsyunnCE=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIB3TCCAUagAwIBAgIQHQ1DcQBoz4RAl/8DrisoDDANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDHiIATABKAEcAXABBAGQAbQBpAG4AaQBzAHQAcgBhAHQAbwByMB4XDTI1MTEyNzAyMzM0NFoXDTI2MTEyNzA4MzM0NFowLTErMCkGA1UEAx4iAEwASgBHAFwAQQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1AGZYZEYWDuHmU4Vm9OeccJ+bItBv/NlZ3LetBM7Ei/CbTpPkxaqfVHkqc7utAtRP/gc79esMCwdKqkKEW992YH9jVwPNvKlODJozJCVrbrOMiMO/cxddn5mRx2K3IwNGSHbqkGOQVnEvr+3T7OYj+88CWJ7ck5QAWqtsyunnCECAwEAATANBgkqhkiG9w0BAQsFAAOBgQB4wf2tiJxXUwoU8XPKh/Eh/ulJycZLm/2GV9iHvI53C4Eo6q9uUJ17knyLYa/6Q6O+x9A1k5u99Rvdm5K7Q7XkEVYs2gV0739DLgQ9U+9N7edQfhQ5ZAcCHZyF/kz5jGkw0h8YwKNhaczoWqdkL+NbPPEATyHsfYelh2Pk0z1MQg==</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
a3f7076c38f50da6ae6311a4d22de0b09f856c94e6e3bad8dadb1890c593a755
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\bin\Debug\ExcelAddInDg.dll
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\bin\Debug\ExcelAddInDg.pdb
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\bin\Debug\ExcelAddInDg.dll.manifest
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\bin\Debug\ExcelAddInDg.vsto
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\bin\Debug\Microsoft.Office.Tools.Common.v4.0.Utilities.dll
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\obj\Debug\ExcelAddInDg.csproj.AssemblyReference.cache
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\obj\Debug\ExcelAddInDg.Properties.Resources.resources
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\obj\Debug\ExcelAddInDg.csproj.GenerateResource.cache
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\obj\Debug\ExcelAddInDg.csproj.CoreCompileInputs.cache
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\obj\Debug\ExcelAdd.0E17C6B6.Up2Date
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\obj\Debug\ExcelAddInDg.dll
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\obj\Debug\ExcelAddInDg.pdb
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\bin\Debug\NLog.dll
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\bin\Debug\NLog.xml
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\bin\Debug\Newtonsoft.Json.dll
C:\Users\Administrator\Desktop\youdatasumCode\ExcelAddInDg\bin\Debug\Newtonsoft.Json.xml
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net472" />
<package id="NLog" version="6.0.6" targetFramework="net472" />
</packages>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
The MIT License (MIT)
Copyright (c) 2007 James Newton-King
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# ![Logo](https://raw.githubusercontent.com/JamesNK/Newtonsoft.Json/master/Doc/icons/logo.jpg) Json.NET
[![NuGet version (Newtonsoft.Json)](https://img.shields.io/nuget/v/Newtonsoft.Json.svg?style=flat-square)](https://www.nuget.org/packages/Newtonsoft.Json/)
[![Build status](https://dev.azure.com/jamesnk/Public/_apis/build/status/JamesNK.Newtonsoft.Json?branchName=master)](https://dev.azure.com/jamesnk/Public/_build/latest?definitionId=8)
Json.NET is a popular high-performance JSON framework for .NET
## Serialize JSON
```csharp
Product product = new Product();
product.Name = "Apple";
product.Expiry = new DateTime(2008, 12, 28);
product.Sizes = new string[] { "Small" };
string json = JsonConvert.SerializeObject(product);
// {
// "Name": "Apple",
// "Expiry": "2008-12-28T00:00:00",
// "Sizes": [
// "Small"
// ]
// }
```
## Deserialize JSON
```csharp
string json = @"{
'Name': 'Bad Boys',
'ReleaseDate': '1995-4-7T00:00:00',
'Genres': [
'Action',
'Comedy'
]
}";
Movie m = JsonConvert.DeserializeObject<Movie>(json);
string name = m.Name;
// Bad Boys
```
## LINQ to JSON
```csharp
JArray array = new JArray();
array.Add("Manual text");
array.Add(new DateTime(2000, 5, 23));
JObject o = new JObject();
o["MyArray"] = array;
string json = o.ToString();
// {
// "MyArray": [
// "Manual text",
// "2000-05-23T00:00:00"
// ]
// }
```
## Links
- [Homepage](https://www.newtonsoft.com/json)
- [Documentation](https://www.newtonsoft.com/json/help)
- [NuGet Package](https://www.nuget.org/packages/Newtonsoft.Json)
- [Release Notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Contributing Guidelines](https://github.com/JamesNK/Newtonsoft.Json/blob/master/CONTRIBUTING.md)
- [License](https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md)
- [Stack Overflow](https://stackoverflow.com/questions/tagged/json.net)
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment