diff --git a/DNSD_Controls/DNSD_Controls.csproj b/DNSD_Controls/DNSD_Controls.csproj
new file mode 100644
index 0000000..6b24501
--- /dev/null
+++ b/DNSD_Controls/DNSD_Controls.csproj
@@ -0,0 +1,56 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {EBD5CF3A-6B21-4EAD-8084-DC4D7DCB9483}
+ Library
+ Properties
+ DNSD_Controls
+ DNSD_Controls
+ v4.8
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+ UserControl
+
+
+
+
+
+
\ No newline at end of file
diff --git a/DNSD_Controls/HslLanternSimple.cs b/DNSD_Controls/HslLanternSimple.cs
new file mode 100644
index 0000000..5f0506b
--- /dev/null
+++ b/DNSD_Controls/HslLanternSimple.cs
@@ -0,0 +1,300 @@
+using System;
+using System.ComponentModel;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Drawing.Text;
+using System.Net;
+using System.Windows.Forms;
+
+namespace DNSD_Controls
+{
+ ///
+ /// 一个简约的灯控件,支持纯色和渐变色的设置
+ ///
+ // Token: 0x02000041 RID: 65
+ [Description("一个圆形的信号灯,支持设置颜色,是否渐变")]
+ public class HslLanternSimple : UserControl
+ {
+ ///
+ /// 实例化一个灯控件信息
+ ///
+ // Token: 0x0600058C RID: 1420 RVA: 0x00036A68 File Offset: 0x00034C68
+ public HslLanternSimple()
+ {
+ this.InitializeComponent();
+ this.sf = new StringFormat();
+ this.sf.Alignment = StringAlignment.Center;
+ this.sf.LineAlignment = StringAlignment.Center;
+ base.SetStyle(ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor, true);
+ base.SetStyle(ControlStyles.ResizeRedraw, true);
+ base.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+ base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+ }
+
+ ///
+ // Token: 0x0600058D RID: 1421 RVA: 0x00036B18 File Offset: 0x00034D18
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
+ e.Graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
+ e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
+ e.Graphics.CompositingQuality = CompositingQuality.HighQuality;
+ this.PaintHslControls(e.Graphics, base.Width, base.Height);
+ base.OnPaint(e);
+ }
+
+ ///
+ // Token: 0x0600058E RID: 1422 RVA: 0x00036B7C File Offset: 0x00034D7C
+ public void PaintHslControls(Graphics g, int width, int height)
+ {
+
+ if (true)
+ {
+ int num = Math.Min(width, height);
+ num--;
+ Point point = new Point(num / 2, num / 2);
+ g.TranslateTransform((float)point.X, (float)point.Y);
+ float num2 = (float)(point.X * 17) / 20f;
+ float num3 = (float)point.X / 20f;
+ bool flag2 = num2 < 2f;
+ if (!flag2)
+ {
+ RectangleF rect = new RectangleF(-num2 - 2f * num3, -num2 - 2f * num3, 2f * num2 + 4f * num3, 2f * num2 + 4f * num3);
+ RectangleF rect2 = new RectangleF(-num2, -num2, 2f * num2, 2f * num2);
+ using (Pen pen = new Pen(this.colorBackground, num3))
+ {
+ g.DrawEllipse(pen, rect);
+ }
+ bool flag3 = !this.UseGradientColor;
+ if (flag3)
+ {
+ g.FillEllipse(this.brushBackground, rect2);
+ }
+ else
+ {
+ GraphicsPath graphicsPath = new GraphicsPath();
+ graphicsPath.AddEllipse(-num2, -num2, 2f * num2, 2f * num2);
+ PathGradientBrush pathGradientBrush = new PathGradientBrush(graphicsPath);
+ pathGradientBrush.CenterPoint = new Point(0, 0);
+ pathGradientBrush.InterpolationColors = new ColorBlend
+ {
+ Positions = new float[]
+ {
+ 0f,
+ 1f
+ },
+ Colors = new Color[]
+ {
+ this.colorBackground,
+ this.centerColor
+ }
+ };
+ g.FillEllipse(pathGradientBrush, rect2);
+ using (Pen pen2 = new Pen(this.colorBackground))
+ {
+ g.DrawEllipse(pen2, -num2, -num2, 2f * num2, 2f * num2);
+ }
+ pathGradientBrush.Dispose();
+ graphicsPath.Dispose();
+ }
+ g.TranslateTransform((float)(-(float)point.X), (float)(-(float)point.Y));
+ bool flag4 = height - num > 0;
+ if (flag4)
+ {
+ bool flag5 = !string.IsNullOrEmpty(this.Text);
+ if (flag5)
+ {
+ using (Brush brush = new SolidBrush(this.ForeColor))
+ {
+ g.DrawString(this.Text, this.Font, brush, new Rectangle(0, num, num, height - num), this.sf);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ ///
+ /// 获取或设置控件的背景色
+ ///
+ // Token: 0x170001B6 RID: 438
+ // (get) Token: 0x0600058F RID: 1423 RVA: 0x00036E34 File Offset: 0x00035034
+ // (set) Token: 0x06000590 RID: 1424 RVA: 0x00036E3C File Offset: 0x0003503C
+ [Browsable(true)]
+ [Description("获取或设置控件的背景色")]
+ [Category("HslControls")]
+ [DefaultValue(typeof(Color), "Transparent")]
+ [EditorBrowsable(EditorBrowsableState.Always)]
+ public override Color BackColor
+ {
+ get
+ {
+ return base.BackColor;
+ }
+ set
+ {
+ base.BackColor = value;
+ }
+ }
+
+ ///
+ /// 获取或设置灯信号的前景色
+ ///
+ // Token: 0x170001B7 RID: 439
+ // (get) Token: 0x06000591 RID: 1425 RVA: 0x00036E48 File Offset: 0x00035048
+ // (set) Token: 0x06000592 RID: 1426 RVA: 0x00036E60 File Offset: 0x00035060
+ [Browsable(true)]
+ [Description("获取或设置信号灯的背景色")]
+ [Category("HslControls")]
+ [DefaultValue(typeof(Color), "LimeGreen")]
+ public Color LanternBackground
+ {
+ get
+ {
+ return this.colorBackground;
+ }
+ set
+ {
+ this.colorBackground = value;
+ Brush brush = this.brushBackground;
+ if (brush != null)
+ {
+ brush.Dispose();
+ }
+ this.brushBackground = new SolidBrush(this.colorBackground);
+ base.Invalidate();
+ }
+ }
+
+ ///
+ /// 获取或设置中心点的颜色,当且仅当UseGradientColor属性为True时生效
+ ///
+ // Token: 0x170001B8 RID: 440
+ // (get) Token: 0x06000593 RID: 1427 RVA: 0x00036E94 File Offset: 0x00035094
+ // (set) Token: 0x06000594 RID: 1428 RVA: 0x00036EAC File Offset: 0x000350AC
+ [Browsable(true)]
+ [Description("获取或设置中心点的颜色,当且仅当UseGradientColor属性为True时生效")]
+ [Category("HslControls")]
+ [DefaultValue(typeof(Color), "White")]
+ public Color CenterBackground
+ {
+ get
+ {
+ return this.centerColor;
+ }
+ set
+ {
+ this.centerColor = value;
+ base.Invalidate();
+ }
+ }
+
+ ///
+ /// 获取或设置当前的灯信号是否启用渐变色的画刷
+ ///
+ // Token: 0x170001B9 RID: 441
+ // (get) Token: 0x06000595 RID: 1429 RVA: 0x00036EC0 File Offset: 0x000350C0
+ // (set) Token: 0x06000596 RID: 1430 RVA: 0x00036ED8 File Offset: 0x000350D8
+ [Browsable(true)]
+ [Description("获取或设置当前的灯信号是否启用渐变色的画刷")]
+ [Category("HslControls")]
+ [DefaultValue(false)]
+ public bool UseGradientColor
+ {
+ get
+ {
+ return this.isUseGradientColor;
+ }
+ set
+ {
+ this.isUseGradientColor = value;
+ base.Invalidate();
+ }
+ }
+
+ ///
+ /// 获取或设置当前控件的文本
+ ///
+ // Token: 0x170001BA RID: 442
+ // (get) Token: 0x06000597 RID: 1431 RVA: 0x00036EEC File Offset: 0x000350EC
+ // (set) Token: 0x06000598 RID: 1432 RVA: 0x00036F04 File Offset: 0x00035104
+ [Browsable(true)]
+ [Description("获取或设置当前控件的文本")]
+ [Category("HslControls")]
+ [EditorBrowsable(EditorBrowsableState.Always)]
+ [Bindable(true)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
+ public override string Text
+ {
+ get
+ {
+ return base.Text;
+ }
+ set
+ {
+ base.Text = value;
+ base.Invalidate();
+ }
+ }
+
+ ///
+ /// 触发一次鼠标点击的事件
+ ///
+ // Token: 0x06000599 RID: 1433 RVA: 0x00036F16 File Offset: 0x00035116
+ public void PerformClick()
+ {
+ this.OnClick(new EventArgs());
+ }
+
+ ///
+ /// 清理所有正在使用的资源。
+ ///
+ /// 如果应释放托管资源,为 true;否则为 false。
+ // Token: 0x0600059A RID: 1434 RVA: 0x00036F28 File Offset: 0x00035128
+ protected override void Dispose(bool disposing)
+ {
+ bool flag = disposing && this.components != null;
+ if (flag)
+ {
+ this.components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ ///
+ /// 设计器支持所需的方法 - 不要修改
+ /// 使用代码编辑器修改此方法的内容。
+ ///
+ // Token: 0x0600059B RID: 1435 RVA: 0x00036F60 File Offset: 0x00035160
+ private void InitializeComponent()
+ {
+ base.SuspendLayout();
+ base.AutoScaleMode = AutoScaleMode.None;
+ this.BackColor = Color.Transparent;
+ base.Name = "HslLanternSimple";
+ base.Size = new Size(78, 94);
+ base.ResumeLayout(false);
+ }
+
+ // Token: 0x040002C7 RID: 711
+ private Color colorBackground = Color.LimeGreen;
+
+ // Token: 0x040002C8 RID: 712
+ private Brush brushBackground = new SolidBrush(Color.LimeGreen);
+
+ // Token: 0x040002C9 RID: 713
+ private StringFormat sf = null;
+
+ // Token: 0x040002CA RID: 714
+ private Color centerColor = Color.White;
+
+ // Token: 0x040002CB RID: 715
+ private bool isUseGradientColor = false;
+
+ ///
+ /// 必需的设计器变量。
+ ///
+ // Token: 0x040002CC RID: 716
+ private IContainer components = null;
+ }
+}
\ No newline at end of file
diff --git a/DNSD_Controls/Properties/AssemblyInfo.cs b/DNSD_Controls/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..21bd3f9
--- /dev/null
+++ b/DNSD_Controls/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("DNSD_Controls")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("DNSD_Controls")]
+[assembly: AssemblyCopyright("Copyright © 2024")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("EBD5CF3A-6B21-4EAD-8084-DC4D7DCB9483")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
\ No newline at end of file
diff --git a/DNSD_DB/DNSD_DB.csproj b/DNSD_DB/DNSD_DB.csproj
index 6a088cf..c67b71e 100644
--- a/DNSD_DB/DNSD_DB.csproj
+++ b/DNSD_DB/DNSD_DB.csproj
@@ -58,6 +58,7 @@
+
diff --git a/DNSD_DB/Mapper/StudentMap.cs b/DNSD_DB/Mapper/StudentMap.cs
new file mode 100644
index 0000000..a94136c
--- /dev/null
+++ b/DNSD_DB/Mapper/StudentMap.cs
@@ -0,0 +1,13 @@
+using Chloe.Entity;
+
+namespace DNSD_DB.Mapper
+{
+ public class StudentMap:EntityTypeBuilder
+ {
+ public StudentMap()
+ {
+ this.MapTo("Student");
+ this.Property(a => a.ID).IsAutoIncrement().IsPrimaryKey();
+ }
+ }
+}
\ No newline at end of file
diff --git a/DNSD_DB/SqlLiteTool.cs b/DNSD_DB/SqlLiteTool.cs
index e2614a4..93e2385 100644
--- a/DNSD_DB/SqlLiteTool.cs
+++ b/DNSD_DB/SqlLiteTool.cs
@@ -1,7 +1,9 @@
using Chloe;
+using Chloe.Infrastructure;
using Chloe.RDBMS.DDL;
using Chloe.SQLite;
using Chloe.SQLite.DDL;
+using DNSD_DB.Mapper;
namespace DNSD_DB
{
@@ -11,6 +13,7 @@ namespace DNSD_DB
public static void CreateTable(string db)
{
+ DbConfiguration.UseTypeBuilders(typeof(StudentMap));
IDbContext dbContext = new SQLiteContext(new SQLiteConnectionFactory(db));
new SQLiteTableGenerator(dbContext).CreateTables(TableCreateMode.CreateIfNotExists);
}
diff --git a/DNSD_DB/Student.cs b/DNSD_DB/Student.cs
index a1a915d..ed04b87 100644
--- a/DNSD_DB/Student.cs
+++ b/DNSD_DB/Student.cs
@@ -11,7 +11,7 @@ namespace DNSD_DB
[Column(IsPrimaryKey = true)]
[AutoIncrement]
[DisplayName("学生ID")]
- public int StudentID { get; set; }
+ public int ID { get; set; }
///
/// 班级ID
diff --git a/NDSD-Screwdriver.sln b/NDSD-Screwdriver.sln
index 9956c98..66b8ed0 100644
--- a/NDSD-Screwdriver.sln
+++ b/NDSD-Screwdriver.sln
@@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NDSD_TouchSocket", "NDSD-To
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DNSD_DB", "DNSD_DB\DNSD_DB.csproj", "{CA803C5B-CD45-478C-B427-DDA95C4BDFC3}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DNSD_Controls", "DNSD_Controls\DNSD_Controls.csproj", "{EBD5CF3A-6B21-4EAD-8084-DC4D7DCB9483}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -27,6 +29,10 @@ Global
{CA803C5B-CD45-478C-B427-DDA95C4BDFC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA803C5B-CD45-478C-B427-DDA95C4BDFC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CA803C5B-CD45-478C-B427-DDA95C4BDFC3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EBD5CF3A-6B21-4EAD-8084-DC4D7DCB9483}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EBD5CF3A-6B21-4EAD-8084-DC4D7DCB9483}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EBD5CF3A-6B21-4EAD-8084-DC4D7DCB9483}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EBD5CF3A-6B21-4EAD-8084-DC4D7DCB9483}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/NDSD-Screwdriver/NDSD_Screwdriver.csproj b/NDSD-Screwdriver/NDSD_Screwdriver.csproj
index 3a5e7ba..560216f 100644
--- a/NDSD-Screwdriver/NDSD_Screwdriver.csproj
+++ b/NDSD-Screwdriver/NDSD_Screwdriver.csproj
@@ -113,6 +113,10 @@
+
+ {EBD5CF3A-6B21-4EAD-8084-DC4D7DCB9483}
+ DNSD_Controls
+
{ca803c5b-cd45-478c-b427-dda95c4bdfc3}
DNSD_DB
@@ -123,9 +127,7 @@
-
- Always
-
+
Always
diff --git a/NDSD-Screwdriver/ScrewdriverTest.Designer.cs b/NDSD-Screwdriver/ScrewdriverTest.Designer.cs
index 1717a6e..43e3a03 100644
--- a/NDSD-Screwdriver/ScrewdriverTest.Designer.cs
+++ b/NDSD-Screwdriver/ScrewdriverTest.Designer.cs
@@ -44,9 +44,10 @@
//
// DOpenButton
//
- this.DOpenButton.Location = new System.Drawing.Point(65, 48);
+ this.DOpenButton.Location = new System.Drawing.Point(73, 58);
+ this.DOpenButton.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.DOpenButton.Name = "DOpenButton";
- this.DOpenButton.Size = new System.Drawing.Size(100, 30);
+ this.DOpenButton.Size = new System.Drawing.Size(112, 36);
this.DOpenButton.TabIndex = 0;
this.DOpenButton.Text = "开启";
this.DOpenButton.UseVisualStyleBackColor = true;
@@ -54,9 +55,10 @@
//
// DCloseButton
//
- this.DCloseButton.Location = new System.Drawing.Point(65, 84);
+ this.DCloseButton.Location = new System.Drawing.Point(73, 101);
+ this.DCloseButton.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.DCloseButton.Name = "DCloseButton";
- this.DCloseButton.Size = new System.Drawing.Size(100, 30);
+ this.DCloseButton.Size = new System.Drawing.Size(112, 36);
this.DCloseButton.TabIndex = 1;
this.DCloseButton.Text = "关闭";
this.DCloseButton.UseVisualStyleBackColor = true;
@@ -64,17 +66,19 @@
//
// DNoTextBox
//
- this.DNoTextBox.Location = new System.Drawing.Point(65, 17);
+ this.DNoTextBox.Location = new System.Drawing.Point(73, 20);
+ this.DNoTextBox.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.DNoTextBox.Name = "DNoTextBox";
- this.DNoTextBox.Size = new System.Drawing.Size(100, 25);
+ this.DNoTextBox.Size = new System.Drawing.Size(112, 28);
this.DNoTextBox.TabIndex = 2;
this.DNoTextBox.Text = "1";
//
// DOpenAll
//
- this.DOpenAll.Location = new System.Drawing.Point(65, 120);
+ this.DOpenAll.Location = new System.Drawing.Point(73, 144);
+ this.DOpenAll.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.DOpenAll.Name = "DOpenAll";
- this.DOpenAll.Size = new System.Drawing.Size(100, 30);
+ this.DOpenAll.Size = new System.Drawing.Size(112, 36);
this.DOpenAll.TabIndex = 3;
this.DOpenAll.Text = "全部开启";
this.DOpenAll.UseVisualStyleBackColor = true;
@@ -82,9 +86,10 @@
//
// DCloseAll
//
- this.DCloseAll.Location = new System.Drawing.Point(65, 156);
+ this.DCloseAll.Location = new System.Drawing.Point(73, 187);
+ this.DCloseAll.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.DCloseAll.Name = "DCloseAll";
- this.DCloseAll.Size = new System.Drawing.Size(100, 30);
+ this.DCloseAll.Size = new System.Drawing.Size(112, 36);
this.DCloseAll.TabIndex = 4;
this.DCloseAll.Text = "全部关闭";
this.DCloseAll.UseVisualStyleBackColor = true;
@@ -92,17 +97,19 @@
//
// DelayTimeTextBox
//
- this.DelayTimeTextBox.Location = new System.Drawing.Point(240, 17);
+ this.DelayTimeTextBox.Location = new System.Drawing.Point(270, 20);
+ this.DelayTimeTextBox.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.DelayTimeTextBox.Name = "DelayTimeTextBox";
- this.DelayTimeTextBox.Size = new System.Drawing.Size(100, 25);
+ this.DelayTimeTextBox.Size = new System.Drawing.Size(112, 28);
this.DelayTimeTextBox.TabIndex = 7;
this.DelayTimeTextBox.Text = "1";
//
// DelayButton
//
- this.DelayButton.Location = new System.Drawing.Point(240, 48);
+ this.DelayButton.Location = new System.Drawing.Point(270, 58);
+ this.DelayButton.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.DelayButton.Name = "DelayButton";
- this.DelayButton.Size = new System.Drawing.Size(100, 30);
+ this.DelayButton.Size = new System.Drawing.Size(112, 36);
this.DelayButton.TabIndex = 5;
this.DelayButton.Text = "计时开启";
this.DelayButton.UseVisualStyleBackColor = true;
@@ -111,26 +118,27 @@
// label1
//
this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(12, 20);
+ this.label1.Location = new System.Drawing.Point(14, 24);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(47, 15);
+ this.label1.Size = new System.Drawing.Size(53, 18);
this.label1.TabIndex = 9;
this.label1.Text = "DO No";
//
// label3
//
this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(171, 20);
+ this.label3.Location = new System.Drawing.Point(192, 24);
this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(63, 15);
+ this.label3.Size = new System.Drawing.Size(71, 18);
this.label3.TabIndex = 11;
this.label3.Text = "DO Time";
//
// AllTimeButton
//
- this.AllTimeButton.Location = new System.Drawing.Point(240, 84);
+ this.AllTimeButton.Location = new System.Drawing.Point(270, 101);
+ this.AllTimeButton.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.AllTimeButton.Name = "AllTimeButton";
- this.AllTimeButton.Size = new System.Drawing.Size(100, 30);
+ this.AllTimeButton.Size = new System.Drawing.Size(112, 36);
this.AllTimeButton.TabIndex = 12;
this.AllTimeButton.Text = "全部计时开";
this.AllTimeButton.UseVisualStyleBackColor = true;
@@ -138,26 +146,27 @@
//
// DelaySpanTextBox
//
- this.DelaySpanTextBox.Location = new System.Drawing.Point(240, 161);
+ this.DelaySpanTextBox.Location = new System.Drawing.Point(270, 193);
+ this.DelaySpanTextBox.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.DelaySpanTextBox.Name = "DelaySpanTextBox";
- this.DelaySpanTextBox.Size = new System.Drawing.Size(100, 25);
+ this.DelaySpanTextBox.Size = new System.Drawing.Size(112, 28);
this.DelaySpanTextBox.TabIndex = 13;
this.DelaySpanTextBox.Text = "100";
//
// label2
//
this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(228, 143);
+ this.label2.Location = new System.Drawing.Point(256, 172);
this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(129, 15);
+ this.label2.Size = new System.Drawing.Size(152, 18);
this.label2.TabIndex = 14;
this.label2.Text = "全启间隔时间(ms)";
//
// ScrewdriverTest
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(385, 202);
+ this.ClientSize = new System.Drawing.Size(433, 407);
this.Controls.Add(this.label2);
this.Controls.Add(this.DelaySpanTextBox);
this.Controls.Add(this.AllTimeButton);
@@ -170,6 +179,7 @@
this.Controls.Add(this.DNoTextBox);
this.Controls.Add(this.DCloseButton);
this.Controls.Add(this.DOpenButton);
+ this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "ScrewdriverTest";
this.Text = "螺丝刀测试";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ScrewdriverTest_FormClosed);
diff --git a/NDSD-Screwdriver/ScrewdriverTest.cs b/NDSD-Screwdriver/ScrewdriverTest.cs
index cff8884..76e0425 100644
--- a/NDSD-Screwdriver/ScrewdriverTest.cs
+++ b/NDSD-Screwdriver/ScrewdriverTest.cs
@@ -9,6 +9,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
+using DNSD_DB;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;
@@ -117,10 +118,8 @@ namespace NDSD_Screwdriver
private void AllTimeButton_Click(object sender, EventArgs e)
{
- int span;
- int.TryParse(DelaySpanTextBox.Text, out span);
- int time;
- int.TryParse(DelayTimeTextBox.Text, out time);
+ int.TryParse(DelaySpanTextBox.Text, out var span);
+ int.TryParse(DelayTimeTextBox.Text, out var time);
if (span <= 0 || time <= 0)
{
MessageBox.Show("属性值无效!");
diff --git a/NDSD-Screwdriver/ndsd.db b/NDSD-Screwdriver/ndsd.db
index 243804d..80bf157 100644
Binary files a/NDSD-Screwdriver/ndsd.db and b/NDSD-Screwdriver/ndsd.db differ