callm il y a 1 semaine
Parent
commit
4a71419f72

+ 7 - 0
UAS-出货标签管理(贸易版-正常)/.workbuddy/memory/2026-11-17.md

@@ -0,0 +1,7 @@
+# 2026-11-17
+
+### 登录界面优化(15:26)
+- 问题: Login.Designer.cs 是高DPI下设计(AutoScaleDimensions=12F,24F, ClientSize=1768x922), 普通屏上缩放后窗口超屏、控件错位; Login_Paint 卡片坐标写死(141,80,600,300)与控件不对应
+- 修复: 重写 Login.Designer.cs 为正常DPI 620x430 固定布局(AutoScaleDimensions=6F,12F, FormBorderStyle.FixedSingle 不可缩放, BackgroundImageLayout=Stretch), 控件坐标对齐(账号/密码/账套行 y=128/188/248)
+- Login_Paint 改为动态计算圆角卡片(ClientSize-边距), using 释放画笔
+- 控件名/事件保持不变(LoginIcon_Click/PassWord_KeyDown/Login_Load/Login_FormClosing/Login_Paint), Login.cs 逻辑零改动

+ 69 - 106
UAS-出货标签管理(贸易版-正常)/Login.Designer.cs

@@ -10,7 +10,7 @@
         /// <summary>
         /// <summary>
         /// Clean up any resources being used.
         /// Clean up any resources being used.
         /// </summary>
         /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false</param>
         protected override void Dispose(bool disposing)
         protected override void Dispose(bool disposing)
         {
         {
             if (disposing && (components != null))
             if (disposing && (components != null))
@@ -38,162 +38,125 @@
             this.label3 = new System.Windows.Forms.Label();
             this.label3 = new System.Windows.Forms.Label();
             this.MasterCombox = new System.Windows.Forms.ComboBox();
             this.MasterCombox = new System.Windows.Forms.ComboBox();
             this.Master = new System.Windows.Forms.Label();
             this.Master = new System.Windows.Forms.Label();
-            this.label4 = new System.Windows.Forms.Label();
-            this.IP = new System.Windows.Forms.TextBox();
             this.ComData = new System.Windows.Forms.BindingSource(this.components);
             this.ComData = new System.Windows.Forms.BindingSource(this.components);
             this.FTPNet = new System.Windows.Forms.CheckBox();
             this.FTPNet = new System.Windows.Forms.CheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.LoginIcon)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.LoginIcon)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComData)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComData)).BeginInit();
             this.SuspendLayout();
             this.SuspendLayout();
-            // 
-            // pictureBox1
-            // 
+            //
+            // pictureBox1 用户图标
+            //
             this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
             this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
             this.pictureBox1.Image = global::UAS_LabelMachine.Properties.Resources.users_user_72px_523311_easyicon_net;
             this.pictureBox1.Image = global::UAS_LabelMachine.Properties.Resources.users_user_72px_523311_easyicon_net;
-            this.pictureBox1.Location = new System.Drawing.Point(468, 362);
-            this.pictureBox1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.pictureBox1.Location = new System.Drawing.Point(70, 190);
             this.pictureBox1.Name = "pictureBox1";
             this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(144, 144);
+            this.pictureBox1.Size = new System.Drawing.Size(72, 72);
+            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
             this.pictureBox1.TabIndex = 0;
             this.pictureBox1.TabIndex = 0;
             this.pictureBox1.TabStop = false;
             this.pictureBox1.TabStop = false;
-            // 
-            // label1
-            // 
+            //
+            // label1 标题
+            //
             this.label1.AutoSize = true;
             this.label1.AutoSize = true;
             this.label1.BackColor = System.Drawing.Color.Transparent;
             this.label1.BackColor = System.Drawing.Color.Transparent;
-            this.label1.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.ForeColor = System.Drawing.SystemColors.Desktop;
-            this.label1.Location = new System.Drawing.Point(684, 250);
-            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Bold);
+            this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(34)))), ((int)(((byte)(78)))), ((int)(((byte)(110)))));
+            this.label1.Location = new System.Drawing.Point(120, 22);
             this.label1.Name = "label1";
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(472, 55);
             this.label1.TabIndex = 1;
             this.label1.TabIndex = 1;
-            this.label1.Text = "出货标签管理系统(金蝶)";
-            // 
+            this.label1.Text = "出货标签管理系统(金蝶AI)";
+            //
             // UserName
             // UserName
-            // 
-            this.UserName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.UserName.Location = new System.Drawing.Point(738, 336);
-            this.UserName.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            //
+            this.UserName.Font = new System.Drawing.Font("微软雅黑", 10.5F);
+            this.UserName.Location = new System.Drawing.Point(285, 128);
             this.UserName.Name = "UserName";
             this.UserName.Name = "UserName";
-            this.UserName.Size = new System.Drawing.Size(388, 50);
+            this.UserName.Size = new System.Drawing.Size(270, 28);
             this.UserName.TabIndex = 2;
             this.UserName.TabIndex = 2;
-            // 
+            //
             // PassWord
             // PassWord
-            // 
-            this.PassWord.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PassWord.Location = new System.Drawing.Point(738, 412);
-            this.PassWord.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            //
+            this.PassWord.Font = new System.Drawing.Font("微软雅黑", 10.5F);
+            this.PassWord.Location = new System.Drawing.Point(285, 188);
             this.PassWord.Name = "PassWord";
             this.PassWord.Name = "PassWord";
             this.PassWord.PasswordChar = '*';
             this.PassWord.PasswordChar = '*';
-            this.PassWord.Size = new System.Drawing.Size(388, 50);
+            this.PassWord.Size = new System.Drawing.Size(270, 28);
             this.PassWord.TabIndex = 3;
             this.PassWord.TabIndex = 3;
             this.PassWord.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PassWord_KeyDown);
             this.PassWord.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PassWord_KeyDown);
-            // 
-            // LoginIcon
-            // 
+            //
+            // LoginIcon 登录按钮
+            //
             this.LoginIcon.BackColor = System.Drawing.Color.Transparent;
             this.LoginIcon.BackColor = System.Drawing.Color.Transparent;
             this.LoginIcon.Cursor = System.Windows.Forms.Cursors.Hand;
             this.LoginIcon.Cursor = System.Windows.Forms.Cursors.Hand;
             this.LoginIcon.Image = global::UAS_LabelMachine.Properties.Resources.Login_Icon;
             this.LoginIcon.Image = global::UAS_LabelMachine.Properties.Resources.Login_Icon;
-            this.LoginIcon.Location = new System.Drawing.Point(846, 646);
-            this.LoginIcon.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.LoginIcon.Location = new System.Drawing.Point(250, 315);
             this.LoginIcon.Name = "LoginIcon";
             this.LoginIcon.Name = "LoginIcon";
-            this.LoginIcon.Size = new System.Drawing.Size(144, 52);
+            this.LoginIcon.Size = new System.Drawing.Size(120, 42);
+            this.LoginIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
             this.LoginIcon.TabIndex = 4;
             this.LoginIcon.TabIndex = 4;
             this.LoginIcon.TabStop = false;
             this.LoginIcon.TabStop = false;
             this.LoginIcon.Click += new System.EventHandler(this.LoginIcon_Click);
             this.LoginIcon.Click += new System.EventHandler(this.LoginIcon_Click);
-            // 
-            // label2
-            // 
+            //
+            // label2 账号
+            //
             this.label2.AutoSize = true;
             this.label2.AutoSize = true;
             this.label2.BackColor = System.Drawing.Color.Transparent;
             this.label2.BackColor = System.Drawing.Color.Transparent;
-            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(642, 342);
-            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F);
+            this.label2.Location = new System.Drawing.Point(205, 133);
             this.label2.Name = "label2";
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(82, 41);
             this.label2.TabIndex = 5;
             this.label2.TabIndex = 5;
-            this.label2.Text = "账号";
-            // 
-            // label3
-            // 
+            this.label2.Text = "账号:";
+            //
+            // label3 密码
+            //
             this.label3.AutoSize = true;
             this.label3.AutoSize = true;
             this.label3.BackColor = System.Drawing.Color.Transparent;
             this.label3.BackColor = System.Drawing.Color.Transparent;
-            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(642, 418);
-            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 10.5F);
+            this.label3.Location = new System.Drawing.Point(205, 193);
             this.label3.Name = "label3";
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(82, 41);
             this.label3.TabIndex = 6;
             this.label3.TabIndex = 6;
-            this.label3.Text = "密码";
-            // 
+            this.label3.Text = "密码:";
+            //
             // MasterCombox
             // MasterCombox
-            // 
+            //
             this.MasterCombox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.MasterCombox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.MasterCombox.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.MasterCombox.Font = new System.Drawing.Font("微软雅黑", 10.5F);
             this.MasterCombox.FormattingEnabled = true;
             this.MasterCombox.FormattingEnabled = true;
-            this.MasterCombox.Location = new System.Drawing.Point(738, 494);
-            this.MasterCombox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.MasterCombox.Location = new System.Drawing.Point(285, 248);
             this.MasterCombox.Name = "MasterCombox";
             this.MasterCombox.Name = "MasterCombox";
-            this.MasterCombox.Size = new System.Drawing.Size(388, 49);
+            this.MasterCombox.Size = new System.Drawing.Size(270, 28);
             this.MasterCombox.TabIndex = 7;
             this.MasterCombox.TabIndex = 7;
-            // 
-            // Master
-            // 
+            //
+            // Master 账套
+            //
             this.Master.AutoSize = true;
             this.Master.AutoSize = true;
             this.Master.BackColor = System.Drawing.Color.Transparent;
             this.Master.BackColor = System.Drawing.Color.Transparent;
-            this.Master.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Master.Location = new System.Drawing.Point(642, 500);
-            this.Master.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.Master.Font = new System.Drawing.Font("微软雅黑", 10.5F);
+            this.Master.Location = new System.Drawing.Point(205, 253);
             this.Master.Name = "Master";
             this.Master.Name = "Master";
-            this.Master.Size = new System.Drawing.Size(82, 41);
             this.Master.TabIndex = 8;
             this.Master.TabIndex = 8;
-            this.Master.Text = "账套";
-            // 
-            // label4
-            // 
-            this.label4.AutoSize = true;
-            this.label4.BackColor = System.Drawing.Color.Transparent;
-            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(642, 576);
-            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(47, 41);
-            this.label4.TabIndex = 10;
-            this.label4.Text = "IP";
-            // 
-            // IP
-            // 
-            this.IP.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.IP.Location = new System.Drawing.Point(738, 570);
-            this.IP.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
-            this.IP.Name = "IP";
-            this.IP.Size = new System.Drawing.Size(388, 50);
-            this.IP.TabIndex = 9;
-            // 
+            this.Master.Text = "账套:";
+            //
             // FTPNet
             // FTPNet
-            // 
+            //
             this.FTPNet.AutoSize = true;
             this.FTPNet.AutoSize = true;
-            this.FTPNet.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.FTPNet.Location = new System.Drawing.Point(1168, 336);
-            this.FTPNet.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.FTPNet.Font = new System.Drawing.Font("微软雅黑", 9F);
+            this.FTPNet.Location = new System.Drawing.Point(470, 92);
             this.FTPNet.Name = "FTPNet";
             this.FTPNet.Name = "FTPNet";
-            this.FTPNet.Size = new System.Drawing.Size(151, 40);
             this.FTPNet.TabIndex = 11;
             this.FTPNet.TabIndex = 11;
             this.FTPNet.Text = "FTP内网";
             this.FTPNet.Text = "FTP内网";
             this.FTPNet.UseVisualStyleBackColor = true;
             this.FTPNet.UseVisualStyleBackColor = true;
             this.FTPNet.Visible = false;
             this.FTPNet.Visible = false;
-            // 
+            //
             // Login
             // Login
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            //
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackgroundImage = global::UAS_LabelMachine.Properties.Resources.timg;
             this.BackgroundImage = global::UAS_LabelMachine.Properties.Resources.timg;
-            this.ClientSize = new System.Drawing.Size(1768, 922);
+            this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+            this.ClientSize = new System.Drawing.Size(620, 430);
             this.Controls.Add(this.FTPNet);
             this.Controls.Add(this.FTPNet);
-            this.Controls.Add(this.label4);
-            this.Controls.Add(this.IP);
             this.Controls.Add(this.Master);
             this.Controls.Add(this.Master);
             this.Controls.Add(this.MasterCombox);
             this.Controls.Add(this.MasterCombox);
             this.Controls.Add(this.label3);
             this.Controls.Add(this.label3);
@@ -201,11 +164,13 @@
             this.Controls.Add(this.LoginIcon);
             this.Controls.Add(this.LoginIcon);
             this.Controls.Add(this.PassWord);
             this.Controls.Add(this.PassWord);
             this.Controls.Add(this.UserName);
             this.Controls.Add(this.UserName);
-            this.Controls.Add(this.label1);
             this.Controls.Add(this.pictureBox1);
             this.Controls.Add(this.pictureBox1);
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
-            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.Controls.Add(this.label1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
             this.Name = "Login";
             this.Name = "Login";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "出货标签管理系统";
             this.Text = "出货标签管理系统";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Login_FormClosing);
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Login_FormClosing);
             this.Load += new System.EventHandler(this.Login_Load);
             this.Load += new System.EventHandler(this.Login_Load);
@@ -213,7 +178,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.LoginIcon)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.LoginIcon)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComData)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComData)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
             this.PerformLayout();
 
 
         }
         }
@@ -229,9 +194,7 @@
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.Label label3;
         private System.Windows.Forms.ComboBox MasterCombox;
         private System.Windows.Forms.ComboBox MasterCombox;
         private System.Windows.Forms.Label Master;
         private System.Windows.Forms.Label Master;
-        private System.Windows.Forms.Label label4;
-        private System.Windows.Forms.TextBox IP;
         private System.Windows.Forms.BindingSource ComData;
         private System.Windows.Forms.BindingSource ComData;
         private System.Windows.Forms.CheckBox FTPNet;
         private System.Windows.Forms.CheckBox FTPNet;
     }
     }
-}
+}

+ 25 - 11
UAS-出货标签管理(贸易版-正常)/Login.cs

@@ -45,7 +45,6 @@ namespace UAS_LabelMachine
             UserName.Text = Properties.Settings.Default.LastLoginUser;
             UserName.Text = Properties.Settings.Default.LastLoginUser;
             MasterCombox.Text = Properties.Settings.Default.LastLoginMaster;
             MasterCombox.Text = Properties.Settings.Default.LastLoginMaster;
             FTPNet.Checked = Properties.Settings.Default.FTPNET;
             FTPNet.Checked = Properties.Settings.Default.FTPNET;
-            IP.Text = Properties.Settings.Default.IPAddress;
             //如果上次的用户名不为空则直接跳到密码输入框
             //如果上次的用户名不为空则直接跳到密码输入框
             if (UserName.Text != "")
             if (UserName.Text != "")
                 PassWord.Select();
                 PassWord.Select();
@@ -71,7 +70,6 @@ namespace UAS_LabelMachine
             //设置当前账套
             //设置当前账套
             SystemInf.Master = MasterCombox.SelectedValue.ToString();
             SystemInf.Master = MasterCombox.SelectedValue.ToString();
             SystemInf.sdh = sdh = new SqliteDBHelper(SystemInf.Master + ".db3");
             SystemInf.sdh = sdh = new SqliteDBHelper(SystemInf.Master + ".db3");
-            SystemInf.IP = IP.Text;
             //设置了Connection,重新执行构造函数,重置数据库连接
             //设置了Connection,重新执行构造函数,重置数据库连接
             dh = new DataHelper();
             dh = new DataHelper();
             string oMsg = "";
             string oMsg = "";
@@ -84,7 +82,6 @@ namespace UAS_LabelMachine
                 //保存此次登陆的用户名和密码
                 //保存此次登陆的用户名和密码
                 Properties.Settings.Default.LastLoginUser = UserName.Text;
                 Properties.Settings.Default.LastLoginUser = UserName.Text;
                 Properties.Settings.Default.LastLoginMaster = MasterCombox.Text;
                 Properties.Settings.Default.LastLoginMaster = MasterCombox.Text;
-                Properties.Settings.Default.IPAddress = IP.Text;
                 Properties.Settings.Default.FTPNET = FTPNet.Checked;
                 Properties.Settings.Default.FTPNET = FTPNet.Checked;
                 Properties.Settings.Default.Save();
                 Properties.Settings.Default.Save();
                 ftpOperater.Inner = FTPNet.Checked;
                 ftpOperater.Inner = FTPNet.Checked;
@@ -99,20 +96,37 @@ namespace UAS_LabelMachine
         }
         }
 
 
         /// <summary>
         /// <summary>
-        /// 绘制蓝色的背景图
+        /// 绘制居中的蓝色圆角卡片背景
         /// </summary>
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="sender"></param>
         /// <param name="e"></param>
         /// <param name="e"></param>
         private void Login_Paint(object sender, PaintEventArgs e)
         private void Login_Paint(object sender, PaintEventArgs e)
         {
         {
-            //简单的画一个浅蓝色的背景
+            //卡片范围跟随窗口尺寸计算, 覆盖全部输入控件区域
             Graphics g = e.Graphics;
             Graphics g = e.Graphics;
-            GraphicsPath Rect = new GraphicsPath();
-            Pen p = new Pen(Color.CadetBlue, 2);
-            Rectangle rect = new Rectangle(141, 80, 600, 300);
-            LinearGradientBrush b3 = new LinearGradientBrush(rect, Color.AliceBlue, Color.LightBlue, LinearGradientMode.Vertical);
-            g.FillRectangle(b3, rect);
-            e.Graphics.DrawRectangle(p, rect);
+            g.SmoothingMode = SmoothingMode.AntiAlias;
+            int x = 30;
+            int y = 70;
+            int w = this.ClientSize.Width - 60;
+            int h = this.ClientSize.Height - 100;
+            Rectangle rect = new Rectangle(x, y, w, h);
+            using (GraphicsPath path = new GraphicsPath())
+            {
+                int r = 12;
+                path.AddArc(x, y, r * 2, r * 2, 180, 90);
+                path.AddArc(x + w - r * 2, y, r * 2, r * 2, 270, 90);
+                path.AddArc(x + w - r * 2, y + h - r * 2, r * 2, r * 2, 0, 90);
+                path.AddArc(x, y + h - r * 2, r * 2, r * 2, 90, 90);
+                path.CloseFigure();
+                using (LinearGradientBrush b = new LinearGradientBrush(rect, Color.FromArgb(235, Color.AliceBlue), Color.FromArgb(215, Color.LightBlue), LinearGradientMode.Vertical))
+                {
+                    g.FillPath(b, path);
+                }
+                using (Pen p = new Pen(Color.CadetBlue, 2))
+                {
+                    g.DrawPath(p, path);
+                }
+            }
         }
         }
 
 
         private void PassWord_KeyDown(object sender, KeyEventArgs e)
         private void PassWord_KeyDown(object sender, KeyEventArgs e)

+ 1 - 16
UAS-出货标签管理(贸易版-正常)/PublicMethod/LogicHandler.cs

@@ -140,22 +140,7 @@ namespace UAS_LabelMachine.PublicMethod
 
 
         public static void ImportExcel(string iMaster, string iFileName, string iPiID, string iInOutNo, string iCustCode)
         public static void ImportExcel(string iMaster, string iFileName, string iPiID, string iInOutNo, string iCustCode)
         {
         {
-            string config = dh.GetConfig("Master", "PrintMaster").ToString();
-            switch (config)
-            {
-                //海创
-                case "N_HC":
-                    ImportExcel_HC(iFileName, iPiID, iInOutNo, iCustCode);
-                    break;
-                case "SZSI_TEST":
-                    ImportExcel_SZSI(iFileName, iPiID, iInOutNo, iCustCode);
-                    break;
-                case "SZSI":
-                    ImportExcel_SZSI(iFileName, iPiID, iInOutNo, iCustCode);
-                    break;
-                default:
-                    break;
-            }
+            ImportExcel_HC(iFileName, iPiID, iInOutNo, iCustCode);
         }
         }
 
 
         public static void ImportExcel_SZSI(string iFileName, string iPiID, string iInOutNo, string iCustCode)
         public static void ImportExcel_SZSI(string iFileName, string iPiID, string iInOutNo, string iCustCode)

+ 6 - 21
UAS-出货标签管理(贸易版-正常)/UAS_出货标签管理.cs

@@ -267,30 +267,15 @@ namespace UAS_LabelMachine
                 LabelSpace.Visible = true;
                 LabelSpace.Visible = true;
                 LabelSpace.Checked = true;
                 LabelSpace.Checked = true;
             }
             }
-            if (Code != "")
+            try
             {
             {
-                try
-                {
-                    lbl = new ApplicationClass();
-                }
-                catch (Exception)
-                {
-                    MessageBox.Show("未安装CodeSoft软件或者版本不正确");
-                }
+                engine = new Engine(true);
+                PrintMethod = "BarTender";
             }
             }
-            else
+            catch (Exception ex)
             {
             {
-                try
-                {
-                    engine = new Engine(true);
-                    PrintMethod = "BarTender";
-                }
-                catch (Exception ex)
-                {
-                    MessageLog.AppendText(ex.Message + ex.StackTrace);
-                    //MessageBox.Show(ex.Message + ex.StackTrace);
-                }
-
+                MessageLog.AppendText(ex.Message + ex.StackTrace);
+                //MessageBox.Show(ex.Message + ex.StackTrace);
             }
             }
             pi_inoutno.BringToFront();
             pi_inoutno.BringToFront();
             LogicHandler.CustInit("0");
             LogicHandler.CustInit("0");