CrazyIter_Bin 1 anno fa
parent
commit
cb6d5cbfe9

+ 1 - 0
HTEXLabel/QRCodeForm.cs

@@ -48,6 +48,7 @@ namespace HTEXLabel
             this.Text = "请使用HiTA扫码登录...";
             this.ResumeLayout(false);
             this.Load+=FormLoad;
+            this.FormClosed+=QRCodeForm_FormClosed;
 
         }
 

+ 68 - 0
HTEXMark/HTEXMark.csproj

@@ -103,22 +103,83 @@
     <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
       <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
     </Reference>
+    <Reference Include="Microsoft.IdentityModel.Abstractions, Version=7.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\Microsoft.IdentityModel.Abstractions.7.2.0\lib\net472\Microsoft.IdentityModel.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=7.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\Microsoft.IdentityModel.JsonWebTokens.7.2.0\lib\net472\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.IdentityModel.Logging, Version=7.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\Microsoft.IdentityModel.Logging.7.2.0\lib\net472\Microsoft.IdentityModel.Logging.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.IdentityModel.Tokens, Version=7.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\Microsoft.IdentityModel.Tokens.7.2.0\lib\net472\Microsoft.IdentityModel.Tokens.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.ComponentModel.Composition" />
     <Reference Include="System.Data" />
     <Reference Include="System.Drawing" />
+    <Reference Include="System.IdentityModel.Tokens.Jwt, Version=7.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.IdentityModel.Tokens.Jwt.7.2.0\lib\net472\System.IdentityModel.Tokens.Jwt.dll</HintPath>
+    </Reference>
+    <Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
+      <Private>True</Private>
+      <Private>True</Private>
+    </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" />
+    <Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
+      <Private>True</Private>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Net.Http.Formatting.Extension.5.2.3.0\lib\System.Net.Http.Extensions.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Net.Http.Formatting.Extension.5.2.3.0\lib\System.Net.Http.Formatting.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Net.Http.Formatting.Extension.5.2.3.0\lib\System.Net.Http.Primitives.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, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
+      <Private>True</Private>
+      <Private>True</Private>
+    </Reference>
     <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
       <HintPath>F:\NuGet\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
     </Reference>
+    <Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
+      <Private>True</Private>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
+      <Private>True</Private>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
+      <Private>True</Private>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>F:\NuGet\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
+      <Private>True</Private>
+      <Private>True</Private>
+    </Reference>
     <Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
       <HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
     </Reference>
@@ -222,6 +283,9 @@
       <DependentUpon>Resources.resx</DependentUpon>
       <DesignTime>True</DesignTime>
     </Compile>
+    <EmbeddedResource Include="QRCodeForm.resx">
+      <DependentUpon>QRCodeForm.cs</DependentUpon>
+    </EmbeddedResource>
     <None Include="app.config" />
     <None Include="HTEXMark_TemporaryKey.pfx" />
     <None Include="lang.json" />
@@ -234,6 +298,7 @@
       <AutoGen>True</AutoGen>
       <DependentUpon>Settings.settings</DependentUpon>
     </Compile>
+    <Compile Include="QRCodeForm.cs" />
     <Compile Include="ThisAddIn.cs">
       <SubType>Code</SubType>
     </Compile>
@@ -246,6 +311,7 @@
     <AppDesigner Include="Properties\" />
   </ItemGroup>
   <ItemGroup>
+    <Content Include="Images\favicon.ico" />
     <Content Include="Images\二维码.png" />
     <Content Include="Images\作图题.png" />
     <Content Include="Images\分析.png" />
@@ -255,6 +321,8 @@
     <Content Include="Images\填空数量.png" />
     <Content Include="Images\填空题.png" />
     <Content Include="Images\多选题.png" />
+    <Content Include="Images\学校.png" />
+    <Content Include="Images\学科.png" />
     <Content Include="Images\应用.png" />
     <Content Include="Images\改错题.png" />
     <Content Include="Images\教师.png" />

BIN
HTEXMark/Images/favicon.ico


BIN
HTEXMark/Images/学校.png


BIN
HTEXMark/Images/学科.png


+ 2 - 0
HTEXMark/MarkLanguage.cs

@@ -41,5 +41,7 @@ namespace HTEXMark
         public string count { get; set; }
         public string qrcode { get; set; }
         public string user { get; set; }
+        public string qrcode_title {  get; set; }
+        public string unlogin { get; set; }
     }
 }

+ 23 - 4
HTEXMark/MarkRibbon.Designer.cs

@@ -70,6 +70,8 @@ namespace HTEXMark
             this.item_user = this.Factory.CreateRibbonGroup();
             this.qrcode = this.Factory.CreateRibbonButton();
             this.user = this.Factory.CreateRibbonButton();
+            this.schoolDropDown = this.Factory.CreateRibbonDropDown();
+            this.subjectDropDown = this.Factory.CreateRibbonDropDown();
             this.item_mark_tab.SuspendLayout();
             this.item_type.SuspendLayout();
             this.item_taxonomy.SuspendLayout();
@@ -202,7 +204,6 @@ namespace HTEXMark
             this.item_taxonomy.Items.Add(this.taxonomy);
             this.item_taxonomy.Label = "认知层次";
             this.item_taxonomy.Name = "item_taxonomy";
-           
             // 
             // remember
             // 
@@ -366,9 +367,10 @@ namespace HTEXMark
             // 
             this.item_user.Items.Add(this.qrcode);
             this.item_user.Items.Add(this.user);
+            this.item_user.Items.Add(this.schoolDropDown);
+            this.item_user.Items.Add(this.subjectDropDown);
             this.item_user.Label = "用户信息";
             this.item_user.Name = "item_user";
-           
             // 
             // qrcode
             // 
@@ -377,7 +379,7 @@ namespace HTEXMark
             this.qrcode.Label = "登录\n";
             this.qrcode.Name = "qrcode";
             this.qrcode.ShowImage = true;
-            this.qrcode.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.MarkTags_Click);
+            this.qrcode.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.QRCode_Click);
             // 
             // user
             // 
@@ -387,7 +389,22 @@ namespace HTEXMark
             this.user.Name = "user";
             this.user.ShowImage = true;
             this.user.Visible = false;
-            this.user.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.MarkTags_Click);
+            // 
+            // schoolDropDown
+            // 
+            this.schoolDropDown.Image = global::HTEXMark.Properties.Resources.学校;
+            this.schoolDropDown.Label = "学校";
+            this.schoolDropDown.Name = "schoolDropDown";
+            this.schoolDropDown.ShowImage = true;
+            this.schoolDropDown.Visible = false;
+            // 
+            // subjectDropDown
+            // 
+            this.subjectDropDown.Image = global::HTEXMark.Properties.Resources.学科;
+            this.subjectDropDown.Label = "学科";
+            this.subjectDropDown.Name = "subjectDropDown";
+            this.subjectDropDown.ShowImage = true;
+            this.subjectDropDown.Visible = false;
             // 
             // MarkRibbon
             // 
@@ -444,6 +461,8 @@ namespace HTEXMark
         internal Microsoft.Office.Tools.Ribbon.RibbonGroup item_user;
         internal Microsoft.Office.Tools.Ribbon.RibbonButton qrcode;
         internal Microsoft.Office.Tools.Ribbon.RibbonButton user;
+        internal Microsoft.Office.Tools.Ribbon.RibbonDropDown schoolDropDown;
+        internal Microsoft.Office.Tools.Ribbon.RibbonDropDown subjectDropDown;
     }
 
     partial class ThisRibbonCollection

+ 45 - 5
HTEXMark/MarkRibbon.cs

@@ -1,5 +1,6 @@
 using Microsoft.Office.Core;
 using Microsoft.Office.Tools.Ribbon;
+using Microsoft.Office.Tools.Word;
 using System;
 using System.Collections;
 using System.Collections.Generic;
@@ -13,8 +14,20 @@ namespace HTEXMark
 {
     public partial class MarkRibbon
     {
+        public static MarkLanguage lang = null;
         private void MarkRibbon_Load(object sender, RibbonUIEventArgs e)
         {
+
+
+            List<string> strs = new List<string>() { "1", "2", "3" };
+
+            foreach (var x in strs)
+            {
+                var dropDownItem = Factory.CreateRibbonDropDownItem();
+                dropDownItem.Label=x;
+                dropDownItem.Tag=x;
+                schoolDropDown.Items.Add(dropDownItem);
+            }
             var wordApp = Globals.ThisAddIn.Application;
             // 获取 Office 应用程序的语言设置
             LanguageSettings languageSettings = Globals.ThisAddIn.Application.LanguageSettings;
@@ -32,7 +45,7 @@ namespace HTEXMark
                     //System.Windows.Forms.MessageBox.Show("Office 语言版本:简体中文");
                     {
                         json.TryGetProperty("cn", out JsonElement cn);
-                        var lang = JsonSerializer.Deserialize<MarkLanguage>(cn);
+                          lang = JsonSerializer.Deserialize<MarkLanguage>(cn);
                         SetLang(lang);
                         break;
                     }
@@ -42,7 +55,7 @@ namespace HTEXMark
                    
                     {
                         json.TryGetProperty("tw", out JsonElement tw);
-                        var lang = JsonSerializer.Deserialize<MarkLanguage>(tw);
+                          lang = JsonSerializer.Deserialize<MarkLanguage>(tw);
                         SetLang(lang);
                         break;
                     }
@@ -53,7 +66,7 @@ namespace HTEXMark
                    
                     {
                         json.TryGetProperty("en", out JsonElement en);
-                        var lang = JsonSerializer.Deserialize<MarkLanguage>(en);
+                          lang = JsonSerializer.Deserialize<MarkLanguage>(en);
                         SetLang(lang);
                         break;
                     }
@@ -61,7 +74,7 @@ namespace HTEXMark
                     // System.Windows.Forms.MessageBox.Show("未知的 Office 语言版本:" + languageId.ToString());
                     {
                         json.TryGetProperty("en", out JsonElement en);
-                        var lang = JsonSerializer.Deserialize<MarkLanguage>(en);
+                         lang = JsonSerializer.Deserialize<MarkLanguage>(en);
                         SetLang(lang);
                         break;
                     }
@@ -134,8 +147,35 @@ namespace HTEXMark
 
 
         }
-     
+        private void QRCode_Click(object sender, RibbonControlEventArgs e) {
+            // 创建 Windows Forms 窗口
+            var qrcode_button = sender as  RibbonButton;
+            
+            QRCodeForm qrCodeForm = new QRCodeForm(qrcode_button, user,schoolDropDown,subjectDropDown,  lang,this )
+            {
+
 
+                MaximizeBox = false,
+                MinimizeBox = false,
+                // 设置窗体的边框样式
+                FormBorderStyle = FormBorderStyle.FixedSingle,
+                Width=215,
+                Height=240,
+                // 显示窗口
+            };
+            CenterFormOnScreen(qrCodeForm);
+            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);
+        }
         private void MarkTags_Click(object sender, RibbonControlEventArgs e)
         {  // 在这里根据按钮的标识执行相应的操作
             var button = sender as  RibbonButton;

+ 20 - 0
HTEXMark/Properties/Resources.Designer.cs

@@ -150,6 +150,26 @@ namespace HTEXMark.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap 学校 {
+            get {
+                object obj = ResourceManager.GetObject("学校", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap 学科 {
+            get {
+                object obj = ResourceManager.GetObject("学科", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

+ 15 - 9
HTEXMark/Properties/Resources.resx

@@ -124,8 +124,8 @@
   <data name="配分" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Images\配分.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="填空题" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Images\填空题.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  <data name="问答题" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Images\问答题.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
   <data name="创造" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Images\创造.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -136,9 +136,6 @@
   <data name="记忆" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Images\记忆.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="综合题" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Images\综合题.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
-  </data>
   <data name="单选题" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Images\单选题.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
@@ -148,8 +145,8 @@
   <data name="结束" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Images\结束.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="问答题" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Images\问答题.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  <data name="填空题" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Images\填空题.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
   <data name="应用" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Images\应用.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -160,8 +157,8 @@
   <data name="判断题" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Images\判断题.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
-  <data name="认知层次" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\Images\认知层次.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  <data name="综合题" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Images\综合题.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
   <data name="答案" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Images\答案.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -190,6 +187,9 @@
   <data name="解析" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Images\解析.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="认知层次" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Images\认知层次.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
   <data name="有序多选题" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Images\有序多选题.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
@@ -202,4 +202,10 @@
   <data name="难度" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Images\难度.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="学科" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Images\学科.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="学校" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Images\学校.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>

File diff suppressed because it is too large
+ 257 - 0
HTEXMark/QRCodeForm.cs


+ 120 - 0
HTEXMark/QRCodeForm.resx

@@ -0,0 +1,120 @@
+<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <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" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </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" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 8 - 0
HTEXMark/app.config

@@ -6,6 +6,14 @@
         <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
         <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
       </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
+      </dependentAssembly>
     </assemblyBinding>
   </runtime>
 </configuration>

+ 9 - 3
HTEXMark/lang.json

@@ -32,7 +32,9 @@
     "item_tool": "其他标记",
     "item_user": "用户信息",
     "qrcode": "登录",
-    "user": "用户"
+    "user": "用户",
+    "qrcode_title": "请使用HiTA扫码登录...",
+    "unlogin": "未登录!"
   },
   "tw": {
     "single": "選擇題",
@@ -67,7 +69,9 @@
     "item_tool": "其他標記",
     "item_user": "用戶信息",
     "qrcode": "登入",
-    "user": "用戶"
+    "user": "用戶",
+    "qrcode_title": "請使用HiTA掃碼登入...",
+    "unlogin": "未登入!"
   },
   "en": {
     "single": "MultipleChoice",
@@ -102,6 +106,8 @@
     "item_tool": "Functional",
     "item_user": "UserProfile",
     "qrcode": "Login",
-    "user": "User"
+    "user": "User",
+    "qrcode_title": "Please use HiTA scan to login...",
+    "unlogin": "Not logged in!"
   }
 }

+ 13 - 0
HTEXMark/packages.config

@@ -1,10 +1,23 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
   <package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net48" />
+  <package id="Microsoft.IdentityModel.Abstractions" version="7.2.0" targetFramework="net48" />
+  <package id="Microsoft.IdentityModel.JsonWebTokens" version="7.2.0" targetFramework="net48" />
+  <package id="Microsoft.IdentityModel.Logging" version="7.2.0" targetFramework="net48" />
+  <package id="Microsoft.IdentityModel.Tokens" version="7.2.0" targetFramework="net48" />
   <package id="System.Buffers" version="4.5.1" targetFramework="net48" />
+  <package id="System.IdentityModel.Tokens.Jwt" version="7.2.0" targetFramework="net48" />
+  <package id="System.IO" version="4.3.0" targetFramework="net48" />
   <package id="System.Memory" version="4.5.5" targetFramework="net48" />
+  <package id="System.Net.Http" version="4.3.4" targetFramework="net48" />
+  <package id="System.Net.Http.Formatting.Extension" version="5.2.3.0" targetFramework="net48" />
   <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
+  <package id="System.Runtime" version="4.3.0" targetFramework="net48" />
   <package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
+  <package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net48" />
+  <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net48" />
+  <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net48" />
+  <package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net48" />
   <package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net48" />
   <package id="System.Text.Json" version="8.0.1" targetFramework="net48" />
   <package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />