Browse Source

启用停用称重 改成按钮显示

master
wugang 8 years ago
parent
commit
34987d8353
2 changed files with 211 additions and 189 deletions
  1. +188
    -189
      WeighAndGrading/GradeFrom.Designer.cs
  2. +23
    -0
      WeighAndGrading/GradeFrom.cs

+ 188
- 189
WeighAndGrading/GradeFrom.Designer.cs View File

@ -28,19 +28,19 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle53 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle54 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle56 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle55 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle57 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle58 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle60 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle59 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle61 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle62 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle65 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle63 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle64 = new System.Windows.Forms.DataGridViewCellStyle();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.syncBtn = new System.Windows.Forms.Button(); this.syncBtn = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
@ -74,13 +74,22 @@
this.vScrollBar2 = new System.Windows.Forms.VScrollBar(); this.vScrollBar2 = new System.Windows.Forms.VScrollBar();
this.label12 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label();
this.historyGrid = new BWP.WinFormControl.UDataGridView(); this.historyGrid = new BWP.WinFormControl.UDataGridView();
this.H_SID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.IsLostWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_IsDrop = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_ReadWeight = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.enableWeight = new System.Windows.Forms.CheckBox(); this.enableWeight = new System.Windows.Forms.CheckBox();
this.isPrintCheckBox = new System.Windows.Forms.CheckBox(); this.isPrintCheckBox = new System.Windows.Forms.CheckBox();
this.printBtn = new System.Windows.Forms.Button(); this.printBtn = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.lblChengZhong = new System.Windows.Forms.Label(); this.lblChengZhong = new System.Windows.Forms.Label();
this.butcherTimeInput = new BWP.WinFormControl.UDatePicker(); this.butcherTimeInput = new BWP.WinFormControl.UDatePicker();
this.closeBtn = new System.Windows.Forms.Button();
this.configBtn = new System.Windows.Forms.Button(); this.configBtn = new System.Windows.Forms.Button();
this.stateLabel = new System.Windows.Forms.Label(); this.stateLabel = new System.Windows.Forms.Label();
this.modifyPanel = new System.Windows.Forms.Panel(); this.modifyPanel = new System.Windows.Forms.Panel();
@ -88,22 +97,13 @@
this.discontBtn = new System.Windows.Forms.Button(); this.discontBtn = new System.Windows.Forms.Button();
this.discontPanel = new System.Windows.Forms.FlowLayoutPanel(); this.discontPanel = new System.Windows.Forms.FlowLayoutPanel();
this.statePic = new System.Windows.Forms.PictureBox(); this.statePic = new System.Windows.Forms.PictureBox();
this.btnLockItem = new System.Windows.Forms.Button();
this.btnDeleteSelected = new System.Windows.Forms.Button(); this.btnDeleteSelected = new System.Windows.Forms.Button();
this.btnAbnormalModify = new System.Windows.Forms.Button(); this.btnAbnormalModify = new System.Windows.Forms.Button();
this.lblSucessed = new System.Windows.Forms.Label(); this.lblSucessed = new System.Windows.Forms.Label();
this.btnClearWeight = new System.Windows.Forms.Button(); this.btnClearWeight = new System.Windows.Forms.Button();
this.dropPigBtn = new System.Windows.Forms.Button(); this.dropPigBtn = new System.Windows.Forms.Button();
this.H_SID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.IsLostWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_IsDrop = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_ReadWeight = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.btnStartWeight = new System.Windows.Forms.Button();
this.btnStopWeight = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tangGridView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tangGridView)).BeginInit();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
@ -119,7 +119,7 @@
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 15F); this.label1.Font = new System.Drawing.Font("宋体", 15F);
this.label1.Location = new System.Drawing.Point(12, 131);
this.label1.Location = new System.Drawing.Point(12, 143);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(109, 20); this.label1.Size = new System.Drawing.Size(109, 20);
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
@ -128,7 +128,7 @@
// syncBtn // syncBtn
// //
this.syncBtn.Font = new System.Drawing.Font("宋体", 15F); this.syncBtn.Font = new System.Drawing.Font("宋体", 15F);
this.syncBtn.Location = new System.Drawing.Point(274, 120);
this.syncBtn.Location = new System.Drawing.Point(274, 132);
this.syncBtn.Name = "syncBtn"; this.syncBtn.Name = "syncBtn";
this.syncBtn.Size = new System.Drawing.Size(102, 43); this.syncBtn.Size = new System.Drawing.Size(102, 43);
this.syncBtn.TabIndex = 3; this.syncBtn.TabIndex = 3;
@ -219,17 +219,17 @@
this.tangGridView.AllowUserToDeleteRows = false; this.tangGridView.AllowUserToDeleteRows = false;
this.tangGridView.AllowUserToResizeColumns = false; this.tangGridView.AllowUserToResizeColumns = false;
this.tangGridView.AllowUserToResizeRows = false; this.tangGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tangGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle53.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tangGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle53;
this.tangGridView.BackgroundColor = System.Drawing.Color.White; this.tangGridView.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.tangGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle54.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle54.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle54.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle54.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle54.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle54.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle54.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.tangGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle54;
this.tangGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.tangGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.tangGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.tangGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.T_OrderDetail_ID, this.T_OrderDetail_ID,
@ -243,11 +243,11 @@
this.tangGridView.Name = "tangGridView"; this.tangGridView.Name = "tangGridView";
this.tangGridView.ReadOnly = true; this.tangGridView.ReadOnly = true;
this.tangGridView.RowHeadersVisible = false; this.tangGridView.RowHeadersVisible = false;
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.Black;
this.tangGridView.RowsDefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle56.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle56.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle56.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle56.SelectionForeColor = System.Drawing.Color.Black;
this.tangGridView.RowsDefaultCellStyle = dataGridViewCellStyle56;
this.tangGridView.RowTemplate.Height = 50; this.tangGridView.RowTemplate.Height = 50;
this.tangGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; this.tangGridView.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.tangGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.tangGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
@ -297,9 +297,9 @@
// //
// T_FinishBtn // T_FinishBtn
// //
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.T_FinishBtn.DefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle55.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle55.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.T_FinishBtn.DefaultCellStyle = dataGridViewCellStyle55;
this.T_FinishBtn.HeaderText = "完毕"; this.T_FinishBtn.HeaderText = "完毕";
this.T_FinishBtn.Name = "T_FinishBtn"; this.T_FinishBtn.Name = "T_FinishBtn";
this.T_FinishBtn.ReadOnly = true; this.T_FinishBtn.ReadOnly = true;
@ -331,17 +331,17 @@
this.maoGridView.AllowUserToDeleteRows = false; this.maoGridView.AllowUserToDeleteRows = false;
this.maoGridView.AllowUserToResizeColumns = false; this.maoGridView.AllowUserToResizeColumns = false;
this.maoGridView.AllowUserToResizeRows = false; this.maoGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.maoGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle57.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.maoGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle57;
this.maoGridView.BackgroundColor = System.Drawing.Color.White; this.maoGridView.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.maoGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
dataGridViewCellStyle58.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle58.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle58.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle58.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle58.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle58.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle58.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.maoGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle58;
this.maoGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.maoGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.maoGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.maoGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.M_OrderDetail_ID, this.M_OrderDetail_ID,
@ -355,11 +355,11 @@
this.maoGridView.Name = "maoGridView"; this.maoGridView.Name = "maoGridView";
this.maoGridView.ReadOnly = true; this.maoGridView.ReadOnly = true;
this.maoGridView.RowHeadersVisible = false; this.maoGridView.RowHeadersVisible = false;
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle8.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.Black;
this.maoGridView.RowsDefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle60.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle60.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle60.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle60.SelectionForeColor = System.Drawing.Color.Black;
this.maoGridView.RowsDefaultCellStyle = dataGridViewCellStyle60;
this.maoGridView.RowTemplate.Height = 50; this.maoGridView.RowTemplate.Height = 50;
this.maoGridView.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; this.maoGridView.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
this.maoGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.maoGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
@ -409,9 +409,9 @@
// //
// M_FinishBtn // M_FinishBtn
// //
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle7.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.M_FinishBtn.DefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle59.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle59.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.M_FinishBtn.DefaultCellStyle = dataGridViewCellStyle59;
this.M_FinishBtn.HeaderText = "完毕"; this.M_FinishBtn.HeaderText = "完毕";
this.M_FinishBtn.Name = "M_FinishBtn"; this.M_FinishBtn.Name = "M_FinishBtn";
this.M_FinishBtn.ReadOnly = true; this.M_FinishBtn.ReadOnly = true;
@ -482,17 +482,17 @@
this.historyGrid.AllowUserToDeleteRows = false; this.historyGrid.AllowUserToDeleteRows = false;
this.historyGrid.AllowUserToResizeColumns = false; this.historyGrid.AllowUserToResizeColumns = false;
this.historyGrid.AllowUserToResizeRows = false; this.historyGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle61.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle61;
this.historyGrid.BackgroundColor = System.Drawing.Color.White; this.historyGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle62.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle62.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle62.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle62.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle62.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle62.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle62.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle62;
this.historyGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.historyGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.historyGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.historyGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.H_SID, this.H_SID,
@ -510,9 +510,9 @@
this.historyGrid.Name = "historyGrid"; this.historyGrid.Name = "historyGrid";
this.historyGrid.ReadOnly = true; this.historyGrid.ReadOnly = true;
this.historyGrid.RowHeadersVisible = false; this.historyGrid.RowHeadersVisible = false;
dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle13;
dataGridViewCellStyle65.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle65.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle65;
this.historyGrid.RowTemplate.Height = 40; this.historyGrid.RowTemplate.Height = 40;
this.historyGrid.ScrollBars = System.Windows.Forms.ScrollBars.None; this.historyGrid.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.historyGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.historyGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
@ -520,17 +520,101 @@
this.historyGrid.TabIndex = 0; this.historyGrid.TabIndex = 0;
this.historyGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.historyGrid_CellClick); this.historyGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.historyGrid_CellClick);
// //
// H_SID
//
this.H_SID.DataPropertyName = "SID";
this.H_SID.HeaderText = "SID";
this.H_SID.Name = "H_SID";
this.H_SID.ReadOnly = true;
this.H_SID.Visible = false;
//
// H_Livestock_ID
//
this.H_Livestock_ID.HeaderText = "Livestock_ID";
this.H_Livestock_ID.Name = "H_Livestock_ID";
this.H_Livestock_ID.ReadOnly = true;
this.H_Livestock_ID.Visible = false;
//
// IsLostWeight
//
this.IsLostWeight.DataPropertyName = "IsLostWeight";
this.IsLostWeight.HeaderText = "IsLostWeight";
this.IsLostWeight.Name = "IsLostWeight";
this.IsLostWeight.ReadOnly = true;
this.IsLostWeight.Visible = false;
//
// H_IsDrop
//
this.H_IsDrop.DataPropertyName = "IsDrop";
this.H_IsDrop.HeaderText = "IsDrop";
this.H_IsDrop.Name = "H_IsDrop";
this.H_IsDrop.ReadOnly = true;
this.H_IsDrop.Visible = false;
//
// H_ReadWeight
//
this.H_ReadWeight.DataPropertyName = "ReadWeight";
this.H_ReadWeight.HeaderText = "";
this.H_ReadWeight.Name = "H_ReadWeight";
this.H_ReadWeight.ReadOnly = true;
this.H_ReadWeight.Width = 30;
//
// H_Index
//
this.H_Index.DataPropertyName = "Index";
this.H_Index.HeaderText = "序号";
this.H_Index.Name = "H_Index";
this.H_Index.ReadOnly = true;
this.H_Index.Width = 65;
//
// H_Technics
//
this.H_Technics.DataPropertyName = "Technics_Name";
this.H_Technics.HeaderText = "工艺";
this.H_Technics.Name = "H_Technics";
this.H_Technics.ReadOnly = true;
this.H_Technics.Width = 65;
//
// H_Livestock_Name
//
this.H_Livestock_Name.DataPropertyName = "Livestock_Name";
this.H_Livestock_Name.HeaderText = "级别";
this.H_Livestock_Name.Name = "H_Livestock_Name";
this.H_Livestock_Name.ReadOnly = true;
this.H_Livestock_Name.Width = 90;
//
// H_Weight
//
this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle63.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle63;
this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
this.H_Weight.Width = 70;
//
// H_Time
//
this.H_Time.DataPropertyName = "Time";
dataGridViewCellStyle64.Format = "HH:mm:ss";
dataGridViewCellStyle64.NullValue = null;
this.H_Time.DefaultCellStyle = dataGridViewCellStyle64;
this.H_Time.HeaderText = "时间";
this.H_Time.Name = "H_Time";
this.H_Time.ReadOnly = true;
//
// enableWeight // enableWeight
// //
this.enableWeight.AutoCheck = false; this.enableWeight.AutoCheck = false;
this.enableWeight.AutoSize = true; this.enableWeight.AutoSize = true;
this.enableWeight.Font = new System.Drawing.Font("宋体", 18F); this.enableWeight.Font = new System.Drawing.Font("宋体", 18F);
this.enableWeight.Location = new System.Drawing.Point(12, 91);
this.enableWeight.Location = new System.Drawing.Point(427, -2);
this.enableWeight.Name = "enableWeight"; this.enableWeight.Name = "enableWeight";
this.enableWeight.Size = new System.Drawing.Size(125, 28); this.enableWeight.Size = new System.Drawing.Size(125, 28);
this.enableWeight.TabIndex = 31; this.enableWeight.TabIndex = 31;
this.enableWeight.Text = "启用称重"; this.enableWeight.Text = "启用称重";
this.enableWeight.UseVisualStyleBackColor = true; this.enableWeight.UseVisualStyleBackColor = true;
this.enableWeight.Visible = false;
this.enableWeight.Click += new System.EventHandler(this.enableWeight_Click); this.enableWeight.Click += new System.EventHandler(this.enableWeight_Click);
// //
// isPrintCheckBox // isPrintCheckBox
@ -581,7 +665,7 @@
this.butcherTimeInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.butcherTimeInput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.butcherTimeInput.Date = new System.DateTime(2017, 9, 5, 0, 0, 0, 0); this.butcherTimeInput.Date = new System.DateTime(2017, 9, 5, 0, 0, 0, 0);
this.butcherTimeInput.Font = new System.Drawing.Font("宋体", 15F); this.butcherTimeInput.Font = new System.Drawing.Font("宋体", 15F);
this.butcherTimeInput.Location = new System.Drawing.Point(116, 126);
this.butcherTimeInput.Location = new System.Drawing.Point(116, 138);
this.butcherTimeInput.Name = "butcherTimeInput"; this.butcherTimeInput.Name = "butcherTimeInput";
this.butcherTimeInput.Size = new System.Drawing.Size(133, 30); this.butcherTimeInput.Size = new System.Drawing.Size(133, 30);
this.butcherTimeInput.TabIndex = 2; this.butcherTimeInput.TabIndex = 2;
@ -589,17 +673,6 @@
this.butcherTimeInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.butcherTimeInput.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.butcherTimeInput.Type = BWP.WinFormControl.DateTimeType.Date; this.butcherTimeInput.Type = BWP.WinFormControl.DateTimeType.Date;
// //
// closeBtn
//
this.closeBtn.Font = new System.Drawing.Font("宋体", 15F);
this.closeBtn.Location = new System.Drawing.Point(1256, 6);
this.closeBtn.Name = "closeBtn";
this.closeBtn.Size = new System.Drawing.Size(102, 54);
this.closeBtn.TabIndex = 33;
this.closeBtn.Text = "关闭";
this.closeBtn.UseVisualStyleBackColor = true;
this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// configBtn // configBtn
// //
this.configBtn.Font = new System.Drawing.Font("宋体", 15F); this.configBtn.Font = new System.Drawing.Font("宋体", 15F);
@ -673,22 +746,10 @@
this.statePic.TabIndex = 38; this.statePic.TabIndex = 38;
this.statePic.TabStop = false; this.statePic.TabStop = false;
// //
// btnLockItem
//
this.btnLockItem.Font = new System.Drawing.Font("宋体", 15F);
this.btnLockItem.Location = new System.Drawing.Point(606, 1);
this.btnLockItem.Name = "btnLockItem";
this.btnLockItem.Size = new System.Drawing.Size(102, 31);
this.btnLockItem.TabIndex = 34;
this.btnLockItem.Text = "锁定";
this.btnLockItem.UseVisualStyleBackColor = true;
this.btnLockItem.Visible = false;
this.btnLockItem.Click += new System.EventHandler(this.btnLockItem_Click);
//
// btnDeleteSelected // btnDeleteSelected
// //
this.btnDeleteSelected.Font = new System.Drawing.Font("宋体", 15F); this.btnDeleteSelected.Font = new System.Drawing.Font("宋体", 15F);
this.btnDeleteSelected.Location = new System.Drawing.Point(1011, 6);
this.btnDeleteSelected.Location = new System.Drawing.Point(1102, 6);
this.btnDeleteSelected.Name = "btnDeleteSelected"; this.btnDeleteSelected.Name = "btnDeleteSelected";
this.btnDeleteSelected.Size = new System.Drawing.Size(102, 54); this.btnDeleteSelected.Size = new System.Drawing.Size(102, 54);
this.btnDeleteSelected.TabIndex = 34; this.btnDeleteSelected.TabIndex = 34;
@ -699,7 +760,7 @@
// btnAbnormalModify // btnAbnormalModify
// //
this.btnAbnormalModify.Font = new System.Drawing.Font("宋体", 15F); this.btnAbnormalModify.Font = new System.Drawing.Font("宋体", 15F);
this.btnAbnormalModify.Location = new System.Drawing.Point(1133, 6);
this.btnAbnormalModify.Location = new System.Drawing.Point(1224, 6);
this.btnAbnormalModify.Name = "btnAbnormalModify"; this.btnAbnormalModify.Name = "btnAbnormalModify";
this.btnAbnormalModify.Size = new System.Drawing.Size(102, 54); this.btnAbnormalModify.Size = new System.Drawing.Size(102, 54);
this.btnAbnormalModify.TabIndex = 34; this.btnAbnormalModify.TabIndex = 34;
@ -723,7 +784,7 @@
// btnClearWeight // btnClearWeight
// //
this.btnClearWeight.Font = new System.Drawing.Font("宋体", 15F); this.btnClearWeight.Font = new System.Drawing.Font("宋体", 15F);
this.btnClearWeight.Location = new System.Drawing.Point(880, 6);
this.btnClearWeight.Location = new System.Drawing.Point(971, 6);
this.btnClearWeight.Name = "btnClearWeight"; this.btnClearWeight.Name = "btnClearWeight";
this.btnClearWeight.Size = new System.Drawing.Size(102, 54); this.btnClearWeight.Size = new System.Drawing.Size(102, 54);
this.btnClearWeight.TabIndex = 34; this.btnClearWeight.TabIndex = 34;
@ -734,7 +795,7 @@
// dropPigBtn // dropPigBtn
// //
this.dropPigBtn.Font = new System.Drawing.Font("宋体", 15F); this.dropPigBtn.Font = new System.Drawing.Font("宋体", 15F);
this.dropPigBtn.Location = new System.Drawing.Point(754, 6);
this.dropPigBtn.Location = new System.Drawing.Point(845, 6);
this.dropPigBtn.Name = "dropPigBtn"; this.dropPigBtn.Name = "dropPigBtn";
this.dropPigBtn.Size = new System.Drawing.Size(102, 54); this.dropPigBtn.Size = new System.Drawing.Size(102, 54);
this.dropPigBtn.TabIndex = 40; this.dropPigBtn.TabIndex = 40;
@ -742,94 +803,34 @@
this.dropPigBtn.UseVisualStyleBackColor = true; this.dropPigBtn.UseVisualStyleBackColor = true;
this.dropPigBtn.Click += new System.EventHandler(this.dropPigBtn_Click); this.dropPigBtn.Click += new System.EventHandler(this.dropPigBtn_Click);
// //
// H_SID
//
this.H_SID.DataPropertyName = "SID";
this.H_SID.HeaderText = "SID";
this.H_SID.Name = "H_SID";
this.H_SID.ReadOnly = true;
this.H_SID.Visible = false;
//
// H_Livestock_ID
//
this.H_Livestock_ID.HeaderText = "Livestock_ID";
this.H_Livestock_ID.Name = "H_Livestock_ID";
this.H_Livestock_ID.ReadOnly = true;
this.H_Livestock_ID.Visible = false;
//
// IsLostWeight
//
this.IsLostWeight.DataPropertyName = "IsLostWeight";
this.IsLostWeight.HeaderText = "IsLostWeight";
this.IsLostWeight.Name = "IsLostWeight";
this.IsLostWeight.ReadOnly = true;
this.IsLostWeight.Visible = false;
//
// H_IsDrop
//
this.H_IsDrop.DataPropertyName = "IsDrop";
this.H_IsDrop.HeaderText = "IsDrop";
this.H_IsDrop.Name = "H_IsDrop";
this.H_IsDrop.ReadOnly = true;
this.H_IsDrop.Visible = false;
//
// H_ReadWeight
//
this.H_ReadWeight.DataPropertyName = "ReadWeight";
this.H_ReadWeight.HeaderText = "";
this.H_ReadWeight.Name = "H_ReadWeight";
this.H_ReadWeight.ReadOnly = true;
this.H_ReadWeight.Width = 30;
//
// H_Index
//
this.H_Index.DataPropertyName = "Index";
this.H_Index.HeaderText = "序号";
this.H_Index.Name = "H_Index";
this.H_Index.ReadOnly = true;
this.H_Index.Width = 65;
//
// H_Technics
//
this.H_Technics.DataPropertyName = "Technics_Name";
this.H_Technics.HeaderText = "工艺";
this.H_Technics.Name = "H_Technics";
this.H_Technics.ReadOnly = true;
this.H_Technics.Width = 65;
//
// H_Livestock_Name
//
this.H_Livestock_Name.DataPropertyName = "Livestock_Name";
this.H_Livestock_Name.HeaderText = "级别";
this.H_Livestock_Name.Name = "H_Livestock_Name";
this.H_Livestock_Name.ReadOnly = true;
this.H_Livestock_Name.Width = 90;
//
// H_Weight
// btnStartWeight
// //
this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle11.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle11;
this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
this.H_Weight.Width = 70;
this.btnStartWeight.Location = new System.Drawing.Point(12, 85);
this.btnStartWeight.Name = "btnStartWeight";
this.btnStartWeight.Size = new System.Drawing.Size(82, 39);
this.btnStartWeight.TabIndex = 41;
this.btnStartWeight.Text = "启用称重";
this.btnStartWeight.UseVisualStyleBackColor = true;
this.btnStartWeight.Click += new System.EventHandler(this.btnStartWeight_Click);
// //
// H_Time
// btnStopWeight
// //
this.H_Time.DataPropertyName = "Time";
dataGridViewCellStyle12.Format = "HH:mm:ss";
dataGridViewCellStyle12.NullValue = null;
this.H_Time.DefaultCellStyle = dataGridViewCellStyle12;
this.H_Time.HeaderText = "时间";
this.H_Time.Name = "H_Time";
this.H_Time.ReadOnly = true;
this.btnStopWeight.Enabled = false;
this.btnStopWeight.Location = new System.Drawing.Point(116, 84);
this.btnStopWeight.Name = "btnStopWeight";
this.btnStopWeight.Size = new System.Drawing.Size(85, 39);
this.btnStopWeight.TabIndex = 41;
this.btnStopWeight.Text = "停止称重";
this.btnStopWeight.UseVisualStyleBackColor = true;
this.btnStopWeight.Click += new System.EventHandler(this.btnStopWeight_Click);
// //
// GradeFrom // GradeFrom
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1382, 840);
this.ClientSize = new System.Drawing.Size(1362, 741);
this.Controls.Add(this.btnStopWeight);
this.Controls.Add(this.btnStartWeight);
this.Controls.Add(this.dropPigBtn); this.Controls.Add(this.dropPigBtn);
this.Controls.Add(this.lblSucessed); this.Controls.Add(this.lblSucessed);
this.Controls.Add(this.statePic); this.Controls.Add(this.statePic);
@ -840,9 +841,7 @@
this.Controls.Add(this.btnAbnormalModify); this.Controls.Add(this.btnAbnormalModify);
this.Controls.Add(this.btnClearWeight); this.Controls.Add(this.btnClearWeight);
this.Controls.Add(this.btnDeleteSelected); this.Controls.Add(this.btnDeleteSelected);
this.Controls.Add(this.btnLockItem);
this.Controls.Add(this.configBtn); this.Controls.Add(this.configBtn);
this.Controls.Add(this.closeBtn);
this.Controls.Add(this.enableWeight); this.Controls.Add(this.enableWeight);
this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox3);
this.Controls.Add(this.isPrintCheckBox); this.Controls.Add(this.isPrintCheckBox);
@ -905,7 +904,6 @@
private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label12;
private BWP.WinFormControl.UDataGridView historyGrid; private BWP.WinFormControl.UDataGridView historyGrid;
private System.Windows.Forms.Label lblTangTui; private System.Windows.Forms.Label lblTangTui;
private System.Windows.Forms.Button closeBtn;
private System.Windows.Forms.Button configBtn; private System.Windows.Forms.Button configBtn;
private System.Windows.Forms.Label stateLabel; private System.Windows.Forms.Label stateLabel;
private System.Windows.Forms.Panel modifyPanel; private System.Windows.Forms.Panel modifyPanel;
@ -917,7 +915,6 @@
private System.Windows.Forms.VScrollBar maoScrollBar; private System.Windows.Forms.VScrollBar maoScrollBar;
private BWP.WinFormControl.UDataGridView maoGridView; private BWP.WinFormControl.UDataGridView maoGridView;
private System.Windows.Forms.PictureBox statePic; private System.Windows.Forms.PictureBox statePic;
private System.Windows.Forms.Button btnLockItem;
private System.Windows.Forms.Button btnDeleteSelected; private System.Windows.Forms.Button btnDeleteSelected;
private System.Windows.Forms.Button btnAbnormalModify; private System.Windows.Forms.Button btnAbnormalModify;
private System.Windows.Forms.DataGridViewTextBoxColumn T_OrderDetail_ID; private System.Windows.Forms.DataGridViewTextBoxColumn T_OrderDetail_ID;
@ -946,5 +943,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_Name; private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight; private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Time; private System.Windows.Forms.DataGridViewTextBoxColumn H_Time;
private System.Windows.Forms.Button btnStartWeight;
private System.Windows.Forms.Button btnStopWeight;
} }
} }

+ 23
- 0
WeighAndGrading/GradeFrom.cs View File

@ -825,6 +825,29 @@ namespace WeighAndGrading
weightPort.Close(); weightPort.Close();
} }
public void btnStartWeight_Click(object sender, EventArgs e)
{
if (details == null)
{
MessageBox.Show("请先同步数据");
return;
}
btnStartWeight.Enabled = false;
OpenSerialPort();
_mainProcessIsRun = true;
ReadData();
btnStopWeight.Enabled = true;
}
public void btnStopWeight_Click(object sender, EventArgs e)
{
btnStartWeight.Enabled = true;
DisableWeight();
btnStopWeight.Enabled = false;
}
public void enableWeight_Click(object sender, EventArgs e) public void enableWeight_Click(object sender, EventArgs e)
{ {
if (details == null) if (details == null)


Loading…
Cancel
Save