From 69dd9bfc9dfeeffb53fba7cfcfee80234a7b5fe9 Mon Sep 17 00:00:00 2001 From: SoulStar Date: Mon, 9 Dec 2024 17:33:55 +0800 Subject: [PATCH] =?UTF-8?q?add=20-=20=E6=B7=BB=E5=8A=A0=E4=B8=BB=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HighWayIot.Log4net/config/log4net.config | 11 +- .../HighWayIot.Repository.csproj | 4 + .../domain/SysErrorLogEntity.cs | 53 ++ HighWayIot.Repository/domain/SysLogEntity.cs | 67 ++ .../service/SysErrorLogService.cs | 47 ++ .../service/SysLogService.cs | 47 ++ HighWayIot.Winform/Business/SqlLogHelper.cs | 13 + HighWayIot.Winform/Configuration.xml | 13 +- HighWayIot.Winform/HighWayIot.Winform.csproj | 7 +- .../MainForm/BaseForm.Designer.cs | 62 +- .../MonitorMainPage.Designer.cs | 67 -- .../UserControlPages/MonitorMainPage.cs | 20 - .../MonitorMainPage.Designer.cs | 616 ++++++++++++++++++ .../MonitorMainPages/MonitorMainPage.cs | 60 ++ .../MonitorMainPage.resx | 36 + .../RecipeConfigPages/RecipeConfigPage.cs | 6 + {database => 数据库}/database.sql | Bin 17 files changed, 997 insertions(+), 132 deletions(-) create mode 100644 HighWayIot.Repository/domain/SysErrorLogEntity.cs create mode 100644 HighWayIot.Repository/domain/SysLogEntity.cs create mode 100644 HighWayIot.Repository/service/SysErrorLogService.cs create mode 100644 HighWayIot.Repository/service/SysLogService.cs create mode 100644 HighWayIot.Winform/Business/SqlLogHelper.cs delete mode 100644 HighWayIot.Winform/UserControlPages/MonitorMainPage.Designer.cs delete mode 100644 HighWayIot.Winform/UserControlPages/MonitorMainPage.cs create mode 100644 HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.Designer.cs create mode 100644 HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.cs rename HighWayIot.Winform/UserControlPages/{ => MonitorMainPages}/MonitorMainPage.resx (71%) rename {database => 数据库}/database.sql (100%) diff --git a/HighWayIot.Log4net/config/log4net.config b/HighWayIot.Log4net/config/log4net.config index e2f5449..c1deac9 100644 --- a/HighWayIot.Log4net/config/log4net.config +++ b/HighWayIot.Log4net/config/log4net.config @@ -24,37 +24,38 @@ - + - + - + - + - + + diff --git a/HighWayIot.Repository/HighWayIot.Repository.csproj b/HighWayIot.Repository/HighWayIot.Repository.csproj index ec0bdce..3caeffd 100644 --- a/HighWayIot.Repository/HighWayIot.Repository.csproj +++ b/HighWayIot.Repository/HighWayIot.Repository.csproj @@ -55,6 +55,8 @@ + + @@ -64,6 +66,8 @@ + + diff --git a/HighWayIot.Repository/domain/SysErrorLogEntity.cs b/HighWayIot.Repository/domain/SysErrorLogEntity.cs new file mode 100644 index 0000000..afbb98f --- /dev/null +++ b/HighWayIot.Repository/domain/SysErrorLogEntity.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using SqlSugar; +namespace HighWayIot.Repository.domain +{ + /// + /// + /// + [SugarTable("sys_error_log")] + public class SysErrorLogEntity + { + + + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + + /// + /// 备 注:报警内容 + /// 默认值: + /// + [SugarColumn(ColumnName = "text")] + public string Text { get; set; } = null; + + /// + /// 备 注:日志时间 + /// 默认值: + /// + [SugarColumn(ColumnName = "log_time")] + public DateTime? Log_time { get; set; } + + /// + /// 备 注:操作者 + /// 默认值: + /// + [SugarColumn(ColumnName = "operator")] + public string Operator { get; set; } = null; + + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "device_no")] + public int? Device_no { get; set; } + + + } + +} \ No newline at end of file diff --git a/HighWayIot.Repository/domain/SysLogEntity.cs b/HighWayIot.Repository/domain/SysLogEntity.cs new file mode 100644 index 0000000..10883c3 --- /dev/null +++ b/HighWayIot.Repository/domain/SysLogEntity.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using SqlSugar; +namespace HighWayIot.Repository.domain +{ + /// + /// + /// + [SugarTable("sys_log")] + public class Sys_log + { + + + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + + /// + /// 备 注:日志文本 + /// 默认值: + /// + [SugarColumn(ColumnName = "text")] + public string Text { get; set; } = null; + + /// + /// 备 注:日志时间 + /// 默认值: + /// + [SugarColumn(ColumnName = "log_time")] + public DateTime? Log_time { get; set; } + + /// + /// 备 注:参数1 + /// 默认值: + /// + [SugarColumn(ColumnName = "p1")] + public int? P1 { get; set; } + + /// + /// 备 注:参数2 + /// 默认值: + /// + [SugarColumn(ColumnName = "p2")] + public int? P2 { get; set; } + + /// + /// 备 注:参数3 + /// 默认值: + /// + [SugarColumn(ColumnName = "p3")] + public int? P3 { get; set; } + + /// + /// 备 注:操作者 + /// 默认值: + /// + [SugarColumn(ColumnName = "operator")] + public string Operator { get; set; } = null; + + + } + +} \ No newline at end of file diff --git a/HighWayIot.Repository/service/SysErrorLogService.cs b/HighWayIot.Repository/service/SysErrorLogService.cs new file mode 100644 index 0000000..cac4db9 --- /dev/null +++ b/HighWayIot.Repository/service/SysErrorLogService.cs @@ -0,0 +1,47 @@ +using HighWayIot.Log4net; +using HighWayIot.Repository.domain; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; + +namespace HighWayIot.Repository.service +{ + public class SysErrorLogService + { + private static readonly Lazy lazy = new Lazy(() => new SysErrorLogService()); + + public static SysErrorLogService Instance + { + get + { + return lazy.Value; + } + } + + private LogHelper log = LogHelper.Instance; + Repository _repository => new Repository("sqlserver"); + + /// + /// 查询所有班次信息 + /// + /// + public List GetShiftInfos() + { + try + { + List entity = _repository.GetList(); + return entity; + } + catch (Exception ex) + { + log.Error("用户信息获取异常", ex); + return null; + } + } + + + } +} diff --git a/HighWayIot.Repository/service/SysLogService.cs b/HighWayIot.Repository/service/SysLogService.cs new file mode 100644 index 0000000..3c1e2bf --- /dev/null +++ b/HighWayIot.Repository/service/SysLogService.cs @@ -0,0 +1,47 @@ +using HighWayIot.Log4net; +using HighWayIot.Repository.domain; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; + +namespace HighWayIot.Repository.service +{ + public class SysLogService + { + private static readonly Lazy lazy = new Lazy(() => new SysLogService()); + + public static SysLogService Instance + { + get + { + return lazy.Value; + } + } + + private LogHelper log = LogHelper.Instance; + Repository _repository => new Repository("sqlserver"); + + /// + /// 查询所有班次信息 + /// + /// + public List GetShiftInfos() + { + try + { + List entity = _repository.GetList(); + return entity; + } + catch (Exception ex) + { + log.Error("用户信息获取异常", ex); + return null; + } + } + + + } +} diff --git a/HighWayIot.Winform/Business/SqlLogHelper.cs b/HighWayIot.Winform/Business/SqlLogHelper.cs new file mode 100644 index 0000000..3d721a3 --- /dev/null +++ b/HighWayIot.Winform/Business/SqlLogHelper.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HighWayIot.Winform.Business +{ + public class SqlLogHelper + { + + } +} diff --git a/HighWayIot.Winform/Configuration.xml b/HighWayIot.Winform/Configuration.xml index 1a6d69e..6d41005 100644 --- a/HighWayIot.Winform/Configuration.xml +++ b/HighWayIot.Winform/Configuration.xml @@ -1,7 +1,7 @@  - + @@ -9,11 +9,12 @@ - - - - - + + + + + + \ No newline at end of file diff --git a/HighWayIot.Winform/HighWayIot.Winform.csproj b/HighWayIot.Winform/HighWayIot.Winform.csproj index 85aeb04..b5ab637 100644 --- a/HighWayIot.Winform/HighWayIot.Winform.csproj +++ b/HighWayIot.Winform/HighWayIot.Winform.csproj @@ -51,6 +51,7 @@ + Form @@ -96,10 +97,10 @@ MaterialUpdateForm.cs - + UserControl - + MonitorMainPage.cs @@ -223,7 +224,7 @@ MaterialUpdateForm.cs - + MonitorMainPage.cs diff --git a/HighWayIot.Winform/MainForm/BaseForm.Designer.cs b/HighWayIot.Winform/MainForm/BaseForm.Designer.cs index 846e789..1cd51df 100644 --- a/HighWayIot.Winform/MainForm/BaseForm.Designer.cs +++ b/HighWayIot.Winform/MainForm/BaseForm.Designer.cs @@ -48,6 +48,8 @@ namespace HighWayIot.Winform.MainForm this.MonitorMainPageStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ProductionSchedulingStripItem = new System.Windows.Forms.ToolStripMenuItem(); this.MaterialMenuStripItem = new System.Windows.Forms.ToolStripMenuItem(); + this.MaterialConfigStripItem = new System.Windows.Forms.ToolStripMenuItem(); + this.MaterialTypeConfigStripItem = new System.Windows.Forms.ToolStripMenuItem(); this.RecipeConfigStripItem = new System.Windows.Forms.ToolStripMenuItem(); this.EquipMaterialBindingStripItem = new System.Windows.Forms.ToolStripMenuItem(); this.TestMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -62,8 +64,6 @@ namespace HighWayIot.Winform.MainForm this.StripLabel2 = new System.Windows.Forms.ToolStripStatusLabel(); this.TimeStripLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.TimeDisplayTimer = new System.Windows.Forms.Timer(this.components); - this.MaterialConfigStripItem = new System.Windows.Forms.ToolStripMenuItem(); - this.MaterialTypeConfigStripItem = new System.Windows.Forms.ToolStripMenuItem(); this.MainMenu.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.SuspendLayout(); @@ -82,7 +82,7 @@ namespace HighWayIot.Winform.MainForm this.MainMenu.Location = new System.Drawing.Point(0, 0); this.MainMenu.Name = "MainMenu"; this.MainMenu.Padding = new System.Windows.Forms.Padding(5, 1, 0, 1); - this.MainMenu.Size = new System.Drawing.Size(1600, 24); + this.MainMenu.Size = new System.Drawing.Size(1904, 24); this.MainMenu.TabIndex = 1; this.MainMenu.Text = "menuStrip1"; // @@ -101,35 +101,35 @@ namespace HighWayIot.Winform.MainForm // UserStripMenuItem // this.UserStripMenuItem.Name = "UserStripMenuItem"; - this.UserStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.UserStripMenuItem.Size = new System.Drawing.Size(180, 22); this.UserStripMenuItem.Text = "用户管理"; this.UserStripMenuItem.Click += new System.EventHandler(this.StripMenuItemClick); // // RoleStripMenuItem // this.RoleStripMenuItem.Name = "RoleStripMenuItem"; - this.RoleStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.RoleStripMenuItem.Size = new System.Drawing.Size(180, 22); this.RoleStripMenuItem.Text = "角色管理"; this.RoleStripMenuItem.Click += new System.EventHandler(this.StripMenuItemClick); // // ShiftTimeConfigStripItem // this.ShiftTimeConfigStripItem.Name = "ShiftTimeConfigStripItem"; - this.ShiftTimeConfigStripItem.Size = new System.Drawing.Size(136, 22); + this.ShiftTimeConfigStripItem.Size = new System.Drawing.Size(180, 22); this.ShiftTimeConfigStripItem.Text = "班时间维护"; this.ShiftTimeConfigStripItem.Click += new System.EventHandler(this.StripMenuItemClick); // // LogoutStripMenuItem // this.LogoutStripMenuItem.Name = "LogoutStripMenuItem"; - this.LogoutStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.LogoutStripMenuItem.Size = new System.Drawing.Size(180, 22); this.LogoutStripMenuItem.Text = "注销"; this.LogoutStripMenuItem.Click += new System.EventHandler(this.LogoutStripMenuItem_Click); // // SysQuitStripMenuItem // this.SysQuitStripMenuItem.Name = "SysQuitStripMenuItem"; - this.SysQuitStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.SysQuitStripMenuItem.Size = new System.Drawing.Size(180, 22); this.SysQuitStripMenuItem.Text = "退出系统"; this.SysQuitStripMenuItem.Click += new System.EventHandler(this.SysQuitStripMenuItem_Click); // @@ -146,21 +146,21 @@ namespace HighWayIot.Winform.MainForm // DaliyReportStripItem // this.DaliyReportStripItem.Name = "DaliyReportStripItem"; - this.DaliyReportStripItem.Size = new System.Drawing.Size(124, 22); + this.DaliyReportStripItem.Size = new System.Drawing.Size(180, 22); this.DaliyReportStripItem.Text = "日报表"; this.DaliyReportStripItem.Click += new System.EventHandler(this.StripMenuItemClick); // // OperateLogStripMenuItem // this.OperateLogStripMenuItem.Name = "OperateLogStripMenuItem"; - this.OperateLogStripMenuItem.Size = new System.Drawing.Size(124, 22); + this.OperateLogStripMenuItem.Size = new System.Drawing.Size(180, 22); this.OperateLogStripMenuItem.Text = "操作日志"; this.OperateLogStripMenuItem.Click += new System.EventHandler(this.StripMenuItemClick); // // AlarmLogStripMenuItem // this.AlarmLogStripMenuItem.Name = "AlarmLogStripMenuItem"; - this.AlarmLogStripMenuItem.Size = new System.Drawing.Size(124, 22); + this.AlarmLogStripMenuItem.Size = new System.Drawing.Size(180, 22); this.AlarmLogStripMenuItem.Text = "报警日志"; this.AlarmLogStripMenuItem.Click += new System.EventHandler(this.StripMenuItemClick); // @@ -187,6 +187,20 @@ namespace HighWayIot.Winform.MainForm this.MaterialMenuStripItem.Size = new System.Drawing.Size(80, 22); this.MaterialMenuStripItem.Text = "原材料管理"; // + // MaterialConfigStripItem + // + this.MaterialConfigStripItem.Name = "MaterialConfigStripItem"; + this.MaterialConfigStripItem.Size = new System.Drawing.Size(180, 22); + this.MaterialConfigStripItem.Text = "物料管理"; + this.MaterialConfigStripItem.Click += new System.EventHandler(this.StripMenuItemClick); + // + // MaterialTypeConfigStripItem + // + this.MaterialTypeConfigStripItem.Name = "MaterialTypeConfigStripItem"; + this.MaterialTypeConfigStripItem.Size = new System.Drawing.Size(180, 22); + this.MaterialTypeConfigStripItem.Text = "物料类型管理"; + this.MaterialTypeConfigStripItem.Click += new System.EventHandler(this.StripMenuItemClick); + // // RecipeConfigStripItem // this.RecipeConfigStripItem.Name = "RecipeConfigStripItem"; @@ -218,7 +232,7 @@ namespace HighWayIot.Winform.MainForm this.UserControlTabs.Margin = new System.Windows.Forms.Padding(0); this.UserControlTabs.Name = "UserControlTabs"; this.UserControlTabs.SelectedIndex = 0; - this.UserControlTabs.Size = new System.Drawing.Size(1601, 875); + this.UserControlTabs.Size = new System.Drawing.Size(1905, 995); this.UserControlTabs.TabIndex = 3; // // ClosePageButton @@ -228,7 +242,7 @@ namespace HighWayIot.Winform.MainForm this.ClosePageButton.Cursor = System.Windows.Forms.Cursors.Hand; this.ClosePageButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.ClosePageButton.ForeColor = System.Drawing.SystemColors.ButtonHighlight; - this.ClosePageButton.Location = new System.Drawing.Point(1580, 1); + this.ClosePageButton.Location = new System.Drawing.Point(1884, 1); this.ClosePageButton.Name = "ClosePageButton"; this.ClosePageButton.Size = new System.Drawing.Size(20, 20); this.ClosePageButton.TabIndex = 4; @@ -246,9 +260,9 @@ namespace HighWayIot.Winform.MainForm this.toolStripStatusLabel1, this.StripLabel2, this.TimeStripLabel}); - this.statusStrip1.Location = new System.Drawing.Point(0, 899); + this.statusStrip1.Location = new System.Drawing.Point(0, 1019); this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.Size = new System.Drawing.Size(1600, 22); + this.statusStrip1.Size = new System.Drawing.Size(1904, 22); this.statusStrip1.TabIndex = 5; this.statusStrip1.Text = "statusStrip1"; // @@ -280,7 +294,7 @@ namespace HighWayIot.Winform.MainForm // this.toolStripStatusLabel1.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right))); this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; - this.toolStripStatusLabel1.Size = new System.Drawing.Size(1157, 17); + this.toolStripStatusLabel1.Size = new System.Drawing.Size(1461, 17); this.toolStripStatusLabel1.Spring = true; // // StripLabel2 @@ -300,25 +314,11 @@ namespace HighWayIot.Winform.MainForm this.TimeDisplayTimer.Interval = 1000; this.TimeDisplayTimer.Tick += new System.EventHandler(this.TimeDisplayTimer_Tick); // - // MaterialConfigStripItem - // - this.MaterialConfigStripItem.Name = "MaterialConfigStripItem"; - this.MaterialConfigStripItem.Size = new System.Drawing.Size(180, 22); - this.MaterialConfigStripItem.Text = "物料管理"; - this.MaterialConfigStripItem.Click += new System.EventHandler(this.StripMenuItemClick); - // - // MaterialTypeConfigStripItem - // - this.MaterialTypeConfigStripItem.Name = "MaterialTypeConfigStripItem"; - this.MaterialTypeConfigStripItem.Size = new System.Drawing.Size(180, 22); - this.MaterialTypeConfigStripItem.Text = "物料类型管理"; - this.MaterialTypeConfigStripItem.Click += new System.EventHandler(this.StripMenuItemClick); - // // BaseForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1600, 921); + this.ClientSize = new System.Drawing.Size(1904, 1041); this.Controls.Add(this.statusStrip1); this.Controls.Add(this.ClosePageButton); this.Controls.Add(this.UserControlTabs); diff --git a/HighWayIot.Winform/UserControlPages/MonitorMainPage.Designer.cs b/HighWayIot.Winform/UserControlPages/MonitorMainPage.Designer.cs deleted file mode 100644 index b83b95d..0000000 --- a/HighWayIot.Winform/UserControlPages/MonitorMainPage.Designer.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System.Drawing; -using System.Windows.Forms; - -namespace HighWayIot.Winform.UserControlPages -{ - partial class MonitorMainPage - { - /// - /// 必需的设计器变量。 - /// - private System.ComponentModel.IContainer components = null; - - /// - /// 清理所有正在使用的资源。 - /// - /// 如果应释放托管资源,为 true;否则为 false。 - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region 组件设计器生成的代码 - - /// - /// 设计器支持所需的方法 - 不要修改 - /// 使用代码编辑器修改此方法的内容。 - /// - private void InitializeComponent() - { - this.label1 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 50.25F); - this.label1.Location = new System.Drawing.Point(241, 211); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(372, 88); - this.label1.TabIndex = 0; - this.label1.Text = "主页面控件"; - // - // MonitorMainPage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoScroll = true; - this.AutoSize = true; - this.BackColor = System.Drawing.SystemColors.ActiveCaption; - this.Controls.Add(this.label1); - this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); - this.Name = "MonitorMainPage"; - this.Size = new System.Drawing.Size(808, 525); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private Label label1; - } -} diff --git a/HighWayIot.Winform/UserControlPages/MonitorMainPage.cs b/HighWayIot.Winform/UserControlPages/MonitorMainPage.cs deleted file mode 100644 index 4661e39..0000000 --- a/HighWayIot.Winform/UserControlPages/MonitorMainPage.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace HighWayIot.Winform.UserControlPages -{ - public partial class MonitorMainPage : UserControl - { - public MonitorMainPage() - { - InitializeComponent(); - } - } -} diff --git a/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.Designer.cs b/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.Designer.cs new file mode 100644 index 0000000..49bb0ff --- /dev/null +++ b/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.Designer.cs @@ -0,0 +1,616 @@ +using System.Drawing; +using System.Windows.Forms; + +namespace HighWayIot.Winform.UserControlPages +{ + partial class MonitorMainPage + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + this.panel1 = new System.Windows.Forms.Panel(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.label9 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); + this.panel5 = new System.Windows.Forms.Panel(); + this.NowDateProductNumTextBox = new System.Windows.Forms.TextBox(); + this.NowDateProductNumLabel = new System.Windows.Forms.Label(); + this.panel4 = new System.Windows.Forms.Panel(); + this.NightProductNumTextBox = new System.Windows.Forms.TextBox(); + this.DayProductNumTextBox = new System.Windows.Forms.TextBox(); + this.NightTimeLabel = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.DayTimeLabel = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.panel2 = new System.Windows.Forms.Panel(); + this.SpecCodeLabel = new System.Windows.Forms.Label(); + this.SpecNameLabel = new System.Windows.Forms.Label(); + this.RecipeCodeLabel = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.Id = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.DeviceNo = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.StartTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.RecipeCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.SpecName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.SpecCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.RgvNo = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.TireWeight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.BaseRubFinishTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.MidRubFinishTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.RowTireFinishTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.DataRefresh = new System.Windows.Forms.Timer(this.components); + this.panel1.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); + this.panel3.SuspendLayout(); + this.tableLayoutPanel3.SuspendLayout(); + this.panel5.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.tableLayoutPanel1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Margin = new System.Windows.Forms.Padding(0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(1627, 231); + 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.Controls.Add(this.tableLayoutPanel2, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.panel2, 0, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + 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, 231F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1627, 231); + this.tableLayoutPanel1.TabIndex = 0; + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.ColumnCount = 1; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.Controls.Add(this.panel3, 0, 0); + this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel3, 0, 1); + this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel2.Location = new System.Drawing.Point(813, 0); + this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 2; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 60F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(814, 231); + this.tableLayoutPanel2.TabIndex = 1; + // + // panel3 + // + this.panel3.BackColor = System.Drawing.SystemColors.ButtonShadow; + this.panel3.Controls.Add(this.label9); + this.panel3.Controls.Add(this.label10); + this.panel3.Controls.Add(this.label5); + this.panel3.Controls.Add(this.label6); + this.panel3.Controls.Add(this.label7); + this.panel3.Controls.Add(this.label8); + this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel3.Location = new System.Drawing.Point(0, 0); + this.panel3.Margin = new System.Windows.Forms.Padding(0); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(814, 138); + this.panel3.TabIndex = 3; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("微软雅黑", 18F); + this.label9.ForeColor = System.Drawing.Color.Khaki; + this.label9.Location = new System.Drawing.Point(480, 74); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(61, 31); + this.label9.TabIndex = 11; + this.label9.Text = "N/A"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Font = new System.Drawing.Font("微软雅黑", 18F); + this.label10.ForeColor = System.Drawing.Color.Khaki; + this.label10.Location = new System.Drawing.Point(364, 74); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(110, 31); + this.label10.TabIndex = 10; + this.label10.Text = "小车号:"; + // + // label5 + // + 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(212, 74); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(61, 31); + this.label5.TabIndex = 9; + this.label5.Text = "N/A"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("微软雅黑", 18F); + this.label6.ForeColor = System.Drawing.Color.Khaki; + this.label6.Location = new System.Drawing.Point(181, 28); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(61, 31); + this.label6.TabIndex = 8; + this.label6.Text = "N/A"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("微软雅黑", 18F); + this.label7.ForeColor = System.Drawing.Color.Khaki; + this.label7.Location = new System.Drawing.Point(41, 74); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(165, 31); + this.label7.TabIndex = 7; + this.label7.Text = "生胎重量(g):"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("微软雅黑", 18F); + this.label8.ForeColor = System.Drawing.Color.Khaki; + this.label8.Location = new System.Drawing.Point(41, 28); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(134, 31); + this.label8.TabIndex = 6; + this.label8.Text = "当前规格:"; + // + // tableLayoutPanel3 + // + this.tableLayoutPanel3.ColumnCount = 2; + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 261F)); + 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(0, 138); + 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(814, 93); + this.tableLayoutPanel3.TabIndex = 0; + // + // panel5 + // + this.panel5.BackColor = System.Drawing.SystemColors.ControlLight; + 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(553, 0); + this.panel5.Margin = new System.Windows.Forms.Padding(0); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(261, 93); + this.panel5.TabIndex = 4; + // + // NowDateProductNumTextBox + // + this.NowDateProductNumTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.NowDateProductNumTextBox.Font = new System.Drawing.Font("宋体", 15F); + this.NowDateProductNumTextBox.Location = new System.Drawing.Point(67, 47); + this.NowDateProductNumTextBox.Name = "NowDateProductNumTextBox"; + this.NowDateProductNumTextBox.Size = new System.Drawing.Size(122, 30); + this.NowDateProductNumTextBox.TabIndex = 18; + // + // NowDateProductNumLabel + // + this.NowDateProductNumLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.NowDateProductNumLabel.AutoSize = true; + this.NowDateProductNumLabel.Font = new System.Drawing.Font("微软雅黑", 15F); + this.NowDateProductNumLabel.ForeColor = System.Drawing.Color.Sienna; + this.NowDateProductNumLabel.Location = new System.Drawing.Point(48, 12); + this.NowDateProductNumLabel.Name = "NowDateProductNumLabel"; + this.NowDateProductNumLabel.Size = new System.Drawing.Size(164, 27); + this.NowDateProductNumLabel.TabIndex = 13; + this.NowDateProductNumLabel.Text = "99 月 99 日 产量"; + this.NowDateProductNumLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel4 + // + this.panel4.BackColor = System.Drawing.SystemColors.ScrollBar; + this.panel4.Controls.Add(this.NightProductNumTextBox); + this.panel4.Controls.Add(this.DayProductNumTextBox); + this.panel4.Controls.Add(this.NightTimeLabel); + this.panel4.Controls.Add(this.label13); + this.panel4.Controls.Add(this.DayTimeLabel); + this.panel4.Controls.Add(this.label12); + this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; + 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(553, 93); + this.panel4.TabIndex = 3; + // + // NightProductNumTextBox + // + this.NightProductNumTextBox.Font = new System.Drawing.Font("宋体", 15F); + this.NightProductNumTextBox.Location = new System.Drawing.Point(319, 47); + this.NightProductNumTextBox.Name = "NightProductNumTextBox"; + this.NightProductNumTextBox.Size = new System.Drawing.Size(122, 30); + this.NightProductNumTextBox.TabIndex = 17; + // + // DayProductNumTextBox + // + this.DayProductNumTextBox.Font = new System.Drawing.Font("宋体", 15F); + this.DayProductNumTextBox.Location = new System.Drawing.Point(74, 47); + this.DayProductNumTextBox.Name = "DayProductNumTextBox"; + this.DayProductNumTextBox.Size = new System.Drawing.Size(122, 30); + this.DayProductNumTextBox.TabIndex = 16; + // + // NightTimeLabel + // + 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.Name = "NightTimeLabel"; + this.NightTimeLabel.Size = new System.Drawing.Size(127, 27); + this.NightTimeLabel.TabIndex = 15; + this.NightTimeLabel.Text = "99:99-99:99"; + // + // label13 + // + 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.Name = "label13"; + this.label13.Size = new System.Drawing.Size(72, 27); + this.label13.TabIndex = 14; + this.label13.Text = "夜班:"; + // + // DayTimeLabel + // + 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.Name = "DayTimeLabel"; + this.DayTimeLabel.Size = new System.Drawing.Size(127, 27); + this.DayTimeLabel.TabIndex = 13; + this.DayTimeLabel.Text = "99:99-99:99"; + // + // label12 + // + 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.Name = "label12"; + this.label12.Size = new System.Drawing.Size(72, 27); + this.label12.TabIndex = 12; + this.label12.Text = "白班:"; + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.Gray; + this.panel2.Controls.Add(this.SpecCodeLabel); + this.panel2.Controls.Add(this.SpecNameLabel); + this.panel2.Controls.Add(this.RecipeCodeLabel); + this.panel2.Controls.Add(this.label4); + this.panel2.Controls.Add(this.label3); + this.panel2.Controls.Add(this.label2); + this.panel2.Controls.Add(this.label1); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + 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(813, 231); + this.panel2.TabIndex = 2; + // + // SpecCodeLabel + // + this.SpecCodeLabel.AutoSize = true; + this.SpecCodeLabel.Font = new System.Drawing.Font("微软雅黑", 18F); + this.SpecCodeLabel.ForeColor = System.Drawing.Color.LightGoldenrodYellow; + this.SpecCodeLabel.Location = new System.Drawing.Point(181, 152); + this.SpecCodeLabel.Name = "SpecCodeLabel"; + this.SpecCodeLabel.Size = new System.Drawing.Size(61, 31); + this.SpecCodeLabel.TabIndex = 6; + this.SpecCodeLabel.Text = "N/A"; + // + // SpecNameLabel + // + this.SpecNameLabel.AutoSize = true; + this.SpecNameLabel.Font = new System.Drawing.Font("微软雅黑", 18F); + this.SpecNameLabel.ForeColor = System.Drawing.Color.LightGoldenrodYellow; + this.SpecNameLabel.Location = new System.Drawing.Point(181, 105); + this.SpecNameLabel.Name = "SpecNameLabel"; + this.SpecNameLabel.Size = new System.Drawing.Size(61, 31); + this.SpecNameLabel.TabIndex = 5; + this.SpecNameLabel.Text = "N/A"; + // + // RecipeCodeLabel + // + this.RecipeCodeLabel.AutoSize = true; + this.RecipeCodeLabel.Font = new System.Drawing.Font("微软雅黑", 18F); + this.RecipeCodeLabel.ForeColor = System.Drawing.Color.LightGoldenrodYellow; + this.RecipeCodeLabel.Location = new System.Drawing.Point(181, 59); + this.RecipeCodeLabel.Name = "RecipeCodeLabel"; + this.RecipeCodeLabel.Size = new System.Drawing.Size(61, 31); + this.RecipeCodeLabel.TabIndex = 4; + this.RecipeCodeLabel.Text = "N/A"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("微软雅黑", 18F); + this.label4.ForeColor = System.Drawing.Color.LightGoldenrodYellow; + this.label4.Location = new System.Drawing.Point(45, 151); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(144, 31); + this.label4.TabIndex = 3; + this.label4.Text = "SPEC编号:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("微软雅黑", 18F); + this.label3.ForeColor = System.Drawing.Color.LightGoldenrodYellow; + this.label3.Location = new System.Drawing.Point(55, 104); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(134, 31); + this.label3.TabIndex = 2; + this.label3.Text = "标称尺度:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("微软雅黑", 18F); + this.label2.ForeColor = System.Drawing.Color.LightGoldenrodYellow; + this.label2.Location = new System.Drawing.Point(55, 58); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(134, 31); + this.label2.TabIndex = 1; + this.label2.Text = "配方编号:"; + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("宋体", 15F); + this.label1.ForeColor = System.Drawing.Color.Cyan; + this.label1.Location = new System.Drawing.Point(333, 14); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(129, 20); + this.label1.TabIndex = 0; + this.label1.Text = "运行中的计划"; + // + // dataGridView1 + // + this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.Id, + this.DeviceNo, + this.StartTime, + this.RecipeCode, + this.SpecName, + this.SpecCode, + this.RgvNo, + this.TireWeight, + this.BaseRubFinishTime, + this.MidRubFinishTime, + this.RowTireFinishTime}); + this.dataGridView1.Location = new System.Drawing.Point(0, 231); + this.dataGridView1.Margin = new System.Windows.Forms.Padding(0); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.RowHeadersVisible = false; + this.dataGridView1.RowTemplate.Height = 23; + this.dataGridView1.Size = new System.Drawing.Size(1627, 774); + this.dataGridView1.TabIndex = 1; + // + // Id + // + this.Id.HeaderText = "序号"; + this.Id.Name = "Id"; + this.Id.Width = 70; + // + // DeviceNo + // + this.DeviceNo.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.DeviceNo.HeaderText = "机位"; + this.DeviceNo.Name = "DeviceNo"; + // + // StartTime + // + this.StartTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.StartTime.HeaderText = "开始时间"; + this.StartTime.Name = "StartTime"; + // + // RecipeCode + // + this.RecipeCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.RecipeCode.HeaderText = "成品代号"; + this.RecipeCode.Name = "RecipeCode"; + // + // SpecName + // + this.SpecName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.SpecName.HeaderText = "标称尺度"; + this.SpecName.Name = "SpecName"; + // + // SpecCode + // + this.SpecCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.SpecCode.HeaderText = "SPEC编号"; + this.SpecCode.Name = "SpecCode"; + // + // RgvNo + // + this.RgvNo.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.RgvNo.HeaderText = "小车号"; + this.RgvNo.Name = "RgvNo"; + // + // TireWeight + // + this.TireWeight.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.TireWeight.HeaderText = "轮胎重量"; + this.TireWeight.Name = "TireWeight"; + // + // BaseRubFinishTime + // + this.BaseRubFinishTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.BaseRubFinishTime.HeaderText = "基部胶完成时间"; + this.BaseRubFinishTime.Name = "BaseRubFinishTime"; + // + // MidRubFinishTime + // + this.MidRubFinishTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.MidRubFinishTime.HeaderText = "中层胶完成时间"; + this.MidRubFinishTime.Name = "MidRubFinishTime"; + // + // RowTireFinishTime + // + this.RowTireFinishTime.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.RowTireFinishTime.HeaderText = "生胎完成时间"; + this.RowTireFinishTime.Name = "RowTireFinishTime"; + // + // DataRefresh + // + this.DataRefresh.Enabled = true; + this.DataRefresh.Interval = 1000; + this.DataRefresh.Tick += new System.EventHandler(this.DataRefresh_Tick); + // + // MonitorMainPage + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScroll = true; + this.AutoSize = true; + this.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.Controls.Add(this.dataGridView1); + this.Controls.Add(this.panel1); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.Name = "MonitorMainPage"; + this.Size = new System.Drawing.Size(1627, 1005); + this.panel1.ResumeLayout(false); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel2.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.tableLayoutPanel3.ResumeLayout(false); + this.panel5.ResumeLayout(false); + this.panel5.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private Panel panel1; + private TableLayoutPanel tableLayoutPanel1; + private TableLayoutPanel tableLayoutPanel2; + private TableLayoutPanel tableLayoutPanel3; + private Panel panel3; + private Panel panel5; + private Panel panel4; + private Panel panel2; + private DataGridView dataGridView1; + private Label label1; + private Label label2; + private Label SpecCodeLabel; + private Label SpecNameLabel; + private Label RecipeCodeLabel; + private Label label4; + private Label label3; + private Label label5; + private Label label6; + private Label label7; + private Label label8; + private Label label9; + private Label label10; + private Label DayTimeLabel; + private Label label12; + private Label NightTimeLabel; + private Label label13; + private Label NowDateProductNumLabel; + private TextBox NowDateProductNumTextBox; + private TextBox NightProductNumTextBox; + private TextBox DayProductNumTextBox; + private DataGridViewTextBoxColumn Id; + private DataGridViewTextBoxColumn DeviceNo; + private DataGridViewTextBoxColumn StartTime; + private DataGridViewTextBoxColumn RecipeCode; + private DataGridViewTextBoxColumn SpecName; + private DataGridViewTextBoxColumn SpecCode; + private DataGridViewTextBoxColumn RgvNo; + private DataGridViewTextBoxColumn TireWeight; + private DataGridViewTextBoxColumn BaseRubFinishTime; + private DataGridViewTextBoxColumn MidRubFinishTime; + private DataGridViewTextBoxColumn RowTireFinishTime; + private Timer DataRefresh; + } +} diff --git a/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.cs b/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.cs new file mode 100644 index 0000000..ce00730 --- /dev/null +++ b/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.cs @@ -0,0 +1,60 @@ +using HighWayIot.Log4net; +using HighWayIot.Repository.service; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace HighWayIot.Winform.UserControlPages +{ + public partial class MonitorMainPage : UserControl + { + LogHelper logHelper = LogHelper.Instance; + + SysShiftTimeService shiftTimeService = SysShiftTimeService.Instance; + + public MonitorMainPage() + { + InitializeComponent(); + } + + /// + /// TImer事件 + /// + /// + /// + private void DataRefresh_Tick(object sender, EventArgs e) + { + DateTimeRefresh(); + } + + /// + /// 白夜班时间,现在时间控件刷新 + /// + private void DateTimeRefresh() + { + var timeList = shiftTimeService.GetShiftInfos(); + var morningShift = timeList.Where(x => x.ShiftName == "早").FirstOrDefault(); + var midShift = timeList.Where(x => x.ShiftName == "中").FirstOrDefault(); + var nightShift = timeList.Where(x => x.ShiftName == "夜").FirstOrDefault(); + + if(morningShift == null || midShift == null || nightShift == null) + { + logHelper.Error("检查班次数据库是否早中夜班配置齐全!"); + return; + } + + string dayString = morningShift.ShiftStartTime.Substring(0, 5) + "-" + midShift.ShiftEndTime.Substring(0, 5); + string nightString = nightShift.ShiftStartTime.Substring(0, 5) + "-" + nightShift.ShiftEndTime.Substring(0, 5); + DayTimeLabel.Text = dayString; + NightTimeLabel.Text = nightString; + + NowDateProductNumLabel.Text = DateTime.Now.ToString("MM 月 dd 日 产量"); + } + } +} diff --git a/HighWayIot.Winform/UserControlPages/MonitorMainPage.resx b/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.resx similarity index 71% rename from HighWayIot.Winform/UserControlPages/MonitorMainPage.resx rename to HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.resx index 1af7de1..7520e01 100644 --- a/HighWayIot.Winform/UserControlPages/MonitorMainPage.resx +++ b/HighWayIot.Winform/UserControlPages/MonitorMainPages/MonitorMainPage.resx @@ -117,4 +117,40 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + 17, 17 + \ No newline at end of file diff --git a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.cs b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.cs index 6e5d3f7..f86f88e 100644 --- a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.cs +++ b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.cs @@ -435,6 +435,7 @@ namespace HighWayIot.Winform.UserControlPages if (zxRecipeParaEntityCut == null) { MessageBox.Show("剪切板为空!"); + return; } SetParaValue(zxRecipeParaEntityCut); } @@ -448,6 +449,11 @@ namespace HighWayIot.Winform.UserControlPages { zxRecipeParaEntityCut = null; NowCopyLabel.Text = "N/A"; + + if (MessageBox.Show("是否要清空前端数据", "", MessageBoxButtons.YesNo) == DialogResult.OK) + { + SetParaValue(new ZxRecipeParaEntity()); + } } /// diff --git a/database/database.sql b/数据库/database.sql similarity index 100% rename from database/database.sql rename to 数据库/database.sql