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

+ 252 - 0
HTEXLabel/HTEXLabel.csproj

@@ -0,0 +1,252 @@
+<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>{D7EEB2A3-1CD2-448C-9E21-C24BA5C875F9}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <NoStandardLibraries>false</NoStandardLibraries>
+    <RootNamespace>HTEXLabel</RootNamespace>
+    <AssemblyName>HTEXLabel</AssemblyName>
+    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
+    <DefineConstants>VSTO40</DefineConstants>
+    <IsWebBootstrapper>False</IsWebBootstrapper>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+    <PublishUrl>publish\</PublishUrl>
+    <InstallUrl />
+    <TargetCulture>zh-chs</TargetCulture>
+    <ApplicationVersion>1.0.0.1</ApplicationVersion>
+    <AutoIncrementApplicationRevision>true</AutoIncrementApplicationRevision>
+    <UpdateEnabled>true</UpdateEnabled>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>days</UpdateIntervalUnits>
+    <ProductName>HTEXLabel</ProductName>
+    <PublisherName />
+    <SupportUrl />
+    <FriendlyName>HTEXLabel</FriendlyName>
+    <OfficeApplicationDescription />
+    <LoadBehavior>3</LoadBehavior>
+  </PropertyGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
+      <Visible>False</Visible>
+      <ProductName>Microsoft .NET Framework 4.5.2 %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>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.VSTORuntime.4.0">
+      <Visible>False</Visible>
+      <ProductName>Microsoft Visual Studio 2010 Tools for Office Runtime %28x86 和 x64%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <PropertyGroup>
+    <!--
+      OfficeApplication
+        Add-in host application
+    -->
+    <OfficeApplication>Word</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="System" />
+    <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.Word, 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>
+  <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.Word, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
+      <Private>False</Private>
+      <EmbedInteropTypes>true</EmbedInteropTypes>
+    </Reference>
+    <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="LableRibbon.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="HTEXLabel_TemporaryKey.pfx" />
+    <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>
+  <ItemGroup>
+    <EmbeddedResource Include="LableRibbon-cn.xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="LableRibbon-tw.xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="LableRibbon-en.xml" />
+  </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>HTEXLabel_TemporaryKey.pfx</ManifestKeyFile>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ManifestCertificateThumbprint>73F8D64F54F20EF5A3DCB6D98FC7D4058B475F18</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="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" />
+        </Host>
+      </FlavorProperties>
+    </VisualStudio>
+  </ProjectExtensions>
+</Project>

+ 46 - 0
HTEXLabel/LableRibbon-cn.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
+	<ribbon>
+		
+		<tabs>
+			<tab id="LableTab" label="题目标记" tag="题目标记">
+				<group id="TypeGroup" label="题目类型" tag="题目类型" autoScale="true" visible="true" insertBeforeQ="TabWordDesign">
+					<button id="single" label="单选题" tag="单选题"  imageMso="Bullets" size="large"    onAction="OnButtonClick" visible="true"  />
+					<button id="multiple" label="多选题" tag="多选题"  imageMso="DiagramRadialInsertClassic"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="judge" label="判断题" tag="判断题" imageMso="SetPertWeights" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="subjective" label="问答题" tag="问答题"  imageMso="WindowUnhide"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="complete" label="填空题" tag="填空题" imageMso="FrameCreateAbove" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="correct" label="改错题" tag="改错题" imageMso="TagMarkComplete" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="draw" label="作图题" tag="作图题" imageMso="MsnLogo"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="connector" label="连线题" tag="连线题" imageMso="ModuleInsert"   size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="compose" label="综合题" tag="综合题" imageMso="ChangeBinding" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="sortmultiple" label="有序多选题" tag="有序多选题"  imageMso="SmartArtChangeColorsGallery"  size="large"   onAction="OnButtonClick" visible="true" />
+				</group>
+				<group id="TaxonomyGroup" label="认知层次" tag="认知层次" autoScale="true" visible="true" >
+					<button id="remember" label="记忆" tag="记忆" imageMso="AutoFormat"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="understand" label="理解" tag="理解" imageMso="ShapeCloud" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="apply" label="应用" tag="应用"  imageMso="VisualBasicReferences"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="analyze" label="分析" tag="分析" imageMso="ChartRadarChart"  size="large"   onAction="OnButtonClick" visible="true"  />
+					<button id="evaluate" label="评价" tag="评价" imageMso="SlideMasterClipArtPlaceholderInsert"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="create" label="创造" tag="创造"  imageMso="TableDesign" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="taxonomy" label="认知层次" tag="认知层次"  imageMso="ObjectsGroup"  size="large"   onAction="OnButtonClick" visible="true" />
+				</group>
+				<group id="ToolGroup" label="其他标记" tag="其他标记" autoScale="true" visible="true">
+					<button id="answer" label="答案" tag="答案" imageMso="MailMergeResultsPreview"  size="large"   onAction="OnButtonClick" visible="true"  />
+					<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="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="CheckGroup" label="功能" tag="功能" autoScale="true" visible="true">
+					<button id="check" label="检查标记" tag="检查标记" imageMso="MailMergeResultsPreview"  size="large"   onAction="OnButtonCheck" visible="true"  />
+				</group>-->
+			</tab>
+		</tabs>
+	</ribbon>
+</customUI>
+

+ 42 - 0
HTEXLabel/LableRibbon-en.xml

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
+	<ribbon>
+		<tabs>
+			<tab id="LableTab" label="MarkQuestion" tag="MarkQuestion">
+				<group id="TypeGroup" label="QuestionType" tag="QuestionType" autoScale="true" insertBeforeQ="TabWordDesign">
+					<button id="single" label="MultipleChoice" tag="MultipleChoice"  imageMso="Bullets" size="large"    onAction="OnButtonClick" visible="true"  />
+					<button id="multiple" label="MultipleAnswers" tag="MultipleAnswers"  imageMso="DiagramRadialInsertClassic"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="judge" label="TrueFalse" tag="TrueFalse" imageMso="SetPertWeights" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="subjective" label="Essay" tag="Essay"  imageMso="WindowUnhide"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="complete" label="Blank" tag="Blank" imageMso="FrameCreateAbove" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="correct" label="Correct" tag="Correct" imageMso="TagMarkComplete" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="draw" label="Draw" tag="Draw" imageMso="MsnLogo"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="connector" label="Connector" tag="Connector" imageMso="ModuleInsert"   size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="compose" label="QuestionGroup" tag="QuestionGroup" imageMso="ChangeBinding" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="sortmultiple" label="SortMultipleAnswers" tag="SortMultipleAnswers"  imageMso="SmartArtChangeColorsGallery"  size="large"   onAction="OnButtonClick" visible="true" />
+				</group>
+				<group id="TaxonomyGroup" label="Taxonomy" tag="Taxonomy"  autoScale="true">
+					<button id="remember" label="Remember" tag="Remember" imageMso="AutoFormat"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="understand" label="Understand" tag="Understand" imageMso="ShapeCloud" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="apply" label="Apply" tag="Apply"  imageMso="VisualBasicReferences"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="analyze" label="Analyze" tag="Analyze" imageMso="ChartRadarChart"  size="large"   onAction="OnButtonClick" visible="true"  />
+					<button id="evaluate" label="Evaluate" tag="Evaluate" imageMso="SlideMasterClipArtPlaceholderInsert"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="create" label="Create" tag="Create"  imageMso="TableDesign" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="taxonomy" label="Taxonomy" tag="Taxonomy"  imageMso="ObjectsGroup"  size="large"   onAction="OnButtonClick" visible="true" />
+				</group>
+				<group id="ToolGroup" label="Functional" tag="Functional" autoScale="true">
+					<button id="answer" label="Answer" tag="Answer" imageMso="MailMergeResultsPreview"  size="large"   onAction="OnButtonClick" visible="true"  />
+					<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="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" />
+				</group>
+			</tab>
+		</tabs>
+	</ribbon>
+</customUI>
+

+ 42 - 0
HTEXLabel/LableRibbon-tw.xml

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
+	<ribbon>
+		<tabs>
+			<tab id="LableTab" label="標記題目" tag="標記題目">
+				<group id="TypeGroup" label="題目類型" tag="題目類型" autoScale="true" insertBeforeQ="TabWordDesign">
+					<button id="single" label="選擇題" tag="選擇題"  imageMso="Bullets" size="large"    onAction="OnButtonClick" visible="true"  />
+					<button id="multiple" label="複選題" tag="複選題"  imageMso="DiagramRadialInsertClassic"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="judge" label="是非題" tag="是非題" imageMso="SetPertWeights" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="subjective" label="問答題" tag="問答題"  imageMso="WindowUnhide"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="complete" label="填充題" tag="填充題" imageMso="FrameCreateAbove" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="correct" label="改錯題" tag="改錯題" imageMso="TagMarkComplete" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="draw" label="作圖題" tag="作圖題" imageMso="MsnLogo"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="connector" label="連線題" tag="連線題" imageMso="ModuleInsert"   size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="compose" label="題組題" tag="題組題" imageMso="ChangeBinding" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="sortmultiple" label="有序複選題" tag="有序複選題"  imageMso="SmartArtChangeColorsGallery"  size="large"   onAction="OnButtonClick" visible="true" />
+				</group>
+				<group id="TaxonomyGroup" label="認知層次" tag="認知層次" autoScale="true">
+					<button id="remember" label="記憶" tag="記憶" imageMso="AutoFormat"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="understand" label="理解" tag="理解" imageMso="ShapeCloud" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="apply" label="應用" tag="應用"  imageMso="VisualBasicReferences"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="analyze" label="分析" tag="分析" imageMso="ChartRadarChart"  size="large"   onAction="OnButtonClick" visible="true"  />
+					<button id="evaluate" label="評鑒" tag="評鑒" imageMso="SlideMasterClipArtPlaceholderInsert"  size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="create" label="創造" tag="創造"  imageMso="TableDesign" size="large"   onAction="OnButtonClick" visible="true" />
+					<button id="taxonomy" label="認知層次" tag="認知層次"  imageMso="ObjectsGroup"  size="large"   onAction="OnButtonClick" visible="true" />
+				</group>
+				<group id="ToolGroup" label="功能標記" tag="功能標記" autoScale="true">
+					<button id="answer" label="答案" tag="答案" imageMso="MailMergeResultsPreview"  size="large"   onAction="OnButtonClick" visible="true"  />
+					<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="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>
+			</tab>
+		</tabs>
+	</ribbon>
+</customUI>
+

+ 158 - 0
HTEXLabel/LableRibbon.cs

@@ -0,0 +1,158 @@
+using Microsoft.Office.Core;
+using Microsoft.Office.Interop.Word;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Text;
+using Office = Microsoft.Office.Core;
+
+// TODO:   按照以下步骤启用功能区(XML)项:
+
+// 1. 将以下代码块复制到 ThisAddin、ThisWorkbook 或 ThisDocument 类中。
+
+//  protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
+//  {
+//      return new LableRibbon();
+//  }
+
+// 2. 在此类的“功能区回调”区域中创建回调方法,以处理用户
+//    操作(如单击某个按钮)。注意: 如果已经从功能区设计器中导出此功能区,
+//    则将事件处理程序中的代码移动到回调方法并修改该代码以用于
+//    功能区扩展性(RibbonX)编程模型。
+
+// 3. 向功能区 XML 文件中的控制标记分配特性,以标识代码中的相应回调方法。  
+
+// 有关详细信息,请参见 Visual Studio Tools for Office 帮助中的功能区 XML 文档。
+
+
+namespace HTEXLabel
+{
+    [ComVisible(true)]
+    public class LableRibbon : Office.IRibbonExtensibility
+    {
+        private Office.IRibbonUI ribbon;
+
+        public LableRibbon()
+        {
+        }
+
+        #region IRibbonExtensibility 成员
+
+        public string GetCustomUI(string ribbonID)
+        {
+            // 获取 Office 应用程序的语言设置
+            LanguageSettings languageSettings = Globals.ThisAddIn.Application.LanguageSettings;
+            // 获取主语言 ID
+            int languageId = languageSettings.get_LanguageID(MsoAppLanguageID.msoLanguageIDUI);
+            // 判断语言版本
+            switch (languageId)
+            {
+                case 2052:
+                    // 2052 是简体中文的语言 ID
+                    //System.Windows.Forms.MessageBox.Show("Office 语言版本:简体中文");
+                    return GetResourceText("HTEXLabel.LableRibbon-cn.xml");
+                case 1028:
+                    // 1028 是繁体中文的语言 ID
+                   // System.Windows.Forms.MessageBox.Show("Office 语言版本:繁体中文");
+                    return GetResourceText("HTEXLabel.LableRibbon-tw.xml");
+                case 1033:
+                    // 1033 是英语的语言 ID
+                   // System.Windows.Forms.MessageBox.Show("Office 语言版本:英语");
+                    return GetResourceText("HTEXLabel.LableRibbon-en.xml");
+                default:
+                   // System.Windows.Forms.MessageBox.Show("未知的 Office 语言版本:" + languageId.ToString());
+                    return GetResourceText("HTEXLabel.LableRibbon-en.xml");
+            }
+           
+          
+        }
+
+        #endregion
+
+        #region 功能区回调
+        //在此处创建回叫方法。有关添加回叫方法的详细信息,请访问 https://go.microsoft.com/fwlink/?LinkID=271226
+
+        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
+        {
+            this.ribbon = ribbonUI;
+        }
+
+        #endregion
+
+        #region 帮助器
+
+        private static string GetResourceText(string resourceName)
+        {
+            Assembly asm = Assembly.GetExecutingAssembly();
+            string[] resourceNames = asm.GetManifestResourceNames();
+            for (int i = 0; i < resourceNames.Length; ++i)
+            {
+                if (string.Compare(resourceName, resourceNames[i], StringComparison.OrdinalIgnoreCase) == 0)
+                {
+                    using (StreamReader resourceReader = new StreamReader(asm.GetManifestResourceStream(resourceNames[i])))
+                    {
+                        if (resourceReader != null)
+                        {
+                            return resourceReader.ReadToEnd();
+                        }
+                    }
+                }
+            }
+            return null;
+        }
+
+
+        public void OnButtonCheck(Office.IRibbonControl control)
+        {
+            Document currentDocument = Globals.ThisAddIn.Application.ActiveDocument;
+            var a = currentDocument.XMLNodes;
+           var ass = a.ToString();
+            // 创建一个新的 Open XML 文档
+           
+        }
+        public void OnButtonClick(Office.IRibbonControl control)
+        {
+            // 在这里根据按钮的标识执行相应的操作
+            string buttonId = control.Id;
+            string buttonTag = control.Tag;
+            // 获取当前文档的光标位置
+            Microsoft.Office.Interop.Word.Selection selection = Globals.ThisAddIn.Application.Selection;
+            // 在光标位置插入内容
+            if (buttonId.Equals("compose"))
+            {
+                // 获取 Office 应用程序的语言设置
+                LanguageSettings languageSettings = Globals.ThisAddIn.Application.LanguageSettings;
+                // 获取主语言 ID
+                int languageId = languageSettings.get_LanguageID(MsoAppLanguageID.msoLanguageIDUI);
+                // 判断语言版本
+                switch (languageId)
+                {
+                    case 2052:
+                        // 2052 是简体中文的语言 ID
+                        selection.TypeText("{" + buttonTag + "}{结束}"); break;
+                    case 1028:
+                        // 1028 是繁体中文的语言 ID
+                        selection.TypeText("{" + buttonTag + "}{結束}"); break;
+                    case 1033:
+                        // 1033 是英语的语言 ID
+                        selection.TypeText("{" + buttonTag + "}{Ended}"); break;
+                    default:
+                        // System.Windows.Forms.MessageBox.Show("未知的 Office 语言版本:" + languageId.ToString());
+                        selection.TypeText("{" + buttonTag + "}");
+                        break;
+                }
+            }
+            else {
+                selection.TypeText("{" + buttonTag + "}");
+            }
+            
+
+
+            
+        }
+        #endregion
+    }
+}

+ 38 - 0
HTEXLabel/Properties/AssemblyInfo.cs

@@ -0,0 +1,38 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Security;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("HTEXLabel")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HTEXLabel")]
+[assembly: AssemblyCopyright("Copyright ©  2024")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//将 ComVisible 设置为 false 将使此程序集中的类型
+//对 COM 组件不可见。  如果需要从 COM 访问此程序集中的类型,
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("de87c11b-ae71-4bdc-b831-a68f40032a3e")]
+
+// 程序集的版本信息由下列四个值组成:
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
+// 方法是按如下所示使用“*”: :
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+

+ 62 - 0
HTEXLabel/Properties/Resources.Designer.cs

@@ -0,0 +1,62 @@
+//------------------------------------------------------------------------------
+// <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 HTEXLabel.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("HTEXLabel.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;
+            }
+        }
+    }
+}

+ 117 - 0
HTEXLabel/Properties/Resources.resx

@@ -0,0 +1,117 @@
+<?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>

+ 26 - 0
HTEXLabel/Properties/Settings.Designer.cs

@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+// <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 HTEXLabel.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;
+            }
+        }
+    }
+}

+ 7 - 0
HTEXLabel/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?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>

+ 237 - 0
HTEXLabel/ThisAddIn.Designer.cs

@@ -0,0 +1,237 @@
+//------------------------------------------------------------------------------
+// <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 HTEXLabel {
+    
+    
+    /// 
+    [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.Word.Application Application;
+        
+        /// 
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
+        public ThisAddIn(global::Microsoft.Office.Tools.Word.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.Word.Application>(typeof(Microsoft.Office.Interop.Word.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.Word.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.Word.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) {
+        }
+    }
+}

+ 5 - 0
HTEXLabel/ThisAddIn.Designer.xml

@@ -0,0 +1,5 @@
+<hostitem:hostItem hostitem:baseType="Microsoft.Office.Tools.AddInBase" hostitem:namespace="HTEXLabel" hostitem:className="ThisAddIn" hostitem:identifier="ThisAddIn" hostitem:primaryCookie="AddIn" hostitem:master="true" hostitem:factoryType="Microsoft.Office.Tools.Word.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.Word.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>

+ 97 - 0
HTEXLabel/ThisAddIn.cs

@@ -0,0 +1,97 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml.Linq;
+using Word = Microsoft.Office.Interop.Word;
+using Office = Microsoft.Office.Core;
+using Microsoft.Office.Tools.Word;
+using Microsoft.Office.Core;
+
+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
+            
+        }
+        private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
+        {
+        }
+
+        protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
+  {
+      return new LableRibbon();
+  }
+
+        #region VSTO 生成的代码
+
+        /// <summary>
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InternalStartup()
+        {
+            this.Startup += new System.EventHandler(ThisAddIn_Startup);
+            this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
+        }
+
+        #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 + "}");
+        }
+    }
+}

+ 14 - 0
TEAMModelHTEX.sln

@@ -25,6 +25,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client", "Client\Client.csp
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HTEXScreen", "HTEXScreen\HTEXScreen.csproj", "{C7394651-7D64-4D27-9F2A-93434F141183}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HTEXLabel", "HTEXLabel\HTEXLabel.csproj", "{D7EEB2A3-1CD2-448C-9E21-C24BA5C875F9}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -167,6 +169,18 @@ Global
 		{C7394651-7D64-4D27-9F2A-93434F141183}.Release|iPhone.Build.0 = Release|Any CPU
 		{C7394651-7D64-4D27-9F2A-93434F141183}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
 		{C7394651-7D64-4D27-9F2A-93434F141183}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+		{D7EEB2A3-1CD2-448C-9E21-C24BA5C875F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{D7EEB2A3-1CD2-448C-9E21-C24BA5C875F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D7EEB2A3-1CD2-448C-9E21-C24BA5C875F9}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+		{D7EEB2A3-1CD2-448C-9E21-C24BA5C875F9}.Debug|iPhone.Build.0 = Debug|Any CPU
+		{D7EEB2A3-1CD2-448C-9E21-C24BA5C875F9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+		{D7EEB2A3-1CD2-448C-9E21-C24BA5C875F9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+		{D7EEB2A3-1CD2-448C-9E21-C24BA5C875F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{D7EEB2A3-1CD2-448C-9E21-C24BA5C875F9}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D7EEB2A3-1CD2-448C-9E21-C24BA5C875F9}.Release|iPhone.ActiveCfg = Release|Any CPU
+		{D7EEB2A3-1CD2-448C-9E21-C24BA5C875F9}.Release|iPhone.Build.0 = Release|Any CPU
+		{D7EEB2A3-1CD2-448C-9E21-C24BA5C875F9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+		{D7EEB2A3-1CD2-448C-9E21-C24BA5C875F9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE