diff --git a/src/Luban.sln b/src/Luban.sln index 31f6197..1564a10 100644 --- a/src/Luban.sln +++ b/src/Luban.sln @@ -21,7 +21,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Luban.Job.Db", "Luban.Job.D EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Excel2TextDiff", "Excel2TextDiff\Excel2TextDiff.csproj", "{9477226F-469E-458F-A3AD-9115D777A65A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Luban.ClientServer", "Luban.ClientServer\Luban.ClientServer.csproj", "{457C22FF-46A5-4E1D-8017-7AE5923868F8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Luban.ClientServer", "Luban.ClientServer\Luban.ClientServer.csproj", "{457C22FF-46A5-4E1D-8017-7AE5923868F8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LubanAssistant", "LubanAssistant\LubanAssistant.csproj", "{353807D5-2074-42CD-AD69-F3F59D359E57}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -69,6 +71,10 @@ Global {457C22FF-46A5-4E1D-8017-7AE5923868F8}.Debug|Any CPU.Build.0 = Debug|Any CPU {457C22FF-46A5-4E1D-8017-7AE5923868F8}.Release|Any CPU.ActiveCfg = Release|Any CPU {457C22FF-46A5-4E1D-8017-7AE5923868F8}.Release|Any CPU.Build.0 = Release|Any CPU + {353807D5-2074-42CD-AD69-F3F59D359E57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {353807D5-2074-42CD-AD69-F3F59D359E57}.Debug|Any CPU.Build.0 = Debug|Any CPU + {353807D5-2074-42CD-AD69-F3F59D359E57}.Release|Any CPU.ActiveCfg = Release|Any CPU + {353807D5-2074-42CD-AD69-F3F59D359E57}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/LubanAssistant/LubanAssistant.csproj b/src/LubanAssistant/LubanAssistant.csproj new file mode 100644 index 0000000..9702613 --- /dev/null +++ b/src/LubanAssistant/LubanAssistant.csproj @@ -0,0 +1,209 @@ + + + + + {BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Debug + AnyCPU + {353807D5-2074-42CD-AD69-F3F59D359E57} + Library + false + LubanAssistant + LubanAssistant + 3 + v4.7.2 + VSTO40 + true + HomeSite + + + + False + Microsoft Visual Studio 2010 Tools for Office Runtime %28x86 and x64%29 + true + + + + + Excel + + + + true + full + false + bin\Debug\ + false + $(DefineConstants);DEBUG;TRACE + 4 + + + + pdbonly + true + bin\Release\ + false + $(DefineConstants);TRACE + 4 + + + + + + + + + + + + + + + + + False + + + False + + + False + + + False + + + False + + + + + True + + + + + False + true + + + False + true + + + False + + + + + + Code + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + + + Code + + + ThisAddIn.cs + + + ThisAddIn.Designer.xml + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/LubanAssistant/Properties/AssemblyInfo.cs b/src/LubanAssistant/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..79ea93b --- /dev/null +++ b/src/LubanAssistant/Properties/AssemblyInfo.cs @@ -0,0 +1,38 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("LubanAssistant")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("LubanAssistant")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +//将 ComVisible 设置为 false 将使此程序集中的类型 +//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("651d9df8-852c-4edb-8632-40f6fc9b6511")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] + diff --git a/src/LubanAssistant/Properties/Resources.Designer.cs b/src/LubanAssistant/Properties/Resources.Designer.cs new file mode 100644 index 0000000..998bc7e --- /dev/null +++ b/src/LubanAssistant/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace LubanAssistant.Properties { + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // 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() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [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("LubanAssistant.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/src/LubanAssistant/Properties/Resources.resx b/src/LubanAssistant/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/src/LubanAssistant/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/src/LubanAssistant/Properties/Settings.Designer.cs b/src/LubanAssistant/Properties/Settings.Designer.cs new file mode 100644 index 0000000..de65ca4 --- /dev/null +++ b/src/LubanAssistant/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace LubanAssistant.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.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; + } + } + } +} diff --git a/src/LubanAssistant/Properties/Settings.settings b/src/LubanAssistant/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/src/LubanAssistant/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/LubanAssistant/ThisAddIn.Designer.cs b/src/LubanAssistant/ThisAddIn.Designer.cs new file mode 100644 index 0000000..72c502a --- /dev/null +++ b/src/LubanAssistant/ThisAddIn.Designer.cs @@ -0,0 +1,237 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 414 +namespace LubanAssistant { + + + /// + [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", "16.0.0.0")] + private global::System.Object missing = global::System.Type.Missing; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.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", "16.0.0.0")] + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] + protected override void Initialize() { + base.Initialize(); + this.Application = this.GetHostItem(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", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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", "16.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", "16.0.0.0")] + internal sealed partial class ThisRibbonCollection : Microsoft.Office.Tools.Ribbon.RibbonCollectionBase { + + /// + internal ThisRibbonCollection(global::Microsoft.Office.Tools.Ribbon.RibbonFactory factory) : + base(factory) { + } + } +} diff --git a/src/LubanAssistant/ThisAddIn.Designer.xml b/src/LubanAssistant/ThisAddIn.Designer.xml new file mode 100644 index 0000000..c3327b0 --- /dev/null +++ b/src/LubanAssistant/ThisAddIn.Designer.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/LubanAssistant/ThisAddIn.cs b/src/LubanAssistant/ThisAddIn.cs new file mode 100644 index 0000000..9aa8a08 --- /dev/null +++ b/src/LubanAssistant/ThisAddIn.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Xml.Linq; +using Excel = Microsoft.Office.Interop.Excel; +using Office = Microsoft.Office.Core; +using Microsoft.Office.Tools.Excel; + +namespace LubanAssistant +{ + public partial class ThisAddIn + { + private void ThisAddIn_Startup(object sender, System.EventArgs e) + { + } + + private void ThisAddIn_Shutdown(object sender, System.EventArgs e) + { + } + + #region VSTO 生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InternalStartup() + { + this.Startup += new System.EventHandler(ThisAddIn_Startup); + this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown); + } + + #endregion + } +}