change - 前端小修改

master
SoulStar 4 weeks ago
parent feae78a61f
commit 3b9953f1a2

@ -10,6 +10,7 @@ using Models;
using SixLabors.ImageSharp.PixelFormats;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
@ -28,7 +29,7 @@ namespace HighWayIot.Winform.Business
public MonitorDataRefreshBusiness()
{
// 启动定时器,每隔1秒刷新一次报表数据
// 启动定时器,每隔2秒刷新一次报表数据
refreshTimer = new Timer(RefreshData, null, 0, 2000);
}
@ -40,6 +41,8 @@ namespace HighWayIot.Winform.Business
{
try
{
Stopwatch sw = new Stopwatch();
sw.Start();
byte[] signals = transferSingal.ReadStationReportSignal();
if (signals == null)
{
@ -206,6 +209,8 @@ namespace HighWayIot.Winform.Business
{
MonitorMainPage.MonitorRefreshAction.Invoke();
}
sw.Stop();
LogHelper.Instance.Info($"前端数据刷新耗时 {sw.ElapsedMilliseconds}ms");
}
catch (Exception ex)
{

@ -32,21 +32,21 @@ namespace HighWayIot.Winform.UserControlPages
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = 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 dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = 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 dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
@ -72,11 +72,6 @@ namespace HighWayIot.Winform.UserControlPages
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.MonitorDataGridView = new System.Windows.Forms.DataGridView();
this.DataRefresh = new System.Windows.Forms.Timer(this.components);
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.panel6 = new System.Windows.Forms.Panel();
this.MoveText = new Mesnac.Controls.ChemicalWeighing.HslMoveText();
this.panel3 = new System.Windows.Forms.Panel();
this.No = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.VulcanizationNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.StartTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -91,6 +86,13 @@ namespace HighWayIot.Winform.UserControlPages
this.TireWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RepeatWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.IsDone = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DataRefresh = new System.Windows.Forms.Timer(this.components);
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.panel6 = new System.Windows.Forms.Panel();
this.MoveText = new Mesnac.Controls.ChemicalWeighing.HslMoveText();
this.panel3 = new System.Windows.Forms.Panel();
this.ReweightLabel = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.tableLayoutPanel3.SuspendLayout();
@ -110,14 +112,14 @@ namespace HighWayIot.Winform.UserControlPages
this.panel1.Location = new System.Drawing.Point(0, 114);
this.panel1.Margin = new System.Windows.Forms.Padding(0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(2169, 114);
this.panel1.Size = new System.Drawing.Size(1905, 114);
this.panel1.TabIndex = 0;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 60F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 40F));
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel3, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.panel2, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
@ -125,8 +127,7 @@ namespace HighWayIot.Winform.UserControlPages
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 114F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(2169, 114);
this.tableLayoutPanel1.Size = new System.Drawing.Size(1905, 114);
this.tableLayoutPanel1.TabIndex = 0;
//
// tableLayoutPanel3
@ -137,12 +138,12 @@ namespace HighWayIot.Winform.UserControlPages
this.tableLayoutPanel3.Controls.Add(this.panel5, 1, 0);
this.tableLayoutPanel3.Controls.Add(this.panel4, 0, 0);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.Location = new System.Drawing.Point(1084, 0);
this.tableLayoutPanel3.Location = new System.Drawing.Point(1143, 0);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(0);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.RowCount = 1;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(1085, 114);
this.tableLayoutPanel3.Size = new System.Drawing.Size(762, 114);
this.tableLayoutPanel3.TabIndex = 3;
//
// panel5
@ -151,7 +152,7 @@ namespace HighWayIot.Winform.UserControlPages
this.panel5.Controls.Add(this.NowDateProductNumTextBox);
this.panel5.Controls.Add(this.NowDateProductNumLabel);
this.panel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel5.Location = new System.Drawing.Point(824, 0);
this.panel5.Location = new System.Drawing.Point(501, 0);
this.panel5.Margin = new System.Windows.Forms.Padding(0);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(261, 114);
@ -194,13 +195,13 @@ namespace HighWayIot.Winform.UserControlPages
this.panel4.Location = new System.Drawing.Point(0, 0);
this.panel4.Margin = new System.Windows.Forms.Padding(0);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(824, 114);
this.panel4.Size = new System.Drawing.Size(501, 114);
this.panel4.TabIndex = 17;
//
// NightProductNumTextBox
//
this.NightProductNumTextBox.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.NightProductNumTextBox.Location = new System.Drawing.Point(319, 47);
this.NightProductNumTextBox.Location = new System.Drawing.Point(313, 56);
this.NightProductNumTextBox.Name = "NightProductNumTextBox";
this.NightProductNumTextBox.ReadOnly = true;
this.NightProductNumTextBox.Size = new System.Drawing.Size(122, 30);
@ -210,7 +211,7 @@ namespace HighWayIot.Winform.UserControlPages
// DayProductNumTextBox
//
this.DayProductNumTextBox.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.DayProductNumTextBox.Location = new System.Drawing.Point(74, 47);
this.DayProductNumTextBox.Location = new System.Drawing.Point(68, 56);
this.DayProductNumTextBox.Name = "DayProductNumTextBox";
this.DayProductNumTextBox.ReadOnly = true;
this.DayProductNumTextBox.Size = new System.Drawing.Size(122, 30);
@ -222,7 +223,7 @@ namespace HighWayIot.Winform.UserControlPages
this.NightTimeLabel.AutoSize = true;
this.NightTimeLabel.Font = new System.Drawing.Font("微软雅黑", 15F);
this.NightTimeLabel.ForeColor = System.Drawing.Color.SaddleBrown;
this.NightTimeLabel.Location = new System.Drawing.Point(347, 13);
this.NightTimeLabel.Location = new System.Drawing.Point(341, 22);
this.NightTimeLabel.Name = "NightTimeLabel";
this.NightTimeLabel.Size = new System.Drawing.Size(127, 27);
this.NightTimeLabel.TabIndex = 15;
@ -233,7 +234,7 @@ namespace HighWayIot.Winform.UserControlPages
this.label13.AutoSize = true;
this.label13.Font = new System.Drawing.Font("微软雅黑", 15F);
this.label13.ForeColor = System.Drawing.Color.SaddleBrown;
this.label13.Location = new System.Drawing.Point(283, 13);
this.label13.Location = new System.Drawing.Point(277, 22);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(72, 27);
this.label13.TabIndex = 14;
@ -244,7 +245,7 @@ namespace HighWayIot.Winform.UserControlPages
this.DayTimeLabel.AutoSize = true;
this.DayTimeLabel.Font = new System.Drawing.Font("微软雅黑", 15F);
this.DayTimeLabel.ForeColor = System.Drawing.Color.SaddleBrown;
this.DayTimeLabel.Location = new System.Drawing.Point(105, 14);
this.DayTimeLabel.Location = new System.Drawing.Point(99, 23);
this.DayTimeLabel.Name = "DayTimeLabel";
this.DayTimeLabel.Size = new System.Drawing.Size(127, 27);
this.DayTimeLabel.TabIndex = 13;
@ -255,7 +256,7 @@ namespace HighWayIot.Winform.UserControlPages
this.label12.AutoSize = true;
this.label12.Font = new System.Drawing.Font("微软雅黑", 15F);
this.label12.ForeColor = System.Drawing.Color.SaddleBrown;
this.label12.Location = new System.Drawing.Point(41, 14);
this.label12.Location = new System.Drawing.Point(35, 23);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(72, 27);
this.label12.TabIndex = 12;
@ -264,6 +265,8 @@ namespace HighWayIot.Winform.UserControlPages
// panel2
//
this.panel2.BackColor = System.Drawing.Color.Gray;
this.panel2.Controls.Add(this.ReweightLabel);
this.panel2.Controls.Add(this.label5);
this.panel2.Controls.Add(this.RgvNoLabel);
this.panel2.Controls.Add(this.SpecCodeLabel);
this.panel2.Controls.Add(this.label10);
@ -278,7 +281,7 @@ namespace HighWayIot.Winform.UserControlPages
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Margin = new System.Windows.Forms.Padding(0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1084, 114);
this.panel2.Size = new System.Drawing.Size(1143, 114);
this.panel2.TabIndex = 2;
//
// RgvNoLabel
@ -330,7 +333,7 @@ namespace HighWayIot.Winform.UserControlPages
this.RawTireWeightLabel.AutoSize = true;
this.RawTireWeightLabel.Font = new System.Drawing.Font("微软雅黑", 18F);
this.RawTireWeightLabel.ForeColor = System.Drawing.Color.Khaki;
this.RawTireWeightLabel.Location = new System.Drawing.Point(697, 59);
this.RawTireWeightLabel.Location = new System.Drawing.Point(693, 59);
this.RawTireWeightLabel.Name = "RawTireWeightLabel";
this.RawTireWeightLabel.Size = new System.Drawing.Size(61, 31);
this.RawTireWeightLabel.TabIndex = 9;
@ -367,7 +370,7 @@ namespace HighWayIot.Winform.UserControlPages
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(165, 31);
this.label7.TabIndex = 7;
this.label7.Text = "生胎重量(g)";
this.label7.Text = "标准重量(g)";
//
// label3
//
@ -401,13 +404,13 @@ namespace HighWayIot.Winform.UserControlPages
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.MonitorDataGridView.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
this.MonitorDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
this.MonitorDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle16;
this.MonitorDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.MonitorDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.No,
@ -432,10 +435,163 @@ namespace HighWayIot.Winform.UserControlPages
this.MonitorDataGridView.RowHeadersVisible = false;
this.MonitorDataGridView.RowTemplate.Height = 64;
this.MonitorDataGridView.RowTemplate.ReadOnly = true;
this.MonitorDataGridView.Size = new System.Drawing.Size(2169, 799);
this.MonitorDataGridView.Size = new System.Drawing.Size(1905, 767);
this.MonitorDataGridView.TabIndex = 1;
this.MonitorDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.MonitorDataGridView_DataError);
//
// No
//
this.No.DataPropertyName = "No";
dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle17.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.No.DefaultCellStyle = dataGridViewCellStyle17;
this.No.HeaderText = "序号";
this.No.Name = "No";
this.No.ReadOnly = true;
this.No.Width = 60;
//
// VulcanizationNo
//
this.VulcanizationNo.DataPropertyName = "VulcanizationNo";
dataGridViewCellStyle18.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.VulcanizationNo.DefaultCellStyle = dataGridViewCellStyle18;
this.VulcanizationNo.HeaderText = "机位";
this.VulcanizationNo.Name = "VulcanizationNo";
this.VulcanizationNo.ReadOnly = true;
this.VulcanizationNo.Width = 83;
//
// StartTime
//
this.StartTime.DataPropertyName = "StartTime";
dataGridViewCellStyle19.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.StartTime.DefaultCellStyle = dataGridViewCellStyle19;
this.StartTime.HeaderText = "开始时间";
this.StartTime.Name = "StartTime";
this.StartTime.ReadOnly = true;
this.StartTime.Width = 116;
//
// RecipeCode
//
this.RecipeCode.DataPropertyName = "RecipeCode";
dataGridViewCellStyle20.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.RecipeCode.DefaultCellStyle = dataGridViewCellStyle20;
this.RecipeCode.HeaderText = "成品代号";
this.RecipeCode.Name = "RecipeCode";
this.RecipeCode.ReadOnly = true;
this.RecipeCode.Width = 154;
//
// RecipeName
//
this.RecipeName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.RecipeName.DataPropertyName = "RecipeName";
dataGridViewCellStyle21.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.RecipeName.DefaultCellStyle = dataGridViewCellStyle21;
this.RecipeName.HeaderText = "标称尺度";
this.RecipeName.Name = "RecipeName";
this.RecipeName.ReadOnly = true;
//
// SpecCode
//
this.SpecCode.DataPropertyName = "SpecCode";
dataGridViewCellStyle22.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.SpecCode.DefaultCellStyle = dataGridViewCellStyle22;
this.SpecCode.HeaderText = "SPEC编号";
this.SpecCode.Name = "SpecCode";
this.SpecCode.ReadOnly = true;
this.SpecCode.Width = 124;
//
// DeviceNo
//
this.DeviceNo.DataPropertyName = "DeviceNo";
dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle23.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.DeviceNo.DefaultCellStyle = dataGridViewCellStyle23;
this.DeviceNo.HeaderText = "小车号";
this.DeviceNo.Name = "DeviceNo";
this.DeviceNo.ReadOnly = true;
this.DeviceNo.Width = 80;
//
// StandardWeight
//
this.StandardWeight.DataPropertyName = "StandardWeight";
dataGridViewCellStyle24.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.StandardWeight.DefaultCellStyle = dataGridViewCellStyle24;
this.StandardWeight.HeaderText = "标准重量";
this.StandardWeight.Name = "StandardWeight";
this.StandardWeight.ReadOnly = true;
//
// BaseRubFinishTime
//
this.BaseRubFinishTime.DataPropertyName = "BaseRubTimeSpan";
dataGridViewCellStyle25.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle25.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.BaseRubFinishTime.DefaultCellStyle = dataGridViewCellStyle25;
this.BaseRubFinishTime.HeaderText = "基部胶完成时间";
this.BaseRubFinishTime.Name = "BaseRubFinishTime";
this.BaseRubFinishTime.ReadOnly = true;
this.BaseRubFinishTime.Width = 162;
//
// MidRubFinishTime
//
this.MidRubFinishTime.DataPropertyName = "MidRubTimeSpan";
dataGridViewCellStyle26.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.MidRubFinishTime.DefaultCellStyle = dataGridViewCellStyle26;
this.MidRubFinishTime.HeaderText = "中层胶完成时间";
this.MidRubFinishTime.Name = "MidRubFinishTime";
this.MidRubFinishTime.ReadOnly = true;
this.MidRubFinishTime.Width = 162;
//
// RowTireFinishTime
//
this.RowTireFinishTime.DataPropertyName = "FaceRubTimeSpan";
dataGridViewCellStyle27.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.RowTireFinishTime.DefaultCellStyle = dataGridViewCellStyle27;
this.RowTireFinishTime.HeaderText = "生胎完成时间";
this.RowTireFinishTime.Name = "RowTireFinishTime";
this.RowTireFinishTime.ReadOnly = true;
this.RowTireFinishTime.Width = 141;
//
// TireWeight
//
this.TireWeight.DataPropertyName = "RawTireWeight";
dataGridViewCellStyle28.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.TireWeight.DefaultCellStyle = dataGridViewCellStyle28;
this.TireWeight.HeaderText = "生胎重量";
this.TireWeight.Name = "TireWeight";
this.TireWeight.ReadOnly = true;
//
// RepeatWeight
//
this.RepeatWeight.DataPropertyName = "RepeatWeight";
dataGridViewCellStyle29.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle29.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.RepeatWeight.DefaultCellStyle = dataGridViewCellStyle29;
this.RepeatWeight.HeaderText = "复重重量";
this.RepeatWeight.Name = "RepeatWeight";
this.RepeatWeight.ReadOnly = true;
//
// IsDone
//
this.IsDone.DataPropertyName = "IsDone";
dataGridViewCellStyle30.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle30.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.IsDone.DefaultCellStyle = dataGridViewCellStyle30;
this.IsDone.HeaderText = "状态";
this.IsDone.Name = "IsDone";
this.IsDone.ReadOnly = true;
this.IsDone.Width = 90;
//
// DataRefresh
//
this.DataRefresh.Enabled = true;
@ -454,7 +610,7 @@ namespace HighWayIot.Winform.UserControlPages
this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(2169, 228);
this.tableLayoutPanel2.Size = new System.Drawing.Size(1905, 228);
this.tableLayoutPanel2.TabIndex = 2;
//
// panel6
@ -463,7 +619,7 @@ namespace HighWayIot.Winform.UserControlPages
this.panel6.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel6.Location = new System.Drawing.Point(3, 3);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(2163, 108);
this.panel6.Size = new System.Drawing.Size(1899, 108);
this.panel6.TabIndex = 1;
//
// MoveText
@ -474,7 +630,7 @@ namespace HighWayIot.Winform.UserControlPages
this.MoveText.Location = new System.Drawing.Point(0, 0);
this.MoveText.MoveSpeed = 5F;
this.MoveText.Name = "MoveText";
this.MoveText.Size = new System.Drawing.Size(2163, 108);
this.MoveText.Size = new System.Drawing.Size(1899, 108);
this.MoveText.TabIndex = 1;
this.MoveText.Text = "欢迎各位领导莅临参观";
this.MoveText.DoubleClick += new System.EventHandler(this.MoveText_DoubleClick);
@ -485,161 +641,30 @@ namespace HighWayIot.Winform.UserControlPages
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
this.panel3.Location = new System.Drawing.Point(0, 0);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(2169, 228);
this.panel3.Size = new System.Drawing.Size(1905, 228);
this.panel3.TabIndex = 3;
//
// No
// ReweightLabel
//
this.No.DataPropertyName = "No";
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.No.DefaultCellStyle = dataGridViewCellStyle2;
this.No.HeaderText = "序号";
this.No.Name = "No";
this.No.ReadOnly = true;
this.No.Width = 60;
this.ReweightLabel.AutoSize = true;
this.ReweightLabel.Font = new System.Drawing.Font("微软雅黑", 18F);
this.ReweightLabel.ForeColor = System.Drawing.Color.Khaki;
this.ReweightLabel.Location = new System.Drawing.Point(935, 59);
this.ReweightLabel.Name = "ReweightLabel";
this.ReweightLabel.Size = new System.Drawing.Size(61, 31);
this.ReweightLabel.TabIndex = 13;
this.ReweightLabel.Text = "N/A";
//
// VulcanizationNo
// label5
//
this.VulcanizationNo.DataPropertyName = "VulcanizationNo";
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.VulcanizationNo.DefaultCellStyle = dataGridViewCellStyle3;
this.VulcanizationNo.HeaderText = "机位";
this.VulcanizationNo.Name = "VulcanizationNo";
this.VulcanizationNo.ReadOnly = true;
this.VulcanizationNo.Width = 83;
//
// StartTime
//
this.StartTime.DataPropertyName = "StartTime";
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.StartTime.DefaultCellStyle = dataGridViewCellStyle4;
this.StartTime.HeaderText = "开始时间";
this.StartTime.Name = "StartTime";
this.StartTime.ReadOnly = true;
this.StartTime.Width = 116;
//
// RecipeCode
//
this.RecipeCode.DataPropertyName = "RecipeCode";
dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.RecipeCode.DefaultCellStyle = dataGridViewCellStyle5;
this.RecipeCode.HeaderText = "成品代号";
this.RecipeCode.Name = "RecipeCode";
this.RecipeCode.ReadOnly = true;
this.RecipeCode.Width = 154;
//
// RecipeName
//
this.RecipeName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.RecipeName.DataPropertyName = "RecipeName";
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.RecipeName.DefaultCellStyle = dataGridViewCellStyle6;
this.RecipeName.HeaderText = "标称尺度";
this.RecipeName.Name = "RecipeName";
this.RecipeName.ReadOnly = true;
//
// SpecCode
//
this.SpecCode.DataPropertyName = "SpecCode";
dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.SpecCode.DefaultCellStyle = dataGridViewCellStyle7;
this.SpecCode.HeaderText = "SPEC编号";
this.SpecCode.Name = "SpecCode";
this.SpecCode.ReadOnly = true;
this.SpecCode.Width = 124;
//
// DeviceNo
//
this.DeviceNo.DataPropertyName = "DeviceNo";
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.DeviceNo.DefaultCellStyle = dataGridViewCellStyle8;
this.DeviceNo.HeaderText = "小车号";
this.DeviceNo.Name = "DeviceNo";
this.DeviceNo.ReadOnly = true;
this.DeviceNo.Width = 80;
//
// StandardWeight
//
this.StandardWeight.DataPropertyName = "StandardWeight";
dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.StandardWeight.DefaultCellStyle = dataGridViewCellStyle9;
this.StandardWeight.HeaderText = "标准重量";
this.StandardWeight.Name = "StandardWeight";
this.StandardWeight.ReadOnly = true;
//
// BaseRubFinishTime
//
this.BaseRubFinishTime.DataPropertyName = "BaseRubTimeSpan";
dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.BaseRubFinishTime.DefaultCellStyle = dataGridViewCellStyle10;
this.BaseRubFinishTime.HeaderText = "基部胶完成时间";
this.BaseRubFinishTime.Name = "BaseRubFinishTime";
this.BaseRubFinishTime.ReadOnly = true;
this.BaseRubFinishTime.Width = 162;
//
// MidRubFinishTime
//
this.MidRubFinishTime.DataPropertyName = "MidRubTimeSpan";
dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.MidRubFinishTime.DefaultCellStyle = dataGridViewCellStyle11;
this.MidRubFinishTime.HeaderText = "中层胶完成时间";
this.MidRubFinishTime.Name = "MidRubFinishTime";
this.MidRubFinishTime.ReadOnly = true;
this.MidRubFinishTime.Width = 162;
//
// RowTireFinishTime
//
this.RowTireFinishTime.DataPropertyName = "FaceRubTimeSpan";
dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.RowTireFinishTime.DefaultCellStyle = dataGridViewCellStyle12;
this.RowTireFinishTime.HeaderText = "生胎完成时间";
this.RowTireFinishTime.Name = "RowTireFinishTime";
this.RowTireFinishTime.ReadOnly = true;
this.RowTireFinishTime.Width = 141;
//
// TireWeight
//
this.TireWeight.DataPropertyName = "RawTireWeight";
dataGridViewCellStyle13.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.TireWeight.DefaultCellStyle = dataGridViewCellStyle13;
this.TireWeight.HeaderText = "生胎重量";
this.TireWeight.Name = "TireWeight";
this.TireWeight.ReadOnly = true;
//
// RepeatWeight
//
this.RepeatWeight.DataPropertyName = "RepeatWeight";
dataGridViewCellStyle14.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.RepeatWeight.DefaultCellStyle = dataGridViewCellStyle14;
this.RepeatWeight.HeaderText = "复重重量";
this.RepeatWeight.Name = "RepeatWeight";
this.RepeatWeight.ReadOnly = true;
//
// IsDone
//
this.IsDone.DataPropertyName = "IsDone";
dataGridViewCellStyle15.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.IsDone.DefaultCellStyle = dataGridViewCellStyle15;
this.IsDone.HeaderText = "状态";
this.IsDone.Name = "IsDone";
this.IsDone.ReadOnly = true;
this.IsDone.Width = 90;
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("微软雅黑", 18F);
this.label5.ForeColor = System.Drawing.Color.Khaki;
this.label5.Location = new System.Drawing.Point(789, 59);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(165, 31);
this.label5.TabIndex = 12;
this.label5.Text = "复重重量(g)";
//
// MonitorMainPage
//
@ -652,7 +677,7 @@ namespace HighWayIot.Winform.UserControlPages
this.Controls.Add(this.MonitorDataGridView);
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "MonitorMainPage";
this.Size = new System.Drawing.Size(2169, 1027);
this.Size = new System.Drawing.Size(1905, 995);
this.panel1.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel3.ResumeLayout(false);
@ -716,5 +741,7 @@ namespace HighWayIot.Winform.UserControlPages
private DataGridViewTextBoxColumn TireWeight;
private DataGridViewTextBoxColumn RepeatWeight;
private DataGridViewTextBoxColumn IsDone;
private Label ReweightLabel;
private Label label5;
}
}

@ -234,13 +234,15 @@ namespace HighWayIot.Winform.UserControlPages
MonitorDataGridView.DataSource = _monitorDataSources;
MonitorDataGridView.CellFormatting += MonitorDataGridView_CellFormatting;
//产量统计
int daycount = dailyEntity.Count(x => x.StartTime >= DayStartTime && x.StartTime <= DayEndTine);
DayProductNumTextBox.Text = daycount.ToString();
int nightcount = dailyEntity.Count(x => x.StartTime >= NightStartTime && x.StartTime <= NightEndTime);
NightProductNumTextBox.Text = nightcount.ToString();
NowDateProductNumTextBox.Text = dailyEntity.Count(x => x.StartTime >= LastDayStartTime && x.StartTime <= LastNightEndTime).ToString();
ZxDailyReportEntity first = dailyEntity.FirstOrDefault();
//称重信息显示
ZxDailyReportEntity first = dailyEntity.FirstOrDefault(x => x.IsDone == 1);
if (first == null)
{
return;
@ -259,6 +261,7 @@ namespace HighWayIot.Winform.UserControlPages
}
}
RgvNoLabel.Text = first.DeviceNo.ToString();
ReweightLabel.Text = (first.RepeatWeight ?? 0).ToString();
}
catch(Exception ex)
{

@ -165,6 +165,9 @@
<metadata name="MoveText.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MoveText.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>44</value>
</metadata>

Loading…
Cancel
Save