From ae5c1122edeb09bdff8a43bf13021ae2d237f2e3 Mon Sep 17 00:00:00 2001 From: Admin Date: Thu, 24 Apr 2025 16:21:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DHSoftware/MainWindow.Designer.cs | 36 +++---------------------------- DHSoftware/MainWindow.cs | 9 ++------ DHSoftware/MainWindow.resx | 4 ++-- 3 files changed, 7 insertions(+), 42 deletions(-) diff --git a/DHSoftware/MainWindow.Designer.cs b/DHSoftware/MainWindow.Designer.cs index a92a4ab..380e730 100644 --- a/DHSoftware/MainWindow.Designer.cs +++ b/DHSoftware/MainWindow.Designer.cs @@ -53,7 +53,6 @@ dgvCamreaNums = new DataGridView(); panelNums = new AntdUI.Panel(); tableLayoutNums = new TableLayoutPanel(); - dgvProductNums = new DataGridView(); tableLayoutPanel3 = new TableLayoutPanel(); lblTotalTime = new Label(); label1 = new Label(); @@ -94,7 +93,6 @@ ((System.ComponentModel.ISupportInitialize)dgvCamreaNums).BeginInit(); panelNums.SuspendLayout(); tableLayoutNums.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)dgvProductNums).BeginInit(); tableLayoutPanel3.SuspendLayout(); panel1.SuspendLayout(); panel3.SuspendLayout(); @@ -145,9 +143,9 @@ // tabPage3 // tabPage3.Controls.Add(panel7); - tabPage3.Location = new Point(3, 28); + tabPage3.Location = new Point(3, 3); tabPage3.Name = "tabPage3"; - tabPage3.Size = new Size(574, 145); + tabPage3.Size = new Size(574, 170); tabPage3.TabIndex = 0; tabPage3.Text = "日志"; // @@ -156,7 +154,7 @@ panel7.Dock = DockStyle.Fill; panel7.Location = new Point(0, 0); panel7.Name = "panel7"; - panel7.Size = new Size(574, 145); + panel7.Size = new Size(574, 170); panel7.TabIndex = 2; // // tabMain @@ -296,7 +294,6 @@ // tableLayoutNums.ColumnCount = 1; tableLayoutNums.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); - tableLayoutNums.Controls.Add(dgvProductNums, 0, 0); tableLayoutNums.Controls.Add(tableLayoutPanel3, 0, 1); tableLayoutNums.Dock = DockStyle.Fill; tableLayoutNums.Location = new Point(0, 0); @@ -308,31 +305,6 @@ tableLayoutNums.Size = new Size(338, 101); tableLayoutNums.TabIndex = 8; // - // dgvProductNums - // - dgvProductNums.AllowUserToAddRows = false; - dgvProductNums.AllowUserToDeleteRows = false; - dgvProductNums.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; - dgvProductNums.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells; - dgvProductNums.BackgroundColor = SystemColors.Control; - dgvProductNums.BorderStyle = BorderStyle.None; - dgvProductNums.CellBorderStyle = DataGridViewCellBorderStyle.SunkenHorizontal; - dgvProductNums.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None; - dgvProductNums.ColumnHeadersHeight = 4; - dgvProductNums.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - dgvProductNums.ColumnHeadersVisible = false; - dgvProductNums.Dock = DockStyle.Fill; - dgvProductNums.Location = new Point(3, 10); - dgvProductNums.Margin = new Padding(3, 10, 3, 0); - dgvProductNums.MultiSelect = false; - dgvProductNums.Name = "dgvProductNums"; - dgvProductNums.ReadOnly = true; - dgvProductNums.RowHeadersBorderStyle = DataGridViewHeaderBorderStyle.None; - dgvProductNums.RowHeadersVisible = false; - dgvProductNums.SelectionMode = DataGridViewSelectionMode.FullRowSelect; - dgvProductNums.Size = new Size(332, 40); - dgvProductNums.TabIndex = 10; - // // tableLayoutPanel3 // tableLayoutPanel3.AutoSizeMode = AutoSizeMode.GrowAndShrink; @@ -719,7 +691,6 @@ ((System.ComponentModel.ISupportInitialize)dgvCamreaNums).EndInit(); panelNums.ResumeLayout(false); tableLayoutNums.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)dgvProductNums).EndInit(); tableLayoutPanel3.ResumeLayout(false); tableLayoutPanel3.PerformLayout(); panel1.ResumeLayout(false); @@ -778,7 +749,6 @@ // private Label label7; // private AntdUI.Panel pnlLog; private AntdUI.Label lbInBackend; - private DataGridView dgvProductNums; private TableLayoutPanel tableLayoutPanel3; private AntdUI.Button btnCreateBatchNO; private AntdUI.Input textBoxBatchNO; diff --git a/DHSoftware/MainWindow.cs b/DHSoftware/MainWindow.cs index 928fe63..5876c79 100644 --- a/DHSoftware/MainWindow.cs +++ b/DHSoftware/MainWindow.cs @@ -546,12 +546,6 @@ namespace DHSoftware #region CameraSum private void InitialCameraSumsView() { - dgvProductNums.AutoGenerateColumns = false; - - dgvProductNums.DefaultCellStyle.Font = new Font("Tahoma", 12, FontStyle.Regular, GraphicsUnit.World); - - dgvProductNums.DataSource = null; - dgvProductNums.DataSource = ProductSummaries; @@ -917,7 +911,7 @@ namespace DHSoftware this.Invoke(new Action(() => { - dgvProductNums.DataSource = new BindingList(ProductSummaries); + //if (dgvProductNums.Rows.Count > 0) //{ @@ -1073,6 +1067,7 @@ namespace DHSoftware private Thread _monitorThread; private void MainWindow_Load(object sender, EventArgs e) { + //开启按钮监听 // 启动所有监控线程 StartAllMonitors(); diff --git a/DHSoftware/MainWindow.resx b/DHSoftware/MainWindow.resx index 77eed50..33cff98 100644 --- a/DHSoftware/MainWindow.resx +++ b/DHSoftware/MainWindow.resx @@ -1,7 +1,7 @@