Procházet zdrojové kódy

增加时间强制格式化。

hero před 1 rokem
rodič
revize
7998b14f3f

binární
.vs/Welling_Motor_Debug_Tool/v17/.suo


+ 0 - 48
Welling_Motor_Debug_Tool/Class1.cs

@@ -1,48 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows.Forms;
-using System.Drawing;
-
-namespace Welling_Motor_Debug_Tool
-{
-    class Class_TorqueData
-    {
-        public static string String = "";
-        public static int Data = 0;
-    }
-
-    class Class_CadenceData
-    {
-        public static string String = "";
-        public static int Data = 0;
-    }
-
-    class Class_CurrentData
-    {
-        public static string String = "";
-        public static int Data = 0;
-    }
-
-    class Class_MotorSpeed
-    {
-        public static string String = "";
-        public static int Data = 0;
-    }
-
-    class Class_MotorTemp
-    {
-        public static string String = "";
-        public static int Data = 0;
-    }
-
-    class Class_Motor_Ver
-    {
-        public static string HW = "---";
-        public static string FW = "---";
-        public static string Mode = "---";
-        public static string SN = "---";
-        public static string Special = "---";
-    }
-
-}

+ 1 - 1
Welling_Motor_Debug_Tool/Welling_Motor_Debug_Tool.csproj

@@ -64,7 +64,7 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Class1.cs" />
+    <Compile Include="verInfo.cs" />
     <Compile Include="LocalInfo.cs" />
     <Compile Include="Login.cs">
       <SubType>Form</SubType>

binární
Welling_Motor_Debug_Tool/bin/Debug/Welling_Motor_Debug_Tool.pdb


+ 17 - 17
Welling_Motor_Debug_Tool/mainForm.Designer.cs

@@ -614,7 +614,7 @@ namespace Welling_Motor_Debug_Tool
             // 刷新ToolStripMenuItem
             // 
             this.刷新ToolStripMenuItem.Name = "刷新ToolStripMenuItem";
-            this.刷新ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.刷新ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
             this.刷新ToolStripMenuItem.Text = "刷新";
             this.刷新ToolStripMenuItem.Click += new System.EventHandler(this.刷新ToolStripMenuItem_Click);
             // 
@@ -623,7 +623,7 @@ namespace Welling_Motor_Debug_Tool
             this.端口号ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripComboBox_ComNum});
             this.端口号ToolStripMenuItem.Name = "端口号ToolStripMenuItem";
-            this.端口号ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.端口号ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
             this.端口号ToolStripMenuItem.Text = "端口号";
             this.端口号ToolStripMenuItem.Click += new System.EventHandler(this.ConfigFileSave_Click);
             // 
@@ -641,7 +641,7 @@ namespace Welling_Motor_Debug_Tool
             this.波特率ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripComboBox_Baudrate});
             this.波特率ToolStripMenuItem.Name = "波特率ToolStripMenuItem";
-            this.波特率ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.波特率ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
             this.波特率ToolStripMenuItem.Text = "波特率";
             // 
             // toolStripComboBox_Baudrate
@@ -660,14 +660,14 @@ namespace Welling_Motor_Debug_Tool
             // 连接ToolStripMenuItem
             // 
             this.连接ToolStripMenuItem.Name = "连接ToolStripMenuItem";
-            this.连接ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.连接ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
             this.连接ToolStripMenuItem.Text = "连接";
             this.连接ToolStripMenuItem.Click += new System.EventHandler(this.连接ToolStripMenuItem_Click);
             // 
             // toolStripSeparator1
             // 
             this.toolStripSeparator1.Name = "toolStripSeparator1";
-            this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6);
+            this.toolStripSeparator1.Size = new System.Drawing.Size(157, 6);
             // 
             // 其它配置项ToolStripMenuItem
             // 
@@ -676,7 +676,7 @@ namespace Welling_Motor_Debug_Tool
             this.断开关机ToolStripMenuItem,
             this.识别通讯盒ToolStripMenuItem});
             this.其它配置项ToolStripMenuItem.Name = "其它配置项ToolStripMenuItem";
-            this.其它配置项ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.其它配置项ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
             this.其它配置项ToolStripMenuItem.Text = "其它配置项";
             // 
             // 连接开机ToolStripMenuItem
@@ -867,7 +867,7 @@ namespace Welling_Motor_Debug_Tool
             this.生产商ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_MAC});
             this.生产商ToolStripMenuItem.Name = "生产商ToolStripMenuItem";
-            this.生产商ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.生产商ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
             this.生产商ToolStripMenuItem.Text = "生产商";
             // 
             // toolStripTextBox_MAC
@@ -883,7 +883,7 @@ namespace Welling_Motor_Debug_Tool
             this.生产地ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBoxMACAddr});
             this.生产地ToolStripMenuItem.Name = "生产地ToolStripMenuItem";
-            this.生产地ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.生产地ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
             this.生产地ToolStripMenuItem.Text = "生产地";
             // 
             // toolStripTextBoxMACAddr
@@ -899,7 +899,7 @@ namespace Welling_Motor_Debug_Tool
             this.生产日期ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_MACDate});
             this.生产日期ToolStripMenuItem.Name = "生产日期ToolStripMenuItem";
-            this.生产日期ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.生产日期ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
             this.生产日期ToolStripMenuItem.Text = "生产日期";
             // 
             // toolStripTextBox_MACDate
@@ -915,7 +915,7 @@ namespace Welling_Motor_Debug_Tool
             this.产品标识ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripTextBox_MACPD});
             this.产品标识ToolStripMenuItem.Name = "产品标识ToolStripMenuItem";
-            this.产品标识ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.产品标识ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
             this.产品标识ToolStripMenuItem.Text = "产品标识";
             // 
             // toolStripTextBox_MACPD
@@ -967,21 +967,21 @@ namespace Welling_Motor_Debug_Tool
             // 运行信息记录ToolStripMenuItem
             // 
             this.运行信息记录ToolStripMenuItem.Name = "运行信息记录ToolStripMenuItem";
-            this.运行信息记录ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.运行信息记录ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
             this.运行信息记录ToolStripMenuItem.Text = "运行信息记录";
             this.运行信息记录ToolStripMenuItem.Click += new System.EventHandler(this.记录数据ToolStripMenuItem_Click);
             // 
             // 计算器ToolStripMenuItem
             // 
             this.计算器ToolStripMenuItem.Name = "计算器ToolStripMenuItem";
-            this.计算器ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.计算器ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
             this.计算器ToolStripMenuItem.Text = "计算器";
             this.计算器ToolStripMenuItem.Click += new System.EventHandler(this.计算器ToolStripMenuItem_Click);
             // 
             // 页面保存ToolStripMenuItem
             // 
             this.页面保存ToolStripMenuItem.Name = "页面保存ToolStripMenuItem";
-            this.页面保存ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.页面保存ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
             this.页面保存ToolStripMenuItem.Text = "页面保存";
             this.页面保存ToolStripMenuItem.Click += new System.EventHandler(this.页面保存ToolStripMenuItem_Click);
             // 
@@ -991,7 +991,7 @@ namespace Welling_Motor_Debug_Tool
             this.开机ToolStripMenuItem,
             this.关机ToolStripMenuItem});
             this.系统开关ToolStripMenuItem.Name = "系统开关ToolStripMenuItem";
-            this.系统开关ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.系统开关ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
             this.系统开关ToolStripMenuItem.Text = "电源控制";
             // 
             // 开机ToolStripMenuItem
@@ -1011,7 +1011,7 @@ namespace Welling_Motor_Debug_Tool
             // 指令调试ToolStripMenuItem
             // 
             this.指令调试ToolStripMenuItem.Name = "指令调试ToolStripMenuItem";
-            this.指令调试ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
+            this.指令调试ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
             this.指令调试ToolStripMenuItem.Text = "指令调试";
             // 
             // 关于ToolStripMenuItem
@@ -5058,7 +5058,7 @@ namespace Welling_Motor_Debug_Tool
             this.label_BuildTime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(113)))), ((int)(((byte)(185)))));
             this.label_BuildTime.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label_BuildTime.ForeColor = System.Drawing.Color.White;
-            this.label_BuildTime.Location = new System.Drawing.Point(669, 622);
+            this.label_BuildTime.Location = new System.Drawing.Point(653, 622);
             this.label_BuildTime.Name = "label_BuildTime";
             this.label_BuildTime.Size = new System.Drawing.Size(162, 17);
             this.label_BuildTime.TabIndex = 10;
@@ -5070,7 +5070,7 @@ namespace Welling_Motor_Debug_Tool
             this.label_SystemTime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(113)))), ((int)(((byte)(185)))));
             this.label_SystemTime.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label_SystemTime.ForeColor = System.Drawing.Color.White;
-            this.label_SystemTime.Location = new System.Drawing.Point(845, 622);
+            this.label_SystemTime.Location = new System.Drawing.Point(840, 622);
             this.label_SystemTime.Name = "label_SystemTime";
             this.label_SystemTime.Size = new System.Drawing.Size(162, 17);
             this.label_SystemTime.TabIndex = 11;

+ 2 - 2
Welling_Motor_Debug_Tool/mainForm.cs

@@ -359,7 +359,7 @@ namespace Welling_Motor_Debug_Tool
         private void MainForm_Load(object sender, System.EventArgs e)
         {
             //页面初始化
-            label_BuildTime.Text= "编译时间:"+ System.IO.File.GetLastWriteTime(this.GetType().Assembly.Location).ToString();
+            label_BuildTime.Text = "编译时间:" + System.IO.File.GetLastWriteTime(this.GetType().Assembly.Location).ToString("yyyy-MM-dd HH:mm:ss");
             label_Computername.Text = "用户名:" + System.Environment.UserName;
 
             //下拉控件初始值设定
@@ -1745,7 +1745,7 @@ namespace Welling_Motor_Debug_Tool
         private void timer_1s_Tick(object sender, EventArgs e)
         {
             //时间更新
-            label_SystemTime.Text = "系统时间:" + DateTime.Now.ToString();
+            label_SystemTime.Text = "系统时间:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
 
             //MC_Runinfo超时清除
             if (MC_RunInfo_Refresh == false)

binární
Welling_Motor_Debug_Tool/obj/Debug/DesignTimeResolveAssemblyReferences.cache


binární
Welling_Motor_Debug_Tool/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


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

@@ -1 +1 @@
-7b98c3d3301209c65f98a41a2e3619272c69e47b
+6c70cac25efc699945f21328520acfcddc24d890

binární
Welling_Motor_Debug_Tool/obj/Debug/Welling_Motor_Debug_Tool.csproj.GenerateResource.cache


binární
Welling_Motor_Debug_Tool/obj/Debug/Welling_Motor_Debug_Tool.exe


binární
Welling_Motor_Debug_Tool/obj/Debug/Welling_Motor_Debug_Tool.pdb