章政 7 лет назад
Родитель
Сommit
1bfba5aa7d

+ 1 - 0
UAS-出货标签管理(泽天)/UAS_出货标签管理.Designer.cs

@@ -589,6 +589,7 @@
             this.GridPrcode.TabIndex = 88;
             this.GridPrcode.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.GridPrcode_CellClick);
             this.GridPrcode.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.GridPrcode_CellEndEdit);
+            this.GridPrcode.CellMouseUp += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.GridPrcode_CellMouseUp);
             this.GridPrcode.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.GridPrcode_CellPainting);
             this.GridPrcode.SelectionChanged += new System.EventHandler(this.GridPrcode_SelectionChanged);
             // 

+ 14 - 0
UAS-出货标签管理(泽天)/UAS_出货标签管理.cs

@@ -270,6 +270,7 @@ namespace UAS_LabelMachine
                     SetPrintStatus_label.ForeColor = Color.Red;
                     SetPrintStatus_label.Text = "暂停打印";
                 }
+                Input.Text = "";
                 return;
             }
             Dictionary<string, string> Data = new Dictionary<string, string>();
@@ -1775,5 +1776,18 @@ namespace UAS_LabelMachine
                 }
             }
         }
+
+        private void GridPrcode_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e)
+        {
+            if (e.Button == MouseButtons.Right)
+            {
+                if (e.RowIndex >= 0 && e.ColumnIndex > 0)
+                {
+                    string Conetent = GridPrcode.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
+                    Clipboard.SetText(Conetent);
+                    MessageBox.Show("已复制内容" + Conetent);
+                }
+            }
+        }
     }
 }