Просмотр исходного кода

增加许可功能,有效期3个月或打开1000次。

dd 5 месяцев назад
Родитель
Сommit
3dea1f3cdd
37 измененных файлов с 807 добавлено и 111 удалено
  1. BIN
      .vs/MOTINOVA_MC_Test/v17/.suo
  2. 10 2
      MOTINOVA_MC_Test.sln
  3. 43 43
      MOTINOVA_MC_Test/Form1.Designer.cs
  4. 87 17
      MOTINOVA_MC_Test/Form1.cs
  5. 125 0
      MOTINOVA_MC_Test/Licences.Designer.cs
  6. 53 0
      MOTINOVA_MC_Test/Licences.cs
  7. 120 0
      MOTINOVA_MC_Test/Licences.resx
  8. 14 2
      MOTINOVA_MC_Test/MOTINOVA_MC_Test.csproj
  9. 211 0
      MOTINOVA_MC_Test/PC_Information.cs
  10. 1 1
      MOTINOVA_MC_Test/Properties/Settings.Designer.cs
  11. 98 0
      MOTINOVA_MC_Test/aes.cs
  12. 1 1
      MOTINOVA_MC_Test/app.config
  13. 6 3
      MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.application
  14. BIN
      MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.exe
  15. 1 1
      MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.exe.config
  16. 13 18
      MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.exe.manifest
  17. BIN
      MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.pdb
  18. BIN
      MOTINOVA_MC_Test/bin/Debug/Server
  19. 2 0
      MOTINOVA_MC_Test/bin/Debug/Server-aliyun
  20. BIN
      MOTINOVA_MC_Test/bin/Debug/Server-wh
  21. BIN
      MOTINOVA_MC_Test/bin/Debug/app.publish/MOTINOVA_MC_Test.exe
  22. BIN
      MOTINOVA_MC_Test/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  23. BIN
      MOTINOVA_MC_Test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  24. BIN
      MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.Form1.resources
  25. BIN
      MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.Form2.resources
  26. BIN
      MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.Properties.Resources.resources
  27. 6 3
      MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.application
  28. BIN
      MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.csproj.AssemblyReference.cache
  29. 1 1
      MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.csproj.CoreCompileInputs.cache
  30. 1 0
      MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.csproj.FileListAbsolute.txt
  31. BIN
      MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.csproj.GenerateResource.cache
  32. BIN
      MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.exe
  33. 13 18
      MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.exe.manifest
  34. BIN
      MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.pdb
  35. BIN
      MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.topFormCapture.resources
  36. BIN
      MOTINOVA_MC_Test/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
  37. 1 1
      MOTINOVA_MC_Test/packages.config

BIN
.vs/MOTINOVA_MC_Test/v17/.suo


+ 10 - 2
MOTINOVA_MC_Test.sln

@@ -1,10 +1,15 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.21005.1
+# Visual Studio Version 17
+VisualStudioVersion = 17.10.34928.147
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MOTINOVA_MC_Test", "MOTINOVA_MC_Test\MOTINOVA_MC_Test.csproj", "{3F9958A2-3FFC-4B41-8A1A-F8C3EC0054FD}"
 EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决方案项", "{174E02F9-632E-4642-9989-61CB802F6265}"
+	ProjectSection(SolutionItems) = preProject
+		MOTINOVA_MC_Test\PC_Information.cs = MOTINOVA_MC_Test\PC_Information.cs
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -19,4 +24,7 @@ Global
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {CB0D5D76-170C-40B1-8A44-A712A2FF657E}
+	EndGlobalSection
 EndGlobal

+ 43 - 43
MOTINOVA_MC_Test/Form1.Designer.cs

@@ -275,9 +275,13 @@
             this.label_BiuldTime = new System.Windows.Forms.Label();
             this.label77 = new System.Windows.Forms.Label();
             this.groupBox14 = new System.Windows.Forms.GroupBox();
+            this.textBox_LogAddrEnd = new System.Windows.Forms.TextBox();
             this.label99 = new System.Windows.Forms.Label();
+            this.textBox_LogAddrBegin = new System.Windows.Forms.TextBox();
             this.button_ReadErrorLog = new System.Windows.Forms.Button();
+            this.label156 = new System.Windows.Forms.Label();
             this.button_ReadRunLog = new System.Windows.Forms.Button();
+            this.label157 = new System.Windows.Forms.Label();
             this.label96 = new System.Windows.Forms.Label();
             this.textBox_Runlog1_MCU_MIN = new System.Windows.Forms.TextBox();
             this.textBox_Runlog1_Coil_MIN = new System.Windows.Forms.TextBox();
@@ -421,10 +425,6 @@
             this.label153 = new System.Windows.Forms.Label();
             this.label154 = new System.Windows.Forms.Label();
             this.label155 = new System.Windows.Forms.Label();
-            this.textBox_LogAddrEnd = new System.Windows.Forms.TextBox();
-            this.textBox_LogAddrBegin = new System.Windows.Forms.TextBox();
-            this.label156 = new System.Windows.Forms.Label();
-            this.label157 = new System.Windows.Forms.Label();
             this.groupBox1.SuspendLayout();
             this.groupBox2.SuspendLayout();
             this.groupBox5.SuspendLayout();
@@ -3180,6 +3180,15 @@
             this.groupBox14.Text = "历史信息";
             this.groupBox14.Visible = false;
             // 
+            // textBox_LogAddrEnd
+            // 
+            this.textBox_LogAddrEnd.Location = new System.Drawing.Point(228, 492);
+            this.textBox_LogAddrEnd.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.textBox_LogAddrEnd.Name = "textBox_LogAddrEnd";
+            this.textBox_LogAddrEnd.Size = new System.Drawing.Size(80, 26);
+            this.textBox_LogAddrEnd.TabIndex = 9;
+            this.textBox_LogAddrEnd.Text = "0801F3FF";
+            // 
             // label99
             // 
             this.label99.AutoSize = true;
@@ -3190,6 +3199,15 @@
             this.label99.TabIndex = 3;
             this.label99.Text = "MOS最低温";
             // 
+            // textBox_LogAddrBegin
+            // 
+            this.textBox_LogAddrBegin.Location = new System.Drawing.Point(76, 492);
+            this.textBox_LogAddrBegin.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
+            this.textBox_LogAddrBegin.Name = "textBox_LogAddrBegin";
+            this.textBox_LogAddrBegin.Size = new System.Drawing.Size(80, 26);
+            this.textBox_LogAddrBegin.TabIndex = 10;
+            this.textBox_LogAddrBegin.Text = "0801F000";
+            // 
             // button_ReadErrorLog
             // 
             this.button_ReadErrorLog.Location = new System.Drawing.Point(226, 454);
@@ -3202,6 +3220,16 @@
             this.button_ReadErrorLog.Click += new System.EventHandler(this.button_ReadErrorLog_Click);
             this.button_ReadErrorLog.MouseHover += new System.EventHandler(this.button_ReadErrorLog_MouseHover);
             // 
+            // label156
+            // 
+            this.label156.AutoSize = true;
+            this.label156.Location = new System.Drawing.Point(159, 495);
+            this.label156.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label156.Name = "label156";
+            this.label156.Size = new System.Drawing.Size(65, 20);
+            this.label156.TabIndex = 11;
+            this.label156.Text = "结束地址";
+            // 
             // button_ReadRunLog
             // 
             this.button_ReadRunLog.Location = new System.Drawing.Point(152, 454);
@@ -3213,6 +3241,16 @@
             this.button_ReadRunLog.UseVisualStyleBackColor = true;
             this.button_ReadRunLog.Click += new System.EventHandler(this.button_ReadRunLog_Click);
             // 
+            // label157
+            // 
+            this.label157.AutoSize = true;
+            this.label157.Location = new System.Drawing.Point(6, 495);
+            this.label157.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label157.Name = "label157";
+            this.label157.Size = new System.Drawing.Size(65, 20);
+            this.label157.TabIndex = 12;
+            this.label157.Text = "起始地址";
+            // 
             // label96
             // 
             this.label96.AutoSize = true;
@@ -4740,44 +4778,6 @@
             this.label155.TabIndex = 66;
             this.label155.Text = "状态机1";
             // 
-            // textBox_LogAddrEnd
-            // 
-            this.textBox_LogAddrEnd.Location = new System.Drawing.Point(228, 492);
-            this.textBox_LogAddrEnd.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
-            this.textBox_LogAddrEnd.Name = "textBox_LogAddrEnd";
-            this.textBox_LogAddrEnd.Size = new System.Drawing.Size(80, 26);
-            this.textBox_LogAddrEnd.TabIndex = 9;
-            this.textBox_LogAddrEnd.Text = "0801F3FF";
-            // 
-            // textBox_LogAddrBegin
-            // 
-            this.textBox_LogAddrBegin.Location = new System.Drawing.Point(76, 492);
-            this.textBox_LogAddrBegin.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
-            this.textBox_LogAddrBegin.Name = "textBox_LogAddrBegin";
-            this.textBox_LogAddrBegin.Size = new System.Drawing.Size(80, 26);
-            this.textBox_LogAddrBegin.TabIndex = 10;
-            this.textBox_LogAddrBegin.Text = "0801F000";
-            // 
-            // label156
-            // 
-            this.label156.AutoSize = true;
-            this.label156.Location = new System.Drawing.Point(159, 495);
-            this.label156.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label156.Name = "label156";
-            this.label156.Size = new System.Drawing.Size(65, 20);
-            this.label156.TabIndex = 11;
-            this.label156.Text = "结束地址";
-            // 
-            // label157
-            // 
-            this.label157.AutoSize = true;
-            this.label157.Location = new System.Drawing.Point(6, 495);
-            this.label157.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label157.Name = "label157";
-            this.label157.Size = new System.Drawing.Size(65, 20);
-            this.label157.TabIndex = 12;
-            this.label157.Text = "起始地址";
-            // 
             // Form1
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -4816,7 +4816,7 @@
             this.MaximizeBox = false;
             this.Name = "Form1";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
-            this.Text = "MOTINOVA中置电机配置软件V3.0.1(内部使用)";
+            this.Text = "MOTINOVA中置电机配置软件V3.0.2(内部使用)";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
             this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed);
             this.Load += new System.EventHandler(this.Form1_Load);

+ 87 - 17
MOTINOVA_MC_Test/Form1.cs

@@ -11,6 +11,8 @@ using System.Runtime.InteropServices;
 using System.Runtime.CompilerServices;
 using System.Collections;
 using System.IO;
+using static System.Net.Mime.MediaTypeNames;
+using System.Globalization;
 
 namespace MOTINOVA_MC_Test
 {
@@ -125,6 +127,76 @@ namespace MOTINOVA_MC_Test
         public Form1()
         {
             InitializeComponent();
+
+            //检查许可
+            if (!System.IO.File.Exists(Directory.GetCurrentDirectory() + "\\licences.lic")) //未许可
+            {
+                if (MessageBox.Show("无授权,请导入许可文件!", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
+                {
+                    Licences myLicences = new Licences();
+                    myLicences.ShowDialog();
+                    //从许可文件读取内容
+                    string str_lic = aes.DecryptFromFile(myLicences.textBox_LicencePath.Text, "2D820F88F60A39D5", "3687C5216B19D16B");
+                    string PC_Code = PC_Information.GetCPUSerialNumber();
+                    if (PC_Code == str_lic) //授权码正确
+                    {
+                        aes.EncryptToFile(PC_Code, Directory.GetCurrentDirectory() + "\\licences.lic", "2D820F88F60A39D5", "3687C5216B19D16B");
+                        string strInfo = "";
+                        strInfo = "0;" + DateTime.Now.ToString("yyyyMMdd");
+                        aes.EncryptToFile(strInfo, Directory.GetCurrentDirectory() + "\\offlog", "2D820F88F60A39D5", "3687C5216B19D16B");
+                    }
+                    else //授权码错误
+                    {
+                        MessageBox.Show("许可文件无效,请联系管理员!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                        System.Environment.Exit(0);
+                    }
+                }
+                else
+                {
+                    System.Environment.Exit(0);
+                }
+            }
+            else //已授权
+            {
+                string str_Key = aes.DecryptFromFile(Directory.GetCurrentDirectory() + "\\licences.lic", "2D820F88F60A39D5", "3687C5216B19D16B");
+                //判断授权是否正确
+                if (PC_Information.GetCPUSerialNumber() == str_Key) //授权正确
+                {
+                    //检查离线使用记录文件
+                    if (!System.IO.File.Exists(Directory.GetCurrentDirectory() + "\\offlog"))
+                    {
+                        MessageBox.Show("许可文件内容缺失,请联系管理员!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                        File.Delete(Directory.GetCurrentDirectory() + "\\licences.lic");//缺少离线使用记录文件时,自动删除许可文件,下次打开重新导入许可
+                        System.Environment.Exit(0);
+                    }
+                    //获取离线使用记录并更新
+                    string UseLog = aes.DecryptFromFile(Directory.GetCurrentDirectory() + "\\offlog", "2D820F88F60A39D5", "3687C5216B19D16B");
+                    UInt32 UseTimes = Convert.ToUInt32(UseLog.Split(';')[0]);
+                    UseTimes++;
+                    string str = UseTimes.ToString() + ";" + UseLog.Split(';')[1];
+                    aes.EncryptToFile(str, Directory.GetCurrentDirectory() + "\\offlog", "2D820F88F60A39D5", "3687C5216B19D16B");
+                    //判断授权期限
+                    DateTime DataOrigin = new DateTime();
+                    DateTime.TryParseExact(UseLog.Split(';')[1], "yyyyMMdd", CultureInfo.InvariantCulture, DateTimeStyles.None, out DataOrigin);
+                    DateTime DataEnd = DataOrigin.AddDays(90);
+                    DateTime NowDate = DateTime.Now.Date;
+                    if ((NowDate > DataEnd) || (UseTimes > 1000)) //第一次打开软件90天内,或1000次内
+                    {
+                        MessageBox.Show("授权过期,请联系管理员!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                        File.Delete(Directory.GetCurrentDirectory() + "\\licences.lic");//许可过期或超出使用次数,自动删除许可文件和使用记录,下次打开重新导入许可
+                        File.Delete(Directory.GetCurrentDirectory() + "\\offlog");//许可过期或超出使用次数,自动删除许可文件和使用记录,下次打开重新导入许可
+                        System.Environment.Exit(0);
+                    }
+                }
+                else
+                {
+                    MessageBox.Show("许可文件错误,请联系管理员!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    File.Delete(Directory.GetCurrentDirectory() + "\\licences.lic");//许可过期或超出使用次数,自动删除许可文件和使用记录,下次打开重新导入许可
+                    File.Delete(Directory.GetCurrentDirectory() + "\\offlog");//许可过期或超出使用次数,自动删除许可文件和使用记录,下次打开重新导入许可
+                    System.Environment.Exit(0);
+                }
+            }
+
             //显示截图悬浮窗
             myCapture = new topFormCapture();
             myCapture.Show();
@@ -133,21 +205,12 @@ namespace MOTINOVA_MC_Test
             LocalPath = Directory.GetCurrentDirectory();
             if (Directory.Exists(LocalPath + "\\" + "MotorRunTest") == false)
                 Directory.CreateDirectory(LocalPath + "\\" + "MotorRunTest");
-            ConfigFileName = Directory.GetCurrentDirectory() + "\\" + "Config.ttcfg";
+            ConfigFileName = Directory.GetCurrentDirectory() + "\\" + "Server";
             if (File.Exists(ConfigFileName)) //存在配置文件,导入配置信息
             {
                 //打开文件
-                StreamReader objReader = new StreamReader(ConfigFileName);
-                string sLine = "";
-                ArrayList array_CfgInfo = new ArrayList();
-                array_CfgInfo.Clear();
-                while (sLine != null)
-                {
-                    sLine = objReader.ReadLine();
-                    array_CfgInfo.Add(sLine);
-                }
-                objReader.Close();
-                //解析配置文件
+                string fileInfo = aes.DecryptFromFile(ConfigFileName, "2D820F88F60A39D5", "3687C5216B19D16B");
+                string[] array_CfgInfo = fileInfo.Split(new[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries);                
                 try
                 {
                     ServerIP = array_CfgInfo[1].ToString().Split(':')[1];
@@ -166,12 +229,19 @@ namespace MOTINOVA_MC_Test
             else //不存在配置文件,生成文件写入默认值
             {
                 string CfgFileInfo = "";
+#if true //武汉
                 ServerIP = "10.177.130.30";
                 ServerPort = "15021";
                 ServerUser = "factory_test";
                 ServerPasswd = "ttium";
                 ServerPath = "MotorRunTest";
-
+#else //阿里云
+                ServerIP = "8.134.109.44";
+                ServerPort = "21";
+                ServerUser = "ttium";
+                ServerPasswd = "ttium123";
+                ServerPath = "MotorRunTest";
+#endif                
                 CfgFileInfo += "[ServerSet]" + "\r\n";
                 CfgFileInfo += "IPAddress:" + ServerIP + "\r\n";
                 CfgFileInfo += "Port:" + ServerPort + "\r\n";
@@ -179,7 +249,7 @@ namespace MOTINOVA_MC_Test
                 CfgFileInfo += "Password:" + ServerPasswd + "\r\n";
                 CfgFileInfo += "PathName:" + ServerPath + "\r\n";
                 CfgFileInfo += "Offline:" + "FALSE" + "\r\n";
-                System.IO.File.WriteAllText(ConfigFileName, CfgFileInfo);
+                aes.EncryptToFile(CfgFileInfo, ConfigFileName, "2D820F88F60A39D5", "3687C5216B19D16B");                
             }
             //配置网络FTP服务器
             myFtp.FtpOption(ServerIP, ServerPort, ServerUser, ServerPasswd);
@@ -288,7 +358,7 @@ namespace MOTINOVA_MC_Test
                     Data[0] = 0xF0;
                     SendCmd(0x7FF, 0x16, 0x2201, Data);
 
-                    while (Listening) Application.DoEvents();
+                    //while (Listening) Application.DoEvents();
                     //打开时点击,则关闭串口
                     serialPort1.Close();
                     comboBox_ComIndex.Enabled = true;
@@ -878,7 +948,7 @@ namespace MOTINOVA_MC_Test
             SendCmd((ushort)0x751, (byte)0x16, (ushort)0x2802, CtrlCode);
         }
 
-        #endregion 
+        #endregion
 
         #region 大灯开关
         //大灯关
@@ -3106,7 +3176,7 @@ namespace MOTINOVA_MC_Test
 
                     }
                 }
-#else              
+#else
                 if (radioButton_WorkMode_Confg.Checked == false)
                 {
                     timer1.Enabled = false;

+ 125 - 0
MOTINOVA_MC_Test/Licences.Designer.cs

@@ -0,0 +1,125 @@
+namespace MOTINOVA_MC_Test
+{
+    partial class Licences
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.button_Confirm = new System.Windows.Forms.Button();
+            this.label1 = new System.Windows.Forms.Label();
+            this.textBox_CPU_ID = new System.Windows.Forms.TextBox();
+            this.textBox_LicencePath = new System.Windows.Forms.TextBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.button_Select = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // button_Confirm
+            // 
+            this.button_Confirm.Location = new System.Drawing.Point(235, 175);
+            this.button_Confirm.Name = "button_Confirm";
+            this.button_Confirm.Size = new System.Drawing.Size(75, 37);
+            this.button_Confirm.TabIndex = 0;
+            this.button_Confirm.Text = "确认";
+            this.button_Confirm.UseVisualStyleBackColor = true;
+            this.button_Confirm.Click += new System.EventHandler(this.button_Confirm_Click);
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(25, 71);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(58, 21);
+            this.label1.TabIndex = 1;
+            this.label1.Text = "序列号";
+            // 
+            // textBox_CPU_ID
+            // 
+            this.textBox_CPU_ID.Location = new System.Drawing.Point(107, 68);
+            this.textBox_CPU_ID.Name = "textBox_CPU_ID";
+            this.textBox_CPU_ID.ReadOnly = true;
+            this.textBox_CPU_ID.Size = new System.Drawing.Size(203, 29);
+            this.textBox_CPU_ID.TabIndex = 2;
+            // 
+            // textBox_LicencePath
+            // 
+            this.textBox_LicencePath.Location = new System.Drawing.Point(107, 117);
+            this.textBox_LicencePath.Name = "textBox_LicencePath";
+            this.textBox_LicencePath.Size = new System.Drawing.Size(203, 29);
+            this.textBox_LicencePath.TabIndex = 4;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(25, 120);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(74, 21);
+            this.label2.TabIndex = 3;
+            this.label2.Text = "许可文件";
+            // 
+            // button_Select
+            // 
+            this.button_Select.Location = new System.Drawing.Point(325, 118);
+            this.button_Select.Name = "button_Select";
+            this.button_Select.Size = new System.Drawing.Size(34, 27);
+            this.button_Select.TabIndex = 0;
+            this.button_Select.Text = "...";
+            this.button_Select.UseVisualStyleBackColor = true;
+            this.button_Select.Click += new System.EventHandler(this.button_Select_Click);
+            // 
+            // Licences
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(384, 261);
+            this.Controls.Add(this.textBox_LicencePath);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.textBox_CPU_ID);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.button_Select);
+            this.Controls.Add(this.button_Confirm);
+            this.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.MaximizeBox = false;
+            this.Name = "Licences";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+            this.Text = "Licences";
+            this.Load += new System.EventHandler(this.Licences_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button button_Confirm;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Button button_Select;
+        public System.Windows.Forms.TextBox textBox_CPU_ID;
+        public System.Windows.Forms.TextBox textBox_LicencePath;
+    }
+}

+ 53 - 0
MOTINOVA_MC_Test/Licences.cs

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace MOTINOVA_MC_Test
+{
+    public partial class Licences : Form
+    {
+        public Licences()
+        {
+            InitializeComponent();
+        }
+
+        private void Licences_Load(object sender, EventArgs e)
+        {
+            textBox_CPU_ID.Text = PC_Information.GetCPUSerialNumber();
+            textBox_LicencePath.Text = "";
+        }
+
+        private void button_Select_Click(object sender, EventArgs e)
+        {
+            // 创建并配置OpenFileDialog
+            OpenFileDialog openFileDialog = new OpenFileDialog
+            {
+                InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop), // 初始目录
+                Filter = "许可文件(*.lic)|*.lic", // 文件过滤器
+                FilterIndex = 1, // 默认过滤器索引
+                RestoreDirectory = true // 关闭对话框后恢复当前目录
+            };
+
+            // 显示对话框并检查用户是否选择了文件
+            if (openFileDialog.ShowDialog() == DialogResult.OK)
+            {
+                // 获取选中文件的路径
+                string filePath = openFileDialog.FileName;
+
+                // 在文本框中显示文件路径
+                textBox_LicencePath.Text = filePath;
+            }
+        }
+
+        private void button_Confirm_Click(object sender, EventArgs e)
+        {
+            this.Close();
+        }
+    }
+}

+ 120 - 0
MOTINOVA_MC_Test/Licences.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>

+ 14 - 2
MOTINOVA_MC_Test/MOTINOVA_MC_Test.csproj

@@ -9,9 +9,10 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>MOTINOVA_MC_Test</RootNamespace>
     <AssemblyName>MOTINOVA_MC_Test</AssemblyName>
-    <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <IsWebBootstrapper>false</IsWebBootstrapper>
+    <TargetFrameworkProfile />
     <PublishUrl>发布\</PublishUrl>
     <Install>true</Install>
     <InstallFrom>Disk</InstallFrom>
@@ -27,7 +28,6 @@
     <UseApplicationTrust>false</UseApplicationTrust>
     <PublishWizardCompleted>true</PublishWizardCompleted>
     <BootstrapperEnabled>true</BootstrapperEnabled>
-    <TargetFrameworkProfile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -70,6 +70,7 @@
     <Reference Include="System.Data" />
     <Reference Include="System.Deployment" />
     <Reference Include="System.Drawing" />
+    <Reference Include="System.Management" />
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml" />
     <Reference Include="ZedGraph, Version=5.1.5.28844, Culture=neutral, PublicKeyToken=02a83cbd123fcd60, processorArchitecture=MSIL">
@@ -78,6 +79,7 @@
     </Reference>
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="aes.cs" />
     <Compile Include="Class1.cs" />
     <Compile Include="Form1.cs">
       <SubType>Form</SubType>
@@ -92,6 +94,13 @@
       <DependentUpon>Form2.cs</DependentUpon>
     </Compile>
     <Compile Include="ftp.cs" />
+    <Compile Include="Licences.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Licences.Designer.cs">
+      <DependentUpon>Licences.cs</DependentUpon>
+    </Compile>
+    <Compile Include="PC_Information.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="topFormCapture.cs">
@@ -106,6 +115,9 @@
     <EmbeddedResource Include="Form2.resx">
       <DependentUpon>Form2.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Licences.resx">
+      <DependentUpon>Licences.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>

+ 211 - 0
MOTINOVA_MC_Test/PC_Information.cs

@@ -0,0 +1,211 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Management;
+
+namespace MOTINOVA_MC_Test
+{
+    internal class PC_Information
+    {
+        //获取设备ID
+        public static string GetSystemID()
+        {
+            string systemId = null;
+            using (ManagementObjectSearcher mos = new ManagementObjectSearcher("select * from Win32_ComputerSystemProduct"))
+            {
+                foreach (var item in mos.Get())
+                {
+                    systemId = item["UUID"].ToString();
+                }
+            }
+            return systemId;
+        }
+
+        // 获取CPU序列号
+        public static string GetCPUSerialNumber()
+        {
+            string CPU_NO = "";//cpu序列号
+            ManagementClass managementClass = new ManagementClass("Win32_Processor");
+            ManagementObjectCollection moc = managementClass.GetInstances();
+            foreach (ManagementObject mo in moc)
+            {
+                CPU_NO = mo.Properties["ProcessorId"].Value.ToString();
+            }
+            return CPU_NO;
+        }
+
+        //主板型号
+        public static string GetBoardType()
+        {
+            string str = "";
+            ManagementObjectSearcher mos = new ManagementObjectSearcher("Select * from Win32_BaseBoard");
+            foreach (var o in mos.Get())
+            {
+                ManagementObject mo = (ManagementObject)o;
+                str = mo["Product"].ToString();
+            }
+            return str;
+        }
+
+
+        //主板制造商
+        public static string GetBoardManufacturer()
+        {
+            SelectQuery query = new SelectQuery("Select * from Win32_BaseBoard");
+            ManagementObjectSearcher mos = new ManagementObjectSearcher(query);
+            ManagementObjectCollection.ManagementObjectEnumerator data = mos.Get().GetEnumerator();
+            data.MoveNext();
+            ManagementBaseObject board = data.Current;
+
+            string baseBoradMaker = board.GetPropertyValue("Manufacturer").ToString();
+            return baseBoradMaker;
+        }
+
+
+        // 获取主板序列号
+        public static string GetBIOSSerialNumber()
+        {
+            string str = "";
+            ManagementObjectSearcher mos = new ManagementObjectSearcher("Select * from Win32_BaseBoard");
+            foreach (var o in mos.Get())
+            {
+                ManagementObject mo = (ManagementObject)o;
+                str = mo["SerialNumber"].ToString();
+            }
+            return str;
+        }
+
+        // 获取硬盘序列号
+        public static string GetHardDiskSerialNumber()
+        {
+            try
+            {
+                ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMedia");
+                string hardDiskSerialNumber = "";
+                foreach (ManagementObject mo in searcher.Get())
+                {
+                    hardDiskSerialNumber = mo["SerialNumber"].ToString().Trim();
+                    break;
+                }
+                return hardDiskSerialNumber;
+            }
+            catch
+            {
+                return "None";
+            }
+        }
+
+        // 获取网卡地址
+        public static string GetNetCardMACAddress()
+        {
+            var mac = "";
+            var mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
+            var moc = mc.GetInstances();
+            foreach (var o in moc)
+            {
+                var mo = (ManagementObject)o;
+                if (!(bool)mo["IPEnabled"]) continue;
+                mac = mo["MacAddress"].ToString();
+                break;
+            }
+            return mac;
+        }
+
+        //获取CPU型号
+        public static string GetCpuName()
+        {
+            var CPUName = "";
+            var management = new ManagementObjectSearcher("Select * from Win32_Processor");
+            foreach (var baseObject in management.Get())
+            {
+                var managementObject = (ManagementObject)baseObject;
+                CPUName = managementObject["Name"].ToString();
+            }
+            return CPUName;
+        }
+
+        //获取CPU制造厂商
+        public static string GetCpuManufacturer()
+        {
+            var CPUMakerStr = "";
+            var management = new ManagementObjectSearcher("Select * from Win32_Processor");
+            foreach (var baseObject in management.Get())
+            {
+                var managementObject = (ManagementObject)baseObject;
+                CPUMakerStr = managementObject["Manufacturer"].ToString();
+            }
+            return CPUMakerStr;
+        }
+
+        //获取IP地址
+        public static string GetIpAddress()
+        {
+            var IPv4Str = "";
+            var management = new ManagementClass("Win32_NetworkAdapterConfiguration");
+            var managementObject = management.GetInstances();
+            foreach (ManagementBaseObject managementBaseObject in managementObject)
+            {
+                var management1 = (ManagementObject)managementBaseObject;
+                if (!(bool)management1["IPEnabled"]) continue;
+                Array array = (Array)(management1.Properties["IpAddress"].Value);
+                IPv4Str = array.GetValue(0).ToString();
+                break;
+            }
+            return IPv4Str;
+        }
+
+        //操作系统
+        public static string GetSystemType()
+        {
+            var sysTypeStr = "";
+            ManagementClass mc = new ManagementClass("Win32_ComputerSystem");
+            ManagementObjectCollection moc = mc.GetInstances();
+            foreach (ManagementBaseObject o in moc)
+            {
+                ManagementObject mo = (ManagementObject)o;
+                sysTypeStr = mo["SystemType"].ToString();
+            }
+            return sysTypeStr;
+        }
+
+        //内存
+        public static float GetPhysicalMemory()
+        {
+            float memoryCount = 0;
+            var mc = new ManagementClass("Win32_ComputerSystem");
+            var moc = mc.GetInstances();
+            foreach (var o in moc)
+            {
+                var mo = (ManagementObject)o;
+                string str = mo["TotalPhysicalMemory"].ToString();//单位为 B
+                float a = long.Parse(str);
+                memoryCount = a / 1024 / 1024 / 1024;//单位换成GB
+            }
+            return memoryCount;
+        }
+
+        // 获取每一个硬盘的容量,单位GB
+        public static string GetDiskCapacity()
+        {
+            try
+            {
+                ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM win32_DiskDrive");
+                string HardDriveCapacity = "";
+                foreach (ManagementObject mo in searcher.Get())
+                {
+                    long size_B = long.Parse(mo["Size"].ToString());//
+                    float sizeGB = size_B / 1000 / 1000 / 1000;
+                    HardDriveCapacity = sizeGB.ToString() + "\n" + HardDriveCapacity;
+                }
+                return HardDriveCapacity;
+            }
+            catch
+            {
+                return "Failed to get the capacity of each disk.";
+            }
+        }
+
+    }
+}

+ 1 - 1
MOTINOVA_MC_Test/Properties/Settings.Designer.cs

@@ -12,7 +12,7 @@ namespace MOTINOVA_MC_Test.Properties {
     
     
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")]
     internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
         
         private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

+ 98 - 0
MOTINOVA_MC_Test/aes.cs

@@ -0,0 +1,98 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Security.Cryptography;
+using System.Text;
+
+namespace MOTINOVA_MC_Test
+{
+    internal class aes
+    {
+        // 加密字符串并保存到文件
+        public static void EncryptToFile(string plainText, string filePath, string key, string iv)
+        {
+            using (Aes aesAlg = Aes.Create())
+            {
+                aesAlg.Key = Encoding.UTF8.GetBytes(key);  // 密钥(必须是 16、24 或 32 字节)
+                aesAlg.IV = Encoding.UTF8.GetBytes(iv);    // 初始化向量(IV,必须是 16 字节)
+
+                using (FileStream fsEncrypt = new FileStream(filePath, FileMode.Create))
+                using (CryptoStream csEncrypt = new CryptoStream(fsEncrypt, aesAlg.CreateEncryptor(), CryptoStreamMode.Write))
+                using (StreamWriter swEncrypt = new StreamWriter(csEncrypt))
+                {
+                    swEncrypt.Write(plainText);
+                }
+            }
+        }
+
+        // 从加密文件解密刺符传
+        public static string DecryptFromFile(string filePath, string key, string iv)
+        {
+            using (Aes aesAlg = Aes.Create())
+            {
+                aesAlg.Key = Encoding.UTF8.GetBytes(key);  // 密钥(必须是 16、24 或 32 字节)
+                aesAlg.IV = Encoding.UTF8.GetBytes(iv);    // 初始化向量(IV,必须是 16 字节)
+
+                using (FileStream fsDecrypt = new FileStream(filePath, FileMode.Open))
+                using (CryptoStream csDecrypt = new CryptoStream(fsDecrypt, aesAlg.CreateDecryptor(), CryptoStreamMode.Read))
+                using (StreamReader srDecrypt = new StreamReader(csDecrypt))
+                {
+                    return srDecrypt.ReadToEnd();
+                }
+            }
+        }
+
+        // 加密字符串
+        public static string EncryptString(string plainText, string key, string iv)
+        {
+            byte[] array;
+
+            using (Aes aesAlg = Aes.Create())
+            {
+                aesAlg.Key = Encoding.UTF8.GetBytes(key);  // 密钥(必须是 16、24 或 32 字节)
+                aesAlg.IV = Encoding.UTF8.GetBytes(iv);    // 初始化向量(IV,必须是 16 字节)
+
+                ICryptoTransform encryptor = aesAlg.CreateEncryptor(aesAlg.Key, aesAlg.IV);
+
+                using (MemoryStream memoryStream = new MemoryStream())
+                {
+                    using (CryptoStream cryptoStream = new CryptoStream((Stream)memoryStream, encryptor, CryptoStreamMode.Write))
+                    {
+                        using (StreamWriter streamWriter = new StreamWriter((Stream)cryptoStream))
+                        {
+                            streamWriter.Write(plainText);
+                        }
+
+                        array = memoryStream.ToArray();
+                    }
+                }
+            }
+
+            return Convert.ToBase64String(array);
+        }
+
+        public static string DecryptString(string cipherText, string key, string iv)
+        {
+            byte[] buffer = Convert.FromBase64String(cipherText);
+
+            using (Aes aesAlg = Aes.Create())
+            {
+                aesAlg.Key = Encoding.UTF8.GetBytes(key);  // 密钥(必须是 16、24 或 32 字节)
+                aesAlg.IV = Encoding.UTF8.GetBytes(iv);    // 初始化向量(IV,必须是 16 字节)
+
+                ICryptoTransform decryptor = aesAlg.CreateDecryptor(aesAlg.Key, aesAlg.IV);
+
+                using (MemoryStream memoryStream = new MemoryStream(buffer))
+                {
+                    using (CryptoStream cryptoStream = new CryptoStream((Stream)memoryStream, decryptor, CryptoStreamMode.Read))
+                    {
+                        using (StreamReader streamReader = new StreamReader((Stream)cryptoStream))
+                        {
+                            return streamReader.ReadToEnd();
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

+ 1 - 1
MOTINOVA_MC_Test/app.config

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

+ 6 - 3
MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.application

@@ -3,15 +3,18 @@
   <assemblyIdentity name="MOTINOVA_MC_Test.application" version="1.0.2.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
   <description asmv2:publisher="P R C" asmv2:product="MOTINOVA_MC_Test" xmlns="urn:schemas-microsoft-com:asm.v1" />
   <deployment install="true" mapFileExtensions="true" />
+  <compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
+    <framework targetVersion="4.6.2" profile="Full" supportedRuntime="4.0.30319" />
+  </compatibleFrameworks>
   <dependency>
-    <dependentAssembly dependencyType="install" codebase="MOTINOVA_MC_Test.exe.manifest" size="5215">
+    <dependentAssembly dependencyType="install" codebase="MOTINOVA_MC_Test.exe.manifest" size="5017">
       <assemblyIdentity name="MOTINOVA_MC_Test.exe" version="1.0.2.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
       <hash>
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
-        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>AKwpSNiGgH9F/GT0HMfjFEMLZjM=</dsig:DigestValue>
+        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
+        <dsig:DigestValue>t6TsoGzaYRa5uveFLgD0LF382ge3snCnW7Uf7l0fwvs=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.exe


+ 1 - 1
MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.exe.config

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

+ 13 - 18
MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.exe.manifest

@@ -39,23 +39,18 @@
   </dependency>
   <dependency>
     <dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
-      <assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="2.0.50727.0" />
+      <assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" />
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
-      <assemblyIdentity name="WindowsBase" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" language="neutral" processorArchitecture="msil" />
-    </dependentAssembly>
-  </dependency>
-  <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_MC_Test.exe" size="266752">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_MC_Test.exe" size="275968">
       <assemblyIdentity name="MOTINOVA_MC_Test" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
       <hash>
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
-        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>4T60cxSFukUfm+nJ/LQEty159Ys=</dsig:DigestValue>
+        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
+        <dsig:DigestValue>VHpicJlnGughC4uL4Bqff8u3+mIF4u7gHsxtXP/Ry0Q=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>
@@ -66,18 +61,18 @@
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
-        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>BMwQ/MmSgKzmPpgjmSJ/V+P2YN8=</dsig:DigestValue>
+        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
+        <dsig:DigestValue>RjnOyzIQbo6k2kf8/LpiqSsrvLeMZCPFaomCrufslks=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>
-  <file name="MOTINOVA_MC_Test.exe.config" size="134">
+  <file name="MOTINOVA_MC_Test.exe.config" size="163">
     <hash>
       <dsig:Transforms>
         <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
       </dsig:Transforms>
-      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-      <dsig:DigestValue>ZYVCbF014jyazUw+0nEkH92/ao4=</dsig:DigestValue>
+      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
+      <dsig:DigestValue>e4SqkIFg+soKXK7pz+2sM2OYpSLtRPSUs3Gxh6u/7CA=</dsig:DigestValue>
     </hash>
   </file>
   <file name="msys.ico" size="37758">
@@ -85,8 +80,8 @@
       <dsig:Transforms>
         <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
       </dsig:Transforms>
-      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-      <dsig:DigestValue>3+uzZ/SaX0MH2/mmdshHJ39HUx8=</dsig:DigestValue>
+      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
+      <dsig:DigestValue>IPaH99HpAt89b3N6bgyo6HzCgD5vJIx7qgFiKC/vBHU=</dsig:DigestValue>
     </hash>
   </file>
   <file name="shortcut_default.ico" size="32038">
@@ -94,8 +89,8 @@
       <dsig:Transforms>
         <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
       </dsig:Transforms>
-      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-      <dsig:DigestValue>EkxX1tHYbwpGLD3e2aSvKrpf7fQ=</dsig:DigestValue>
+      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
+      <dsig:DigestValue>JIufdv9ocN4vJi9k/ZR7l1NVYHvAqtmQwqq06yyz/Vo=</dsig:DigestValue>
     </hash>
   </file>
 </asmv1:assembly>

BIN
MOTINOVA_MC_Test/bin/Debug/MOTINOVA_MC_Test.pdb


BIN
MOTINOVA_MC_Test/bin/Debug/Server


+ 2 - 0
MOTINOVA_MC_Test/bin/Debug/Server-aliyun

@@ -0,0 +1,2 @@
+å}©@M@6¾}ZÚ¯öÑcf-rK󿨟£ïõ·ŒÀ5¬Úô¸„Y€á4Ä¢ÈÏ0ûŒlPχgµ®ÝEC¦$Bš�à2�˨æ†p:š/Ä”d–ò
+Þ±÷=²n¶ó�ù`ÒÛ‘V¤î4eü½¢€åÆ…”Af
B/í1Ý

BIN
MOTINOVA_MC_Test/bin/Debug/Server-wh


BIN
MOTINOVA_MC_Test/bin/Debug/app.publish/MOTINOVA_MC_Test.exe


BIN
MOTINOVA_MC_Test/obj/Debug/DesignTimeResolveAssemblyReferences.cache


BIN
MOTINOVA_MC_Test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


BIN
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.Form1.resources


BIN
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.Form2.resources


BIN
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.Properties.Resources.resources


+ 6 - 3
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.application

@@ -3,15 +3,18 @@
   <assemblyIdentity name="MOTINOVA_MC_Test.application" version="1.0.2.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
   <description asmv2:publisher="P R C" asmv2:product="MOTINOVA_MC_Test" xmlns="urn:schemas-microsoft-com:asm.v1" />
   <deployment install="true" mapFileExtensions="true" />
+  <compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
+    <framework targetVersion="4.6.2" profile="Full" supportedRuntime="4.0.30319" />
+  </compatibleFrameworks>
   <dependency>
-    <dependentAssembly dependencyType="install" codebase="MOTINOVA_MC_Test.exe.manifest" size="5215">
+    <dependentAssembly dependencyType="install" codebase="MOTINOVA_MC_Test.exe.manifest" size="5017">
       <assemblyIdentity name="MOTINOVA_MC_Test.exe" version="1.0.2.1" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
       <hash>
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
-        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>AKwpSNiGgH9F/GT0HMfjFEMLZjM=</dsig:DigestValue>
+        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
+        <dsig:DigestValue>t6TsoGzaYRa5uveFLgD0LF382ge3snCnW7Uf7l0fwvs=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.csproj.AssemblyReference.cache


+ 1 - 1
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.csproj.CoreCompileInputs.cache

@@ -1 +1 @@
-d308014ba0d23291d764f2e268893ec4fcb1f8c662a4ae123f8dcbeb218d72f5
+b6589aa5b9b2944007fa99d4b4b3d0d7e8793c1d186b853cdf73eadf666617f9

+ 1 - 0
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.csproj.FileListAbsolute.txt

@@ -316,3 +316,4 @@ D:\笔记本20221223\zhouxiong9\Documents\Tools\ThreeSensor\MOTINOVA_MC_Test\obj
 D:\笔记本20221223\zhouxiong9\Documents\Tools\ThreeSensor\MOTINOVA_MC_Test\obj\Debug\MOTINOVA_MC_Test.pdb
 D:\笔记本20221223\zhouxiong9\Documents\Tools\ThreeSensor\MOTINOVA_MC_Test\obj\Debug\MOTINOVA_MC_Test.topFormCapture.resources
 D:\笔记本20221223\zhouxiong9\Documents\Tools\ThreeSensor\MOTINOVA_MC_Test\obj\Debug\MOTINOVA.D6365B1F.Up2Date
+D:\笔记本20221223\zhouxiong9\Documents\Tools\ThreeSensor\MOTINOVA_MC_Test\obj\Debug\MOTINOVA_MC_Test.Licences.resources

BIN
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.csproj.GenerateResource.cache


BIN
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.exe


+ 13 - 18
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.exe.manifest

@@ -39,23 +39,18 @@
   </dependency>
   <dependency>
     <dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
-      <assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="2.0.50727.0" />
+      <assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" />
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
-      <assemblyIdentity name="WindowsBase" version="3.0.0.0" publicKeyToken="31bf3856ad364e35" language="neutral" processorArchitecture="msil" />
-    </dependentAssembly>
-  </dependency>
-  <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_MC_Test.exe" size="266752">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MOTINOVA_MC_Test.exe" size="275968">
       <assemblyIdentity name="MOTINOVA_MC_Test" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
       <hash>
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
-        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>4T60cxSFukUfm+nJ/LQEty159Ys=</dsig:DigestValue>
+        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
+        <dsig:DigestValue>VHpicJlnGughC4uL4Bqff8u3+mIF4u7gHsxtXP/Ry0Q=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>
@@ -66,18 +61,18 @@
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
-        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>BMwQ/MmSgKzmPpgjmSJ/V+P2YN8=</dsig:DigestValue>
+        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
+        <dsig:DigestValue>RjnOyzIQbo6k2kf8/LpiqSsrvLeMZCPFaomCrufslks=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>
-  <file name="MOTINOVA_MC_Test.exe.config" size="134">
+  <file name="MOTINOVA_MC_Test.exe.config" size="163">
     <hash>
       <dsig:Transforms>
         <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
       </dsig:Transforms>
-      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-      <dsig:DigestValue>ZYVCbF014jyazUw+0nEkH92/ao4=</dsig:DigestValue>
+      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
+      <dsig:DigestValue>e4SqkIFg+soKXK7pz+2sM2OYpSLtRPSUs3Gxh6u/7CA=</dsig:DigestValue>
     </hash>
   </file>
   <file name="msys.ico" size="37758">
@@ -85,8 +80,8 @@
       <dsig:Transforms>
         <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
       </dsig:Transforms>
-      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-      <dsig:DigestValue>3+uzZ/SaX0MH2/mmdshHJ39HUx8=</dsig:DigestValue>
+      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
+      <dsig:DigestValue>IPaH99HpAt89b3N6bgyo6HzCgD5vJIx7qgFiKC/vBHU=</dsig:DigestValue>
     </hash>
   </file>
   <file name="shortcut_default.ico" size="32038">
@@ -94,8 +89,8 @@
       <dsig:Transforms>
         <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
       </dsig:Transforms>
-      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-      <dsig:DigestValue>EkxX1tHYbwpGLD3e2aSvKrpf7fQ=</dsig:DigestValue>
+      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
+      <dsig:DigestValue>JIufdv9ocN4vJi9k/ZR7l1NVYHvAqtmQwqq06yyz/Vo=</dsig:DigestValue>
     </hash>
   </file>
 </asmv1:assembly>

BIN
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.pdb


BIN
MOTINOVA_MC_Test/obj/Debug/MOTINOVA_MC_Test.topFormCapture.resources


BIN
MOTINOVA_MC_Test/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll


+ 1 - 1
MOTINOVA_MC_Test/packages.config

@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net30" />
+  <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net30" requireReinstallation="true" />
 </packages>