Browse Source

ots注册

zhangjiaxin 3 years ago
parent
commit
ad98e73e27

+ 20 - 0
OTS.sln

@@ -70,6 +70,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OTSIncAMeasureApp", "OTSInc
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OTSPartA_STDEditor", "OTSPartA_STDEditor\OTSPartA_STDEditor.csproj", "{52B47C78-BF08-4670-AB88-FDC972B4D7B4}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegistrationAuthorization", "RegistrationAuthorization\RegistrationAuthorization.csproj", "{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -326,6 +328,24 @@ Global
 		{52B47C78-BF08-4670-AB88-FDC972B4D7B4}.Release|x64.Build.0 = Release|x64
 		{52B47C78-BF08-4670-AB88-FDC972B4D7B4}.Release|x86.ActiveCfg = Release|Any CPU
 		{52B47C78-BF08-4670-AB88-FDC972B4D7B4}.Release|x86.Build.0 = Release|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Debug|x64.Build.0 = Debug|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Debug|x86.Build.0 = Debug|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release_oxford50|Any CPU.ActiveCfg = Release|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release_oxford50|Any CPU.Build.0 = Release|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release_oxford50|x64.ActiveCfg = Release|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release_oxford50|x64.Build.0 = Release|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release_oxford50|x86.ActiveCfg = Release|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release_oxford50|x86.Build.0 = Release|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release|Any CPU.Build.0 = Release|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release|x64.ActiveCfg = Release|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release|x64.Build.0 = Release|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release|x86.ActiveCfg = Release|Any CPU
+		{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 1 - 0
OTSIncAMeasureApp/OTSIncAMeasureApp.csproj

@@ -160,6 +160,7 @@
       <HintPath>..\packages\System.Data.SQLite.Linq.1.0.115.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
     </Reference>
     <Reference Include="System.Design" />
+    <Reference Include="System.Management" />
     <Reference Include="System.Security" />
     <Reference Include="System.Windows.Forms.DataVisualization" />
     <Reference Include="System.Windows.Forms.Ribbon, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">

+ 125 - 10
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -16,6 +16,10 @@ using OTSModelSharp.ServiceInterface;
 using OTSMeasureApp._0_OTSModel.Measure.ParamData;
 using OTSCLRINTERFACE;
 using System.IO;
+using System.Management;
+using System.Xml;
+using System.Linq;
+using System.Text;
 
 namespace OTSMeasureApp 
 {
@@ -150,18 +154,16 @@ namespace OTSMeasureApp
 
         private void OTSIncAMeasureAppForm_Load(object sender, EventArgs e)
         {
+          
             try
             {
-                //try
-                //{
-                //    SenseShield.DogDecrypting.decrypting(101);//参数为许可号
-                //}
-                //catch (Exception ex)
-                //{
-                //    MessageBox.Show(ex.Message, "错误:", MessageBoxButtons.OK, MessageBoxIcon.Error);
-                //    System.Environment.Exit(0);
-                //    return;
-                //}
+                //判断是否有授权
+                if(!RegistrationVerification())
+                {
+                    MessageBox.Show("Error: missing authorization");
+                    System.Environment.Exit(0);
+                    return;
+                }
 
                 ArrangWorkspaceWindow();
 
@@ -1313,5 +1315,118 @@ namespace OTSMeasureApp
             csName = csName.Substring(0, csName.IndexOf('\0'));
             return csName;
         }
+
+
+        // 获得CPU的序列号
+        static string getCpu()
+        {
+            string strCpu = null;
+            ManagementClass myCpu = new ManagementClass("win32_Processor");
+            ManagementObjectCollection myCpuConnection = myCpu.GetInstances();
+            foreach (ManagementObject myObject in myCpuConnection)
+            {
+                strCpu = myObject.Properties["Processorid"].Value.ToString();
+                break;
+            }
+            return strCpu;
+        }
+
+        // 取得设备硬盘的卷标号
+        static string GetDiskVolumeSerialNumber()
+        {
+            ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
+            ManagementObject disk = new ManagementObject("win32_logicaldisk.deviceid=\"c:\"");
+            disk.Get();
+            return disk.GetPropertyValue("VolumeSerialNumber").ToString();
+        }
+
+        public static IDictionary<String, List<String>> ReadXML(string address)
+        {
+            IDictionary<String, List<String>> infos = new Dictionary<String, List<String>>();
+
+            if (File.Exists(address))
+            {
+                XmlDocument xmlDoc = new XmlDocument();
+
+                xmlDoc.Load(address);
+
+                XmlNode xn = xmlDoc.SelectSingleNode("infos");
+
+                XmlNodeList xnl = xn.ChildNodes;
+
+                foreach (XmlNode xnf in xnl)
+                {
+                    XmlElement xe = (XmlElement)xnf;
+
+                    XmlNode nameNode = xe.SelectSingleNode("ID");
+
+                    string name = nameNode.InnerText;
+                    Console.WriteLine(name);
+                    XmlNode filelist = xe.SelectSingleNode("filelist");
+
+                    List<String> list = new List<string>();
+
+                    foreach (XmlNode item in filelist.ChildNodes)
+                    {
+                        list.Add(item.InnerText);
+                    }
+
+                    infos.Add(name, list);
+                }
+            }
+            return infos;
+        }
+        private string ConvertString(string str)
+        {
+            string str_out;
+            string[] arr = str.Split(',');
+            byte[] be = new byte[arr.Count()];
+
+            for (int i = 0; i < arr.Count(); i++)
+            {
+                be[i] = Convert.ToByte(arr[i]);
+            }
+            str_out = Encoding.Unicode.GetString(be);
+            return str_out;
+        }
+        private bool RegistrationVerification()
+        {
+            string CPUID, DiskID;
+            try
+            {
+                SenseShield.DogDecrypting.decrypting(101);//参数为许可号
+            }
+            catch (Exception ex)
+            {
+                CPUID = getCpu();
+                DiskID = GetDiskVolumeSerialNumber();
+                var ID = ReadXML("./Config/SysData/RegistrationProofreading.txt");
+                List<string> list_str = new List<string>();
+                List<string> list_time = new List<string>();
+                ID.TryGetValue("ID", out list_str);
+                ID.TryGetValue("Time", out list_time);
+                string setCPU = ConvertString(list_str[0]);
+                string setDisk = ConvertString(list_str[1]);
+                string setYear = ConvertString(list_time[0]);
+                string setMonth = ConvertString(list_time[1]);
+                string setDay = ConvertString(list_time[2]);
+                if (CPUID != setCPU || DiskID != setDisk)
+                {
+                    return false;
+
+                }
+              
+                DateTime dt = DateTime.ParseExact(setYear + setMonth + setDay+ "235959", "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture);
+
+                if (DateTime.Now > dt)
+                {
+                    
+                    return false;
+                }
+                
+
+            }
+            return true;
+        }
     }
 }

+ 6 - 0
RegistrationAuthorization/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
+    </startup>
+</configuration>

+ 107 - 0
RegistrationAuthorization/Form1.Designer.cs

@@ -0,0 +1,107 @@
+
+namespace RegistrationAuthorization
+{
+    partial class Form1
+    {
+        /// <summary>
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows 窗体设计器生成的代码
+
+        /// <summary>
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
+            this.button1 = new System.Windows.Forms.Button();
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // button1
+            // 
+            this.button1.Location = new System.Drawing.Point(96, 91);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(160, 23);
+            this.button1.TabIndex = 0;
+            this.button1.Text = "生成授权申请文件";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // pictureBox1
+            // 
+            this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
+            this.pictureBox1.Location = new System.Drawing.Point(11, 31);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(2);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(67, 67);
+            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+            this.pictureBox1.TabIndex = 7;
+            this.pictureBox1.TabStop = false;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("宋体", 15F);
+            this.label1.Location = new System.Drawing.Point(92, 20);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(69, 20);
+            this.label1.TabIndex = 8;
+            this.label1.Text = "label1";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("宋体", 15F);
+            this.label2.Location = new System.Drawing.Point(92, 59);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(69, 20);
+            this.label2.TabIndex = 9;
+            this.label2.Text = "label2";
+            // 
+            // Form1
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(356, 135);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.pictureBox1);
+            this.Controls.Add(this.button1);
+            this.Name = "Form1";
+            this.Text = "授权信息";
+            this.Load += new System.EventHandler(this.Form1_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.PictureBox pictureBox1;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+    }
+}
+

+ 169 - 0
RegistrationAuthorization/Form1.cs

@@ -0,0 +1,169 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Management;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using System.Xml;
+
+namespace RegistrationAuthorization
+{
+    public partial class Form1 : Form
+    {
+        public Form1()
+        {
+            InitializeComponent();
+        }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            SaveFileDialog sfd = new SaveFileDialog();
+            sfd.Filter = "(*.txt)|*.txt|(*.*)|*.*";
+            if (sfd.ShowDialog() == DialogResult.OK)
+            {
+                IDictionary<String, List<String>> infos = new Dictionary<String, List<String>>();
+                infos.Add("ID", new List<string>() { getCpu(), GetDiskVolumeSerialNumber() });
+                infos.Add("Time", new List<string>() { DateTime.Now.Year.ToString(), DateTime.Now.Month.ToString(), DateTime.Now.Day.ToString() });
+                SaveXML(infos, sfd.FileName);
+                MessageBox.Show("Save complete");
+            }
+        }
+        // 获得CPU的序列号
+        static string getCpu()
+        {
+            string strCpu = null;
+            ManagementClass myCpu = new ManagementClass("win32_Processor");
+            var myCpuConnection = myCpu.GetInstances();
+            foreach (ManagementObject myObject in myCpuConnection)
+            {
+                strCpu = myObject.Properties["Processorid"].Value.ToString();
+                break;
+            }
+            return strCpu;
+        }
+
+        // 取得设备硬盘的卷标号
+        static string GetDiskVolumeSerialNumber()
+        {
+            ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
+            ManagementObject disk = new ManagementObject("win32_logicaldisk.deviceid=\"c:\"");
+            disk.Get();
+            return disk.GetPropertyValue("VolumeSerialNumber").ToString();
+        }
+        public static void SaveXML(IDictionary<String, List<String>> infos, string address)
+        {
+            if (infos == null || infos.Count == 0)
+            {
+                return;
+            }
+
+            XmlDocument xmlDoc = new XmlDocument();
+
+            XmlDeclaration dec = xmlDoc.CreateXmlDeclaration("1.0", "utf-8", null);
+
+            xmlDoc.AppendChild(dec);
+
+            XmlElement _infos = xmlDoc.CreateElement("infos");
+
+            foreach (KeyValuePair<String, List<String>> item in infos)
+            {
+                XmlElement info = xmlDoc.CreateElement("info");
+
+                XmlElement name = xmlDoc.CreateElement("ID");
+                name.InnerText = item.Key;
+
+                info.AppendChild(name);
+
+                XmlNode filelist = xmlDoc.CreateElement("filelist");
+
+                info.AppendChild(filelist);
+
+                foreach (String number in item.Value)
+                {
+                    XmlElement filed = xmlDoc.CreateElement("filed");
+                    filed.InnerText = number;
+
+                    filelist.AppendChild(filed);
+                }
+
+                _infos.AppendChild(info);
+            }
+
+            xmlDoc.AppendChild(_infos);
+
+            xmlDoc.Save(address);
+
+        }
+
+        private void Form1_Load(object sender, EventArgs e)
+        {
+            var ID = ReadXML("./Config/SysData/RegistrationProofreading.txt");
+            List<string> list_time = new List<string>();
+            ID.TryGetValue("Time", out list_time);
+            DateTime dt = DateTime.ParseExact(ConvertString(list_time[0]) + ConvertString(list_time[1]) + ConvertString(list_time[2])+"235959", "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture);
+            if (DateTime.Now > dt)
+            {
+                label1.Text = "授权过期!";
+            }
+            else
+            {
+                label1.Text = "授权已激活";
+            }
+            label2.Text = "有效期至:"+ConvertString(list_time[0]) + "-" + ConvertString(list_time[1]) + "-" + ConvertString(list_time[2]);
+        }
+        public static IDictionary<String, List<String>> ReadXML(string address)
+        {
+            IDictionary<String, List<String>> infos = new Dictionary<String, List<String>>();
+
+            if (File.Exists(address))
+            {
+                XmlDocument xmlDoc = new XmlDocument();
+
+                xmlDoc.Load(address);
+
+                XmlNode xn = xmlDoc.SelectSingleNode("infos");
+
+                XmlNodeList xnl = xn.ChildNodes;
+
+                foreach (XmlNode xnf in xnl)
+                {
+                    XmlElement xe = (XmlElement)xnf;
+
+                    XmlNode nameNode = xe.SelectSingleNode("ID");
+
+                    string name = nameNode.InnerText;
+                    Console.WriteLine(name);
+                    XmlNode filelist = xe.SelectSingleNode("filelist");
+
+                    List<String> list = new List<string>();
+
+                    foreach (XmlNode item in filelist.ChildNodes)
+                    {
+                        list.Add(item.InnerText);
+                    }
+
+                    infos.Add(name, list);
+                }
+            }
+            return infos;
+        }
+        private string ConvertString(string str)
+        {
+            string str_out;
+            string[] arr = str.Split(',');
+            byte[] be = new byte[arr.Count()];
+
+            for (int i = 0; i < arr.Count(); i++)
+            {
+                be[i] = Convert.ToByte(arr[i]);
+            }
+            str_out = Encoding.Unicode.GetString(be);
+            return str_out;
+        }
+    }
+}

+ 215 - 0
RegistrationAuthorization/Form1.resx

@@ -0,0 +1,215 @@
+<?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>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+</value>
+  </data>
+</root>

+ 22 - 0
RegistrationAuthorization/Program.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace RegistrationAuthorization
+{
+    static class Program
+    {
+        /// <summary>
+        /// 应用程序的主入口点。
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new Form1());
+        }
+    }
+}

+ 36 - 0
RegistrationAuthorization/Properties/AssemblyInfo.cs

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

+ 70 - 0
RegistrationAuthorization/Properties/Resources.Designer.cs

@@ -0,0 +1,70 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本: 4.0.30319.42000
+//
+//     对此文件的更改可能导致不正确的行为,如果
+//     重新生成代码,则所做更改将丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+
+namespace RegistrationAuthorization.Properties
+{
+    /// <summary>
+    ///   强类型资源类,用于查找本地化字符串等。
+    /// </summary>
+    // 此类是由 StronglyTypedResourceBuilder
+    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    // (以 /str 作为命令选项),或重新生成 VS 项目。
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [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>
+        ///   返回此类使用的缓存 ResourceManager 实例。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager
+        {
+            get
+            {
+                if ((resourceMan == null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RegistrationAuthorization.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   重写当前线程的 CurrentUICulture 属性,对
+        ///   使用此强类型资源类的所有资源查找执行重写。
+        /// </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
RegistrationAuthorization/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>

+ 29 - 0
RegistrationAuthorization/Properties/Settings.Designer.cs

@@ -0,0 +1,29 @@
+//------------------------------------------------------------------------------
+// <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 RegistrationAuthorization.Properties
+{
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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
RegistrationAuthorization/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>

+ 84 - 0
RegistrationAuthorization/RegistrationAuthorization.csproj

@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{8B08AA54-13CA-4D28-8F70-3B1F238E10A4}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>RegistrationAuthorization</RootNamespace>
+    <AssemblyName>RegistrationAuthorization</AssemblyName>
+    <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\Bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Management" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Form1.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Form1.Designer.cs">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <EmbeddedResource Include="Form1.resx">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </EmbeddedResource>
+    <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="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>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>