Browse Source

V1.2.6
1、电机型号和SN无效时,不上传数据。

Dail 1 năm trước cách đây
mục cha
commit
a2da747aa2

BIN
.vs/Welling_Motor_Debug_Tool/v17/.suo


+ 37 - 37
Welling_Motor_Debug_Tool/Form1.Designer.cs

@@ -320,10 +320,12 @@ namespace Welling_Motor_Debug_Tool
             this.button_ReadRamFlash = new System.Windows.Forms.Button();
             this.richTextBox_RamFlasgData = new System.Windows.Forms.RichTextBox();
             this.tabPage_FactoryMode = new System.Windows.Forms.TabPage();
+            this.button_ScanCode = new System.Windows.Forms.Button();
             this.Button_FacModePowerOff = new System.Windows.Forms.Button();
             this.Button_FacModeSaveResult = new System.Windows.Forms.Button();
             this.Button_FacModeSetMacDate = new System.Windows.Forms.Button();
             this.groupBox25 = new System.Windows.Forms.GroupBox();
+            this.button_FacModeSetName = new System.Windows.Forms.Button();
             this.label87 = new System.Windows.Forms.Label();
             this.textBox_FacModeGit = new System.Windows.Forms.TextBox();
             this.label86 = new System.Windows.Forms.Label();
@@ -334,6 +336,7 @@ namespace Welling_Motor_Debug_Tool
             this.Button_FacModeReadVer = new System.Windows.Forms.Button();
             this.label83 = new System.Windows.Forms.Label();
             this.textBox_FacModeHW = new System.Windows.Forms.TextBox();
+            this.Button_FacModeSetNum = new System.Windows.Forms.Button();
             this.label82 = new System.Windows.Forms.Label();
             this.textBox_FacModeNum = new System.Windows.Forms.TextBox();
             this.label81 = new System.Windows.Forms.Label();
@@ -415,9 +418,6 @@ namespace Welling_Motor_Debug_Tool
             this.label_Server_ComStatus = new System.Windows.Forms.Label();
             this.label_ServerStatus = new System.Windows.Forms.Label();
             this.label_PortStatus = new System.Windows.Forms.Label();
-            this.Button_FacModeSetNum = new System.Windows.Forms.Button();
-            this.button_FacModeSetName = new System.Windows.Forms.Button();
-            this.button_ScanCode = new System.Windows.Forms.Button();
             this.pictureBox2 = new System.Windows.Forms.PictureBox();
             this.menuStrip_Set.SuspendLayout();
             this.statusStrip1.SuspendLayout();
@@ -3520,6 +3520,17 @@ namespace Welling_Motor_Debug_Tool
             this.tabPage_FactoryMode.TabIndex = 10;
             this.tabPage_FactoryMode.Text = "生产模式";
             // 
+            // button_ScanCode
+            // 
+            this.button_ScanCode.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
+            this.button_ScanCode.Location = new System.Drawing.Point(704, 248);
+            this.button_ScanCode.Name = "button_ScanCode";
+            this.button_ScanCode.Size = new System.Drawing.Size(68, 60);
+            this.button_ScanCode.TabIndex = 34;
+            this.button_ScanCode.Text = "扫码\r\n写入";
+            this.button_ScanCode.UseVisualStyleBackColor = false;
+            this.button_ScanCode.Click += new System.EventHandler(this.button_ScanCode_Click);
+            // 
             // Button_FacModePowerOff
             // 
             this.Button_FacModePowerOff.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128)))));
@@ -3578,6 +3589,17 @@ namespace Welling_Motor_Debug_Tool
             this.groupBox25.TabStop = false;
             this.groupBox25.Text = "版本信息";
             // 
+            // button_FacModeSetName
+            // 
+            this.button_FacModeSetName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+            this.button_FacModeSetName.Location = new System.Drawing.Point(227, 29);
+            this.button_FacModeSetName.Name = "button_FacModeSetName";
+            this.button_FacModeSetName.Size = new System.Drawing.Size(54, 29);
+            this.button_FacModeSetName.TabIndex = 28;
+            this.button_FacModeSetName.Text = "写入";
+            this.button_FacModeSetName.UseVisualStyleBackColor = false;
+            this.button_FacModeSetName.Click += new System.EventHandler(this.button_FacModeSetName_Click);
+            // 
             // label87
             // 
             this.label87.AutoSize = true;
@@ -3669,6 +3691,17 @@ namespace Welling_Motor_Debug_Tool
             this.textBox_FacModeHW.Size = new System.Drawing.Size(227, 28);
             this.textBox_FacModeHW.TabIndex = 10;
             // 
+            // Button_FacModeSetNum
+            // 
+            this.Button_FacModeSetNum.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+            this.Button_FacModeSetNum.Location = new System.Drawing.Point(227, 58);
+            this.Button_FacModeSetNum.Name = "Button_FacModeSetNum";
+            this.Button_FacModeSetNum.Size = new System.Drawing.Size(54, 29);
+            this.Button_FacModeSetNum.TabIndex = 8;
+            this.Button_FacModeSetNum.Text = "写入";
+            this.Button_FacModeSetNum.UseVisualStyleBackColor = false;
+            this.Button_FacModeSetNum.Click += new System.EventHandler(this.Button_FacModeSetNum_Click);
+            // 
             // label82
             // 
             this.label82.AutoSize = true;
@@ -4550,39 +4583,6 @@ namespace Welling_Motor_Debug_Tool
             this.label_PortStatus.Size = new System.Drawing.Size(15, 15);
             this.label_PortStatus.TabIndex = 20;
             // 
-            // Button_FacModeSetNum
-            // 
-            this.Button_FacModeSetNum.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
-            this.Button_FacModeSetNum.Location = new System.Drawing.Point(227, 58);
-            this.Button_FacModeSetNum.Name = "Button_FacModeSetNum";
-            this.Button_FacModeSetNum.Size = new System.Drawing.Size(54, 29);
-            this.Button_FacModeSetNum.TabIndex = 8;
-            this.Button_FacModeSetNum.Text = "写入";
-            this.Button_FacModeSetNum.UseVisualStyleBackColor = false;
-            this.Button_FacModeSetNum.Click += new System.EventHandler(this.Button_FacModeSetNum_Click);
-            // 
-            // button_FacModeSetName
-            // 
-            this.button_FacModeSetName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
-            this.button_FacModeSetName.Location = new System.Drawing.Point(227, 29);
-            this.button_FacModeSetName.Name = "button_FacModeSetName";
-            this.button_FacModeSetName.Size = new System.Drawing.Size(54, 29);
-            this.button_FacModeSetName.TabIndex = 28;
-            this.button_FacModeSetName.Text = "写入";
-            this.button_FacModeSetName.UseVisualStyleBackColor = false;
-            this.button_FacModeSetName.Click += new System.EventHandler(this.button_FacModeSetName_Click);
-            // 
-            // button_ScanCode
-            // 
-            this.button_ScanCode.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
-            this.button_ScanCode.Location = new System.Drawing.Point(704, 248);
-            this.button_ScanCode.Name = "button_ScanCode";
-            this.button_ScanCode.Size = new System.Drawing.Size(68, 60);
-            this.button_ScanCode.TabIndex = 34;
-            this.button_ScanCode.Text = "扫码\r\n写入";
-            this.button_ScanCode.UseVisualStyleBackColor = false;
-            this.button_ScanCode.Click += new System.EventHandler(this.button_ScanCode_Click);
-            // 
             // pictureBox2
             // 
             this.pictureBox2.BackColor = System.Drawing.Color.DodgerBlue;
@@ -4625,7 +4625,7 @@ namespace Welling_Motor_Debug_Tool
             this.MaximizeBox = false;
             this.Name = "Form1";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
-            this.Text = "Welling中置电机调试工具V1.2.5";
+            this.Text = "Welling中置电机调试工具V1.2.6";
             this.Load += new System.EventHandler(this.Form1_Load);
             this.menuStrip_Set.ResumeLayout(false);
             this.menuStrip_Set.PerformLayout();

+ 11 - 0
Welling_Motor_Debug_Tool/Form1.cs

@@ -4076,6 +4076,17 @@ namespace Welling_Motor_Debug_Tool
                 //判断数据是否有效
                 if ((textBox_FacModeName.Text == "---") || (textBox_FacModeNum.Text == "--"))
                 {
+                    MessageBox.Show("SN无效,上传失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    break;
+                }
+                if ((textBox_FacModeName.Text == string.Empty) || (textBox_FacModeNum.Text == string.Empty))
+                {
+                    MessageBox.Show("SN无效,上传失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    break;
+                }
+                if (!textBox_FacModeName.Text.Contains("MIGIC"))
+                {
+                    MessageBox.Show("型号名无效,上传失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     break;
                 }
 

BIN
Welling_Motor_Debug_Tool/bin/Debug/Welling_Motor_Debug_Tool.exe


BIN
Welling_Motor_Debug_Tool/bin/Debug/Welling_Motor_Debug_Tool.pdb


BIN
Welling_Motor_Debug_Tool/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


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


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


BIN
Welling_Motor_Debug_Tool/obj/Debug/Welling_Motor_Debug_Tool.exe


BIN
Welling_Motor_Debug_Tool/obj/Debug/Welling_Motor_Debug_Tool.pdb