CrazyIter_Bin 1 سال پیش
والد
کامیت
d803500435

+ 83 - 5
HTEXLabel/HTEXLabel.csproj

@@ -26,21 +26,22 @@
     <NoStandardLibraries>false</NoStandardLibraries>
     <RootNamespace>HTEXLabel</RootNamespace>
     <AssemblyName>HTEXLabel</AssemblyName>
-    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
     <DefineConstants>VSTO40</DefineConstants>
     <IsWebBootstrapper>False</IsWebBootstrapper>
+    <TargetFrameworkProfile />
     <BootstrapperEnabled>true</BootstrapperEnabled>
     <PublishUrl>publish\</PublishUrl>
     <InstallUrl />
     <TargetCulture>zh-chs</TargetCulture>
-    <ApplicationVersion>1.0.0.1</ApplicationVersion>
+    <ApplicationVersion>1.0.0.3</ApplicationVersion>
     <AutoIncrementApplicationRevision>true</AutoIncrementApplicationRevision>
     <UpdateEnabled>true</UpdateEnabled>
     <UpdateInterval>7</UpdateInterval>
     <UpdateIntervalUnits>days</UpdateIntervalUnits>
     <ProductName>HTEXLabel</ProductName>
-    <PublisherName />
-    <SupportUrl />
+    <PublisherName>醍摩豆(成都)信息技术有限公司</PublisherName>
+    <SupportUrl>https://www.habook.com.cn</SupportUrl>
     <FriendlyName>HTEXLabel</FriendlyName>
     <OfficeApplicationDescription />
     <LoadBehavior>3</LoadBehavior>
@@ -51,6 +52,11 @@
       <ProductName>Microsoft .NET Framework 4.5.2 %28x86 和 x64%29</ProductName>
       <Install>true</Install>
     </BootstrapperPackage>
+    <BootstrapperPackage Include=".NETFramework,Version=v4.8">
+      <Visible>False</Visible>
+      <ProductName>Microsoft .NET Framework 4.8 %28x86 和 x64%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
     <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
       <Visible>False</Visible>
       <ProductName>.NET Framework 3.5 SP1</ProductName>
@@ -123,15 +129,74 @@
   -->
   <ItemGroup>
     <Reference Include="Accessibility" />
+    <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\Microsoft.Bcl.AsyncInterfaces.1.1.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.IdentityModel.Abstractions, Version=7.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\Microsoft.IdentityModel.Abstractions.7.0.3\lib\net472\Microsoft.IdentityModel.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=7.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\Microsoft.IdentityModel.JsonWebTokens.7.0.3\lib\net472\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.IdentityModel.Logging, Version=7.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\Microsoft.IdentityModel.Logging.7.0.3\lib\net472\Microsoft.IdentityModel.Logging.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.IdentityModel.Tokens, Version=7.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\Microsoft.IdentityModel.Tokens.7.0.3\lib\net472\Microsoft.IdentityModel.Tokens.dll</HintPath>
+    </Reference>
+    <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="Newtonsoft.Json.Bson, Version=1.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\Newtonsoft.Json.Bson.1.0.2\lib\net45\Newtonsoft.Json.Bson.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
+    <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
+    </Reference>
     <Reference Include="System.Data" />
     <Reference Include="System.Drawing" />
+    <Reference Include="System.IdentityModel.Tokens.Jwt, Version=7.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.IdentityModel.Tokens.Jwt.7.0.3\lib\net472\System.IdentityModel.Tokens.Jwt.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Net.Http.Formatting, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\Microsoft.AspNet.WebApi.Client.6.0.0\lib\net45\System.Net.Http.Formatting.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Numerics" />
+    <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Text.Encodings.Web, Version=4.0.5.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Text.Encodings.Web.4.7.2\lib\net461\System.Text.Encodings.Web.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Text.Json, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Text.Json.4.7.2\lib\net461\System.Text.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
+    </Reference>
     <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" />
+    <Reference Include="zxing, Version=0.16.9.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\ZXing.Net.0.16.9\lib\net48\zxing.dll</HintPath>
+    </Reference>
+    <Reference Include="zxing.presentation, Version=0.16.9.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\ZXing.Net.0.16.9\lib\net48\zxing.presentation.dll</HintPath>
+    </Reference>
   </ItemGroup>
   <ItemGroup>
     <Reference Include="Microsoft.Office.Tools.v4.0.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
@@ -179,6 +244,9 @@
     can be found.
   -->
   <ItemGroup>
+    <Compile Include="KnowledgeUserControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
     <Compile Include="LableRibbon.cs" />
     <Compile Include="Properties\AssemblyInfo.cs">
       <SubType>Code</SubType>
@@ -191,8 +259,11 @@
     <Compile Include="Properties\Resources.Designer.cs">
       <AutoGen>True</AutoGen>
       <DependentUpon>Resources.resx</DependentUpon>
+      <DesignTime>True</DesignTime>
     </Compile>
+    <None Include="app.config" />
     <None Include="HTEXLabel_TemporaryKey.pfx" />
+    <None Include="packages.config" />
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -200,6 +271,10 @@
     <Compile Include="Properties\Settings.Designer.cs">
       <AutoGen>True</AutoGen>
       <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <Compile Include="QRCodeForm.cs">
+      <SubType>Form</SubType>
     </Compile>
     <Compile Include="ThisAddIn.cs">
       <SubType>Code</SubType>
@@ -221,6 +296,9 @@
   <ItemGroup>
     <EmbeddedResource Include="LableRibbon-en.xml" />
   </ItemGroup>
+  <ItemGroup>
+    <Content Include="logo.jpg" />
+  </ItemGroup>
   <PropertyGroup>
     <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
     <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
@@ -244,7 +322,7 @@
       <FlavorProperties GUID="{BAA0C2D2-18E2-41B9-852F-F413020CAA33}">
         <ProjectProperties HostName="Word" HostPackage="{29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1}" OfficeVersion="15.0" VstxVersion="4.0" ApplicationType="Word" Language="cs" TemplatesPath="" DebugInfoExeName="#Software\Microsoft\Office\16.0\Word\InstallRoot\Path#WINWORD.EXE" DebugInfoCommandLine="/x" AddItemTemplatesGuid="{51063C3A-E220-4D12-8922-BDA915ACD783}" />
         <Host Name="Word" GeneratedCodeNamespace="HTEXLabel" PublishedHash="69C324AB27932AA2FBF2B7EA72250886FF164DE6" IconIndex="0">
-          <HostItem Name="ThisAddIn" Code="ThisAddIn.cs" CanonicalName="AddIn" CanActivate="false" IconIndex="1" Blueprint="ThisAddIn.Designer.xml" GeneratedCode="ThisAddIn.Designer.cs" PublishedHash="6730F9887ABD9336BC33CEF5CF3924B75E5E67A1" />
+          <HostItem Name="ThisAddIn" Code="ThisAddIn.cs" CanonicalName="AddIn" PublishedHash="67E07227304C803C9625276602498E3F1977AC57" CanActivate="false" IconIndex="1" Blueprint="ThisAddIn.Designer.xml" GeneratedCode="ThisAddIn.Designer.cs" />
         </Host>
       </FlavorProperties>
     </VisualStudio>

+ 38 - 0
HTEXLabel/KnowledgeUserControl.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace HTEXLabel
+{
+    public class KnowledgeUserControl: UserControl
+    {
+        public KnowledgeUserControl()
+        {
+            InitializeTreeView();
+        }
+        private void InitializeTreeView()
+        {
+            // 创建一个 TreeView 控件
+            TreeView treeView = new TreeView();
+            treeView.Dock = DockStyle.Fill; // 填充 UserControl1 的整个区域
+
+            // 添加根节点
+            TreeNode rootNode = new TreeNode("Root");
+            treeView.Nodes.Add(rootNode);
+
+            // 添加子节点
+            TreeNode childNode1 = new TreeNode("Child 1");
+            TreeNode childNode2 = new TreeNode("Child 2");
+            rootNode.Nodes.Add(childNode1);
+            rootNode.Nodes.Add(childNode2);
+
+            // 添加更多的节点...
+
+            // 将 TreeView 添加到 UserControl1 的 Controls 集合中
+            this.Controls.Add(treeView);
+        }
+    }
+}

+ 5 - 2
HTEXLabel/LableRibbon-cn.xml

@@ -30,12 +30,15 @@
 					<button id="analysis" label="解析" tag="解析" imageMso="ShowClipboard"  size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="score" label="配分" tag="配分"  imageMso="EquationMatrixGallery" size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="point" label="知识点" tag="知识点"  imageMso="SmartArtChangeColorsGallery" size="large"   onAction="OnButtonClick" visible="true" />
-					<button id="true" label="对" tag="对"  imageMso="Delete" size="large"   onAction="OnButtonClick" visible="true" />
-					<button id="false" label="错" tag="错" imageMso="TagMarkComplete" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="true" label="对" tag="对"  imageMso="TagMarkComplete" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="false" label="错" tag="错" imageMso="Delete" size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="ended" label="结束" tag="结束" imageMso="DiagramTargetInsertClassic" size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="level" label="难度" tag="难度" imageMso="LinkBarCustom"  size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="count" label="填空数" tag="填空数" imageMso="DesignXml" size="large"   onAction="OnButtonClick" visible="true" />
 				</group>
+				<group id="UserGroup" label="用户信息" tag="用户信息" autoScale="true" visible="true">
+					<button  id="qrcode" label="登录" tag="登录" imageMso="ShapeFillTextureGallery" size="large" onAction="ShowQRCodeForm" enabled="true" showImage="true" showLabel="true"  visible="true" />
+				</group>
 				<!--<group id="CheckGroup" label="功能" tag="功能" autoScale="true" visible="true">
 					<button id="check" label="检查标记" tag="检查标记" imageMso="MailMergeResultsPreview"  size="large"   onAction="OnButtonCheck" visible="true"  />
 				</group>-->

+ 2 - 2
HTEXLabel/LableRibbon-en.xml

@@ -29,8 +29,8 @@
 					<button id="analysis" label="Explain" tag="Explain" imageMso="ShowClipboard"  size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="score" label="Score" tag="Score"  imageMso="EquationMatrixGallery" size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="point" label="Point" tag="Point"  imageMso="SmartArtChangeColorsGallery" size="large"   onAction="OnButtonClick" visible="true" />
-					<button id="true" label="True" tag="True"  imageMso="Delete" size="large"   onAction="OnButtonClick" visible="true" />
-					<button id="false" label="False" tag="False" imageMso="TagMarkComplete" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="true" label="True" tag="True"  imageMso="TagMarkComplete" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="false" label="False" tag="False" imageMso="Delete" size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="ended" label="Ended" tag="Ended" imageMso="DiagramTargetInsertClassic" size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="level" label="Level" tag="Level" imageMso="LinkBarCustom"  size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="count" label="Count" tag="Count" imageMso="DesignXml" size="large"   onAction="OnButtonClick" visible="true" />

+ 2 - 2
HTEXLabel/LableRibbon-tw.xml

@@ -29,8 +29,8 @@
 					<button id="analysis" label="解析" tag="解析" imageMso="ShowClipboard"  size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="score" label="配分" tag="配分"  imageMso="EquationMatrixGallery" size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="point" label="知識點" tag="知識點"  imageMso="SmartArtChangeColorsGallery" size="large"   onAction="OnButtonClick" visible="true" />
-					<button id="true" label="對" tag="對"  imageMso="Delete" size="large"   onAction="OnButtonClick" visible="true" />
-					<button id="false" label="錯" tag="錯" imageMso="TagMarkComplete" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="true" label="對" tag="對"  imageMso="TagMarkComplete" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="false" label="錯" tag="錯" imageMso="Delete" size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="ended" label="結束" tag="結束" imageMso="DiagramTargetInsertClassic" size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="level" label="難度" tag="難度" imageMso="LinkBarCustom"  size="large"   onAction="OnButtonClick" visible="true" />
 					<button id="count" label="填空數" tag="填空數" imageMso="DesignXml" size="large"   onAction="OnButtonClick" visible="true" />

+ 38 - 9
HTEXLabel/LableRibbon.cs

@@ -1,5 +1,6 @@
 using Microsoft.Office.Core;
 using Microsoft.Office.Interop.Word;
+using Microsoft.Office.Tools.Ribbon;
 using System;
 using System.Collections.Generic;
 using System.IO;
@@ -7,6 +8,7 @@ using System.Linq;
 using System.Reflection;
 using System.Runtime.InteropServices;
 using System.Text;
+using System.Windows.Forms;
 using Office = Microsoft.Office.Core;
 
 // TODO:   按照以下步骤启用功能区(XML)项:
@@ -37,8 +39,10 @@ namespace HTEXLabel
 
         public LableRibbon()
         {
+            
         }
 
+        
         #region IRibbonExtensibility 成员
 
         public string GetCustomUI(string ribbonID)
@@ -66,8 +70,6 @@ namespace HTEXLabel
                    // System.Windows.Forms.MessageBox.Show("未知的 Office 语言版本:" + languageId.ToString());
                     return GetResourceText("HTEXLabel.LableRibbon-en.xml");
             }
-           
-          
         }
 
         #endregion
@@ -75,7 +77,7 @@ namespace HTEXLabel
         #region 功能区回调
         //在此处创建回叫方法。有关添加回叫方法的详细信息,请访问 https://go.microsoft.com/fwlink/?LinkID=271226
 
-        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
+        public void Ribbon_Load(IRibbonUI ribbonUI)
         {
             this.ribbon = ribbonUI;
         }
@@ -86,6 +88,7 @@ namespace HTEXLabel
 
         private static string GetResourceText(string resourceName)
         {
+           
             Assembly asm = Assembly.GetExecutingAssembly();
             string[] resourceNames = asm.GetManifestResourceNames();
             for (int i = 0; i < resourceNames.Length; ++i)
@@ -103,12 +106,13 @@ namespace HTEXLabel
             }
             return null;
         }
-
+    
 
         public void OnButtonCheck(Office.IRibbonControl control)
         {
             Document currentDocument = Globals.ThisAddIn.Application.ActiveDocument;
-            var a = currentDocument.XMLNodes;
+         
+              var a = currentDocument.XMLNodes;
            var ass = a.ToString();
             // 创建一个新的 Open XML 文档
            
@@ -148,10 +152,35 @@ namespace HTEXLabel
             else {
                 selection.TypeText("{" + buttonTag + "}");
             }
-            
-
-
-            
+        }
+        public void ShowQRCodeForm(IRibbonControl control)
+        {
+          
+            // 创建 Windows Forms 窗口
+            using (QRCodeForm qrCodeForm = new QRCodeForm())
+            {
+               
+                CenterFormOnScreen(qrCodeForm);
+                qrCodeForm.MaximizeBox = false;
+                qrCodeForm.MinimizeBox = false;
+                // 设置窗体的边框样式
+                qrCodeForm.FormBorderStyle = FormBorderStyle.FixedSingle;
+                qrCodeForm.Width=215;
+                qrCodeForm.Height=240;
+                // 显示窗口
+                qrCodeForm.ShowDialog();
+                
+            }
+        }
+        public void CenterFormOnScreen(QRCodeForm qrCodeForm)
+        {
+            // 获取屏幕的工作区域
+            var  workingArea = System.Windows.Forms.Screen.GetWorkingArea(qrCodeForm);
+            // 计算窗体应该显示的位置
+            int x = (workingArea.Width - qrCodeForm.Width) / 2 + workingArea.Left;
+            int y = (workingArea.Height - qrCodeForm.Height) / 2 + workingArea.Top;
+            // 设置窗体位置
+            qrCodeForm.Location = new System.Drawing.Point(x,y);
         }
         #endregion
     }

+ 7 - 6
HTEXLabel/Properties/AssemblyInfo.cs

@@ -1,4 +1,5 @@
-using System.Reflection;
+using System.Resources;
+using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 using System.Security;
@@ -7,12 +8,12 @@ using System.Security;
 // 控制。更改这些特性值可修改
 // 与程序集关联的信息。
 [assembly: AssemblyTitle("HTEXLabel")]
-[assembly: AssemblyDescription("")]
+[assembly: AssemblyDescription("醍摩豆题目标签标记插件")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany("醍摩豆(成都)信息技术有限公司")]
 [assembly: AssemblyProduct("HTEXLabel")]
-[assembly: AssemblyCopyright("Copyright ©  2024")]
-[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCopyright("Copyright ©  2024 HABOOK Group. All rights reserved.")]
+[assembly: AssemblyTrademark("醍摩豆(成都)信息技术有限公司")]
 [assembly: AssemblyCulture("")]
 
 //将 ComVisible 设置为 false 将使此程序集中的类型
@@ -35,4 +36,4 @@ using System.Security;
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
-
+[assembly: NeutralResourcesLanguage("")]

+ 5 - 5
HTEXLabel/Properties/Settings.Designer.cs

@@ -1,10 +1,10 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
+//     此代码由工具生成。
+//     运行时版本:4.0.30319.42000
 //
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
+//     对此文件的更改可能会导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
 // </auto-generated>
 //------------------------------------------------------------------------------
 
@@ -12,7 +12,7 @@ namespace HTEXLabel.Properties {
     
     
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.0.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0")]
     internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
         
         private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 113 - 0
HTEXLabel/QRCodeForm.cs


+ 19 - 56
HTEXLabel/ThisAddIn.cs

@@ -7,31 +7,36 @@ using Word = Microsoft.Office.Interop.Word;
 using Office = Microsoft.Office.Core;
 using Microsoft.Office.Tools.Word;
 using Microsoft.Office.Core;
+using System.Windows.Forms;
+using Microsoft.Office.Tools;
+using Microsoft.Office.Tools.Ribbon;
 
 namespace HTEXLabel
 {
+
     public partial class ThisAddIn
     {
-        private Office.CommandBar customNavBar;
-        private LableRibbon myRibbon;
         private void ThisAddIn_Startup(object sender, System.EventArgs e)
         {
-            //AddCustomNavBar();
-            LoadRibbon();
-        }
-        private  void LoadRibbon()
-        {
-            // 在这里加载自定义 Ribbon
-            
+
+               KnowledgeUserControl knowledgeUserControl = new KnowledgeUserControl();
+            Microsoft.Office.Tools.CustomTaskPane myCustomTaskPane =
+            this.CustomTaskPanes.Add(knowledgeUserControl, "My Custom Task Pane");
+            // 可选:设置自定义功能面板的属性
+            myCustomTaskPane.Visible = true;
+        
+
         }
+       
         private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
         {
         }
 
         protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
-  {
-      return new LableRibbon();
-  }
+        {
+            //return Globals.Factory.GetRibbonFactory().CreateRibbonManager(new Microsoft.Office.Tools.Ribbon.IRibbonExtension[] {  });
+            return new LableRibbon();
+        }
 
         #region VSTO 生成的代码
 
@@ -48,50 +53,8 @@ namespace HTEXLabel
         #endregion
 
 
-        private void AddCustomNavBar()
-        {
-            customNavBar = this.Application.CommandBars.Add("CustomNavBar", MsoBarPosition.msoBarTop, System.Type.Missing, true);
-            customNavBar.Visible = true;
-
-            // 添加按钮和分组,可以根据需要添加更多的按钮和分组
-            AddButton("单选题", "插入单选题");
-            AddButton("多选题", "插入多选题");
-            AddButton("判断题", "插入判断题");
-
-
-            AddButton("记忆", "插入记忆");
-            AddButton("创造", "插入创造");
-            AddButton("应用", "插入应用");
+          
 
-            
-
-            AddButton("答案", "插入答案");
-            AddButton("解析", "插入解析");
-            AddButton("知识点", "插入知识点");
-        }
-        private void AddButton(string buttonName, string buttonCaption)
-        {
-            CommandBarButton button = (CommandBarButton)customNavBar.Controls.Add(MsoControlType.msoControlButton, System.Type.Missing, System.Type.Missing, 1, true);
-            button.Style = MsoButtonStyle.msoButtonCaption;
-            button.Caption = buttonCaption;
-            button.Tag = buttonName;
-            button.Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(Button_Click);
-        }
-
-        private void Button_Click(CommandBarButton Ctrl, ref bool CancelDefault)
-        {
-            // 在这里根据按钮的 Tag 属性执行相应的操作
-            string buttonName = Ctrl.Tag.ToString();
-            InsertContent(buttonName);
-        }
-
-        private void InsertContent(string content)
-        {
-            // 获取当前文档的光标位置
-            Word.Selection selection = this.Application.Selection;
-
-            // 在光标位置插入内容
-            selection.TypeText("{" + content + "}");
-        }
+        
     }
 }

+ 35 - 0
HTEXLabel/app.config

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.5.1" newVersion="4.0.5.1" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+</configuration>

BIN
HTEXLabel/logo.jpg


+ 21 - 0
HTEXLabel/packages.config

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net48" />
+  <package id="Microsoft.Bcl.AsyncInterfaces" version="1.1.0" targetFramework="net48" />
+  <package id="Microsoft.IdentityModel.Abstractions" version="7.0.3" targetFramework="net48" />
+  <package id="Microsoft.IdentityModel.JsonWebTokens" version="7.0.3" targetFramework="net48" />
+  <package id="Microsoft.IdentityModel.Logging" version="7.0.3" targetFramework="net48" />
+  <package id="Microsoft.IdentityModel.Tokens" version="7.0.3" targetFramework="net48" />
+  <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
+  <package id="Newtonsoft.Json.Bson" version="1.0.2" targetFramework="net48" />
+  <package id="System.Buffers" version="4.5.1" targetFramework="net48" />
+  <package id="System.IdentityModel.Tokens.Jwt" version="7.0.3" targetFramework="net48" />
+  <package id="System.Memory" version="4.5.5" targetFramework="net48" />
+  <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
+  <package id="System.Runtime.CompilerServices.Unsafe" version="4.7.1" targetFramework="net48" />
+  <package id="System.Text.Encodings.Web" version="4.7.2" targetFramework="net48" />
+  <package id="System.Text.Json" version="4.7.2" targetFramework="net48" />
+  <package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
+  <package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
+  <package id="ZXing.Net" version="0.16.9" targetFramework="net48" />
+</packages>

+ 0 - 9
HTEXMark/App.xaml

@@ -1,9 +0,0 @@
-<Application x:Class="HTEXMark.App"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:local="clr-namespace:HTEXMark"
-             StartupUri="MainWindow.xaml">
-    <Application.Resources>
-         
-    </Application.Resources>
-</Application>

+ 0 - 17
HTEXMark/App.xaml.cs

@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace HTEXMark
-{
-    /// <summary>
-    /// Interaction logic for App.xaml
-    /// </summary>
-    public partial class App : Application
-    {
-    }
-}

+ 0 - 10
HTEXMark/AssemblyInfo.cs

@@ -1,10 +0,0 @@
-using System.Windows;
-
-[assembly: ThemeInfo(
-    ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
-                                     //(used if a resource is not found in the page,
-                                     // or application resource dictionaries)
-    ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
-                                              //(used if a resource is not found in the page,
-                                              // app, or any theme specific resource dictionaries)
-)]

+ 0 - 9
HTEXMark/HTEXMark.csproj

@@ -1,9 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <PropertyGroup>
-    <OutputType>WinExe</OutputType>
-    <TargetFramework>net5.0-windows</TargetFramework>
-    <UseWPF>true</UseWPF>
-  </PropertyGroup>
-
-</Project>

+ 0 - 12
HTEXMark/MainWindow.xaml

@@ -1,12 +0,0 @@
-<Window x:Class="HTEXMark.MainWindow"
-        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        xmlns:local="clr-namespace:HTEXMark"
-        mc:Ignorable="d"
-        Title="MainWindow" Height="450" Width="800">
-    <Grid Margin="0,129,0,0">
-
-    </Grid>
-</Window>

+ 0 - 28
HTEXMark/MainWindow.xaml.cs

@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace HTEXMark
-{
-    /// <summary>
-    /// Interaction logic for MainWindow.xaml
-    /// </summary>
-    public partial class MainWindow : Window
-    {
-        public MainWindow()
-        {
-            InitializeComponent();
-        }
-    }
-}

+ 0 - 14
TEAMModelHTEX.sln

@@ -15,8 +15,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HTEXWeb", "HTEXWeb\HTEXWeb.
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HTEXScan", "HTEXScan\HTEXScan.csproj", "{42ACD89C-DB3F-4B0B-BB8D-1245E3E0120B}"
 EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HTEXMark", "HTEXMark\HTEXMark.csproj", "{5F3B59A5-3515-473B-A513-2C51E2A4CCFB}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WordToHtml", "WordToHtml\WordToHtml.csproj", "{D09A711F-119D-4D53-AE86-E5515BB46FD8}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlobDownload", "BlobDownload\BlobDownload.csproj", "{42440AA9-F182-4AE4-93FE-D26F1663CBBB}"
@@ -109,18 +107,6 @@ Global
 		{42ACD89C-DB3F-4B0B-BB8D-1245E3E0120B}.Release|iPhone.Build.0 = Release|Any CPU
 		{42ACD89C-DB3F-4B0B-BB8D-1245E3E0120B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
 		{42ACD89C-DB3F-4B0B-BB8D-1245E3E0120B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
-		{5F3B59A5-3515-473B-A513-2C51E2A4CCFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{5F3B59A5-3515-473B-A513-2C51E2A4CCFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{5F3B59A5-3515-473B-A513-2C51E2A4CCFB}.Debug|iPhone.ActiveCfg = Debug|Any CPU
-		{5F3B59A5-3515-473B-A513-2C51E2A4CCFB}.Debug|iPhone.Build.0 = Debug|Any CPU
-		{5F3B59A5-3515-473B-A513-2C51E2A4CCFB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
-		{5F3B59A5-3515-473B-A513-2C51E2A4CCFB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
-		{5F3B59A5-3515-473B-A513-2C51E2A4CCFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{5F3B59A5-3515-473B-A513-2C51E2A4CCFB}.Release|Any CPU.Build.0 = Release|Any CPU
-		{5F3B59A5-3515-473B-A513-2C51E2A4CCFB}.Release|iPhone.ActiveCfg = Release|Any CPU
-		{5F3B59A5-3515-473B-A513-2C51E2A4CCFB}.Release|iPhone.Build.0 = Release|Any CPU
-		{5F3B59A5-3515-473B-A513-2C51E2A4CCFB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
-		{5F3B59A5-3515-473B-A513-2C51E2A4CCFB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
 		{D09A711F-119D-4D53-AE86-E5515BB46FD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{D09A711F-119D-4D53-AE86-E5515BB46FD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{D09A711F-119D-4D53-AE86-E5515BB46FD8}.Debug|iPhone.ActiveCfg = Debug|Any CPU