From 22bf65a0f6ae5d1c92fff1ff70b44c1bbef88bdc Mon Sep 17 00:00:00 2001 From: SoulStar Date: Fri, 7 Feb 2025 20:33:24 +0800 Subject: [PATCH] =?UTF-8?q?feat=20-=20=E9=87=8D=E6=9E=84=E9=85=8D=E6=96=B9?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E7=95=8C=E9=9D=A2=20-=20=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E5=86=99=E5=85=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/ZxRecipeParaEntity.cs | 127 +++--- .../domain/ZxRecipePositionParaEntity.cs | 15 + .../service/ZxRecipePositionParaService.cs | 30 +- .../MainForm/BaseForm.Designer.cs | 50 +- HighWayIot.Winform/MainForm/BaseForm.cs | 25 +- HighWayIot.Winform/MainForm/BaseForm.resx | 3 - .../RecipeConfigPage.Designer.cs | 430 +++++++++++++----- .../RecipeConfigPages/RecipeConfigPage.cs | 272 +++++++---- 8 files changed, 633 insertions(+), 319 deletions(-) diff --git a/HighWayIot.Repository/domain/ZxRecipeParaEntity.cs b/HighWayIot.Repository/domain/ZxRecipeParaEntity.cs index e03cb04..c7d0f41 100644 --- a/HighWayIot.Repository/domain/ZxRecipeParaEntity.cs +++ b/HighWayIot.Repository/domain/ZxRecipeParaEntity.cs @@ -25,62 +25,6 @@ namespace Models [SugarColumn(ColumnName = "recipe_code")] public string RecipeCode { get; set; } = string.Empty; - /// - /// 备 注: - /// 默认值: - /// - [SugarColumn(ColumnName = "P1")] - public int? P1 { get; set; } - - /// - /// 备 注: - /// 默认值: - /// - [SugarColumn(ColumnName = "P2")] - public int? P2 { get; set; } - - /// - /// 备 注: - /// 默认值: - /// - [SugarColumn(ColumnName = "P31")] - public int? P31 { get; set; } - - /// - /// 备 注: - /// 默认值: - /// - [SugarColumn(ColumnName = "P32")] - public int? P32 { get; set; } - - /// - /// 备 注: - /// 默认值: - /// - [SugarColumn(ColumnName = "P41")] - public int? P41 { get; set; } - - /// - /// 备 注: - /// 默认值: - /// - [SugarColumn(ColumnName = "P42")] - public int? P42 { get; set; } - - /// - /// 备 注: - /// 默认值: - /// - [SugarColumn(ColumnName = "P51")] - public int? P51 { get; set; } - - /// - /// 备 注: - /// 默认值: - /// - [SugarColumn(ColumnName = "P52")] - public int? P52 { get; set; } - /// /// 备 注:钢圈尺寸 /// 默认值: @@ -130,6 +74,77 @@ namespace Models [SugarColumn(ColumnName = "spec_code")] public int? SpecCode { get; set; } + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "S0")] + public bool? S0 { get; set; } + + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "S1")] + public bool? S1 { get; set; } + + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "S2")] + public bool? S2 { get; set; } + + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "S3")] + public bool? S3 { get; set; } + + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "S4")] + public bool? S4 { get; set; } + + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "S5")] + public bool? S5 { get; set; } + + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "S6")] + public bool? S6 { get; set; } + + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "S7")] + public bool? S7 { get; set; } + + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "S8")] + public bool? S8 { get; set; } + + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "S9")] + public bool? S9 { get; set; } + + } } \ No newline at end of file diff --git a/HighWayIot.Repository/domain/ZxRecipePositionParaEntity.cs b/HighWayIot.Repository/domain/ZxRecipePositionParaEntity.cs index 76b93b0..23b2bed 100644 --- a/HighWayIot.Repository/domain/ZxRecipePositionParaEntity.cs +++ b/HighWayIot.Repository/domain/ZxRecipePositionParaEntity.cs @@ -124,5 +124,20 @@ namespace HighWayIot.Repository.domain /// [SugarColumn(ColumnName = "E15")] public int? E15 { get; set; } + + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "recipe_code")] + public string RecipeCode { get; set; } = string.Empty; + + /// + /// 备 注: + /// 默认值: + /// + [SugarColumn(ColumnName = "position")] + public int? Position { get; set; } + } } diff --git a/HighWayIot.Repository/service/ZxRecipePositionParaService.cs b/HighWayIot.Repository/service/ZxRecipePositionParaService.cs index a5c4ad0..d4a23ca 100644 --- a/HighWayIot.Repository/service/ZxRecipePositionParaService.cs +++ b/HighWayIot.Repository/service/ZxRecipePositionParaService.cs @@ -4,6 +4,7 @@ using Models; using System; using System.Collections.Generic; using System.Linq; +using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; @@ -43,21 +44,40 @@ namespace HighWayIot.Repository.service } /// - /// 根据ID查询工位配方字段信息 + /// 查询工位配方字段信息 /// - /// 工位配方编号 /// - public ZxRecipePositionParaEntity GetRecipePositionParaInfoById(int id) + public List GetRecipePositionParaInfos(Expression> whereExpression) { try { - ZxRecipePositionParaEntity entity = _repository.GetById(id); + List entity = _repository.GetList(whereExpression); return entity; } catch (Exception ex) { log.Error("工位配方字段信息获取异常", ex); - return new ZxRecipePositionParaEntity(); + return null; + } + } + + + /// + /// 根据配方号查询工位配方字段信息 + /// + /// 工位配方编号 + /// + public List GetRecipePositionParaInfoByRecipeCode(string recipeCode) + { + try + { + List entity = _repository.GetList(x => x.RecipeCode == recipeCode); + return entity; + } + catch (Exception ex) + { + log.Error("工位配方字段信息获取异常", ex); + return new List(); } } diff --git a/HighWayIot.Winform/MainForm/BaseForm.Designer.cs b/HighWayIot.Winform/MainForm/BaseForm.Designer.cs index ff84472..066c788 100644 --- a/HighWayIot.Winform/MainForm/BaseForm.Designer.cs +++ b/HighWayIot.Winform/MainForm/BaseForm.Designer.cs @@ -63,13 +63,12 @@ namespace HighWayIot.Winform.MainForm this.SplitLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); this.StripLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); this.NowLoginUserName = new System.Windows.Forms.ToolStripStatusLabel(); - this.LogInformation = new System.Windows.Forms.ToolStripStatusLabel(); + this.SplitLabel2 = new System.Windows.Forms.ToolStripStatusLabel(); + this.LogInformationToolStrip = new System.Windows.Forms.ToolStripStatusLabel(); + this.SplitLabel3 = new System.Windows.Forms.ToolStripStatusLabel(); this.StripLabel2 = new System.Windows.Forms.ToolStripStatusLabel(); this.TimeStripLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.TimeDisplayTimer = new System.Windows.Forms.Timer(this.components); - this.DataRefreshTimer = new System.Windows.Forms.Timer(this.components); - this.SplitLabel2 = new System.Windows.Forms.ToolStripStatusLabel(); - this.SplitLabel3 = new System.Windows.Forms.ToolStripStatusLabel(); this.MainMenu.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.SuspendLayout(); @@ -287,7 +286,7 @@ namespace HighWayIot.Winform.MainForm this.StripLabel1, this.NowLoginUserName, this.SplitLabel2, - this.LogInformation, + this.LogInformationToolStrip, this.SplitLabel3, this.StripLabel2, this.TimeStripLabel}); @@ -321,12 +320,24 @@ namespace HighWayIot.Winform.MainForm this.NowLoginUserName.Size = new System.Drawing.Size(31, 17); this.NowLoginUserName.Text = "N/A"; // - // LogInformation + // SplitLabel2 // - this.LogInformation.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right))); - this.LogInformation.Name = "LogInformation"; - this.LogInformation.Size = new System.Drawing.Size(1064, 17); - this.LogInformation.Spring = true; + this.SplitLabel2.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right))); + this.SplitLabel2.Name = "SplitLabel2"; + this.SplitLabel2.Size = new System.Drawing.Size(4, 17); + // + // LogInformationToolStrip + // + this.LogInformationToolStrip.Name = "LogInformationToolStrip"; + this.LogInformationToolStrip.Size = new System.Drawing.Size(1064, 17); + this.LogInformationToolStrip.Spring = true; + this.LogInformationToolStrip.Text = "message"; + // + // SplitLabel3 + // + this.SplitLabel3.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right))); + this.SplitLabel3.Name = "SplitLabel3"; + this.SplitLabel3.Size = new System.Drawing.Size(4, 17); // // StripLabel2 // @@ -345,22 +356,6 @@ namespace HighWayIot.Winform.MainForm this.TimeDisplayTimer.Interval = 1000; this.TimeDisplayTimer.Tick += new System.EventHandler(this.TimeDisplayTimer_Tick); // - // DataRefreshTimer - // - this.DataRefreshTimer.Tick += new System.EventHandler(this.DataRefreshTimer_Tick); - // - // SplitLabel2 - // - this.SplitLabel2.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right; - this.SplitLabel2.Name = "SplitLabel2"; - this.SplitLabel2.Size = new System.Drawing.Size(4, 17); - // - // SplitLabel3 - // - this.SplitLabel3.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Left; - this.SplitLabel3.Name = "SplitLabel3"; - this.SplitLabel3.Size = new System.Drawing.Size(4, 17); - // // BaseForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -403,7 +398,7 @@ namespace HighWayIot.Winform.MainForm private ToolStripStatusLabel StripLabel1; private ToolStripStatusLabel SplitLabel1; private ToolStripStatusLabel NowLoginUserName; - private ToolStripStatusLabel LogInformation; + private ToolStripStatusLabel LogInformationToolStrip; private ToolStripStatusLabel StripLabel2; private ToolStripStatusLabel TimeStripLabel; private Timer TimeDisplayTimer; @@ -417,7 +412,6 @@ namespace HighWayIot.Winform.MainForm private ToolStripMenuItem MaterialConfigStripItem; private ToolStripMenuItem MaterialTypeConfigStripItem; private ToolStripMenuItem DeviceDataManageToolStripMenuItem; - private Timer DataRefreshTimer; private ToolStripMenuItem RFIDParamManageToolStripMenuItem; private ToolStripMenuItem DeviceParamManageToolStripMenuItem; private ToolStripStatusLabel SplitLabel2; diff --git a/HighWayIot.Winform/MainForm/BaseForm.cs b/HighWayIot.Winform/MainForm/BaseForm.cs index 2eccb60..ad9ce5d 100644 --- a/HighWayIot.Winform/MainForm/BaseForm.cs +++ b/HighWayIot.Winform/MainForm/BaseForm.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; +using System.Diagnostics.Eventing.Reader; using System.Drawing; using System.Linq; using System.Text; @@ -39,6 +40,11 @@ namespace HighWayIot.Winform.MainForm /// WorkStationBusiness workStationBusiness = new WorkStationBusiness(); + /// + /// 底边栏消息提示刷新 + /// + public static Action LogRefreshAction; + public BaseForm() { InitializeComponent(); @@ -55,6 +61,10 @@ namespace HighWayIot.Winform.MainForm NowLoginUserName.Text = RoleBusiness.LoginUserName; UserPanelSwitch(typeof(MonitorMainPage), "监控主页面"); RoleControl(); + LogRefreshAction += (log) => + { + LogInformationToolStrip.Text = log; + }; } /// @@ -274,20 +284,5 @@ namespace HighWayIot.Winform.MainForm TraverseMenuitem(i); } } - - private void DeviceDataManageToolStripMenuItem_Click(object sender, EventArgs e) - { - - } - - private void DataRefreshTimer_Tick(object sender, EventArgs e) - { - //一读 - - //判断结果 - - //哪个工位读到了哪个工位写 - - } } } diff --git a/HighWayIot.Winform/MainForm/BaseForm.resx b/HighWayIot.Winform/MainForm/BaseForm.resx index 3ab3a51..6ec8fc0 100644 --- a/HighWayIot.Winform/MainForm/BaseForm.resx +++ b/HighWayIot.Winform/MainForm/BaseForm.resx @@ -126,9 +126,6 @@ 257, 17 - - 415, 17 - diff --git a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.Designer.cs b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.Designer.cs index aeee997..4cf301b 100644 --- a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.Designer.cs +++ b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.Designer.cs @@ -72,11 +72,19 @@ namespace HighWayIot.Winform.UserControlPages this.label17 = new System.Windows.Forms.Label(); this.NowCopyLabel = new System.Windows.Forms.Label(); this.label23 = new System.Windows.Forms.Label(); - this.ClearCutBoradButton = new System.Windows.Forms.Button(); this.PasteParaButton = new System.Windows.Forms.Button(); this.CopyParaButton = new System.Windows.Forms.Button(); this.SaveParaButton = new System.Windows.Forms.Button(); this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.S2Check = new System.Windows.Forms.CheckBox(); + this.S8Check = new System.Windows.Forms.CheckBox(); + this.S5Check = new System.Windows.Forms.CheckBox(); + this.S1Check = new System.Windows.Forms.CheckBox(); + this.S7Check = new System.Windows.Forms.CheckBox(); + this.S4Check = new System.Windows.Forms.CheckBox(); + this.S0Check = new System.Windows.Forms.CheckBox(); + this.S6Check = new System.Windows.Forms.CheckBox(); + this.S3Check = new System.Windows.Forms.CheckBox(); this.button2 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button(); this.SpecNameLabel = new System.Windows.Forms.Label(); @@ -93,9 +101,7 @@ namespace HighWayIot.Winform.UserControlPages this.LightWidthTextBox = new System.Windows.Forms.TextBox(); this.label15 = new System.Windows.Forms.Label(); this.RimInchTextBox = new System.Windows.Forms.TextBox(); - this.SideCutCheckBox = new System.Windows.Forms.CheckBox(); - this.WeightCalCheckBox = new System.Windows.Forms.CheckBox(); - this.PosititonIsUseCheckBox = new System.Windows.Forms.CheckBox(); + this.S9Check = new System.Windows.Forms.CheckBox(); this.label6 = new System.Windows.Forms.Label(); this.E10TextBox = new System.Windows.Forms.TextBox(); this.label7 = new System.Windows.Forms.Label(); @@ -133,6 +139,14 @@ namespace HighWayIot.Winform.UserControlPages this.UpdateWeightButton = new System.Windows.Forms.Button(); this.AddWeightButton = new System.Windows.Forms.Button(); this.DeleteWeightButton = new System.Windows.Forms.Button(); + this.groupbox5 = new System.Windows.Forms.GroupBox(); + this.label20 = new System.Windows.Forms.Label(); + this.label21 = new System.Windows.Forms.Label(); + this.label22 = new System.Windows.Forms.Label(); + this.label28 = new System.Windows.Forms.Label(); + this.label29 = new System.Windows.Forms.Label(); + this.label30 = new System.Windows.Forms.Label(); + this.label31 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.WeightDataGridView)).BeginInit(); this.ButtonPanel.SuspendLayout(); this.groupBox1.SuspendLayout(); @@ -147,6 +161,7 @@ namespace HighWayIot.Winform.UserControlPages this.PositionRadioButtonPanel.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); this.panel1.SuspendLayout(); + this.groupbox5.SuspendLayout(); this.SuspendLayout(); // // WeightDataGridView @@ -172,7 +187,7 @@ namespace HighWayIot.Winform.UserControlPages this.WeightDataGridView.Name = "WeightDataGridView"; this.WeightDataGridView.RowHeadersVisible = false; this.WeightDataGridView.RowTemplate.Height = 25; - this.WeightDataGridView.Size = new System.Drawing.Size(881, 763); + this.WeightDataGridView.Size = new System.Drawing.Size(855, 793); this.WeightDataGridView.TabIndex = 0; this.WeightDataGridView.Tag = ""; // @@ -287,7 +302,7 @@ namespace HighWayIot.Winform.UserControlPages this.ButtonPanel.Location = new System.Drawing.Point(0, 0); this.ButtonPanel.Margin = new System.Windows.Forms.Padding(0); this.ButtonPanel.Name = "ButtonPanel"; - this.ButtonPanel.Size = new System.Drawing.Size(886, 58); + this.ButtonPanel.Size = new System.Drawing.Size(861, 58); this.ButtonPanel.TabIndex = 4; // // label26 @@ -333,7 +348,7 @@ namespace HighWayIot.Winform.UserControlPages // DeleteRecipeButton // this.DeleteRecipeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.DeleteRecipeButton.Location = new System.Drawing.Point(771, 9); + this.DeleteRecipeButton.Location = new System.Drawing.Point(746, 9); this.DeleteRecipeButton.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.DeleteRecipeButton.Name = "DeleteRecipeButton"; this.DeleteRecipeButton.Size = new System.Drawing.Size(103, 39); @@ -346,10 +361,10 @@ namespace HighWayIot.Winform.UserControlPages // this.groupBox1.Controls.Add(this.WeightDataGridView); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox1.Location = new System.Drawing.Point(886, 0); + this.groupBox1.Location = new System.Drawing.Point(861, 0); this.groupBox1.Margin = new System.Windows.Forms.Padding(0); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(887, 783); + this.groupBox1.Size = new System.Drawing.Size(861, 813); this.groupBox1.TabIndex = 5; this.groupBox1.TabStop = false; this.groupBox1.Text = "称量信息"; @@ -361,7 +376,7 @@ namespace HighWayIot.Winform.UserControlPages this.groupBox2.Location = new System.Drawing.Point(0, 0); this.groupBox2.Margin = new System.Windows.Forms.Padding(0); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(886, 783); + this.groupBox2.Size = new System.Drawing.Size(861, 813); this.groupBox2.TabIndex = 6; this.groupBox2.TabStop = false; this.groupBox2.Text = "配方列表"; @@ -387,7 +402,7 @@ namespace HighWayIot.Winform.UserControlPages this.RecipeDataGridView.Name = "RecipeDataGridView"; this.RecipeDataGridView.RowHeadersVisible = false; this.RecipeDataGridView.RowTemplate.Height = 25; - this.RecipeDataGridView.Size = new System.Drawing.Size(880, 763); + this.RecipeDataGridView.Size = new System.Drawing.Size(855, 793); this.RecipeDataGridView.TabIndex = 0; this.RecipeDataGridView.Tag = ""; this.RecipeDataGridView.SelectionChanged += new System.EventHandler(this.RecipeDataGridView_SelectionChanged); @@ -474,7 +489,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, 50F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(1773, 783); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1722, 813); this.tableLayoutPanel1.TabIndex = 7; // // groupBox3 @@ -485,24 +500,26 @@ namespace HighWayIot.Winform.UserControlPages this.groupBox3.Location = new System.Drawing.Point(0, 63); this.groupBox3.Margin = new System.Windows.Forms.Padding(0); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(1773, 190); + this.groupBox3.Size = new System.Drawing.Size(1722, 190); this.groupBox3.TabIndex = 8; this.groupBox3.TabStop = false; this.groupBox3.Text = "配方参数"; // // tableLayoutPanel3 // - this.tableLayoutPanel3.ColumnCount = 2; - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 300F)); - this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel3.ColumnCount = 3; + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 400F)); + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel3.Controls.Add(this.groupBox7, 0, 0); this.tableLayoutPanel3.Controls.Add(this.groupBox4, 1, 0); + this.tableLayoutPanel3.Controls.Add(this.groupbox5, 2, 0); this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 17); 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(1767, 170); + this.tableLayoutPanel3.Size = new System.Drawing.Size(1716, 170); this.tableLayoutPanel3.TabIndex = 0; // // groupBox7 @@ -513,15 +530,16 @@ namespace HighWayIot.Winform.UserControlPages this.groupBox7.Controls.Add(this.label17); this.groupBox7.Controls.Add(this.NowCopyLabel); this.groupBox7.Controls.Add(this.label23); - this.groupBox7.Controls.Add(this.ClearCutBoradButton); this.groupBox7.Controls.Add(this.PasteParaButton); this.groupBox7.Controls.Add(this.CopyParaButton); this.groupBox7.Controls.Add(this.SaveParaButton); + this.groupBox7.Controls.Add(this.button1); + this.groupBox7.Controls.Add(this.button2); this.groupBox7.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox7.Location = new System.Drawing.Point(0, 0); this.groupBox7.Margin = new System.Windows.Forms.Padding(0); this.groupBox7.Name = "groupBox7"; - this.groupBox7.Size = new System.Drawing.Size(300, 170); + this.groupBox7.Size = new System.Drawing.Size(400, 170); this.groupBox7.TabIndex = 3; this.groupBox7.TabStop = false; this.groupBox7.Text = "参数操作"; @@ -529,7 +547,7 @@ namespace HighWayIot.Winform.UserControlPages // PastePositionButton // this.PastePositionButton.Font = new System.Drawing.Font("宋体", 12F); - this.PastePositionButton.Location = new System.Drawing.Point(172, 69); + this.PastePositionButton.Location = new System.Drawing.Point(139, 71); this.PastePositionButton.Name = "PastePositionButton"; this.PastePositionButton.Size = new System.Drawing.Size(122, 43); this.PastePositionButton.TabIndex = 9; @@ -539,7 +557,7 @@ namespace HighWayIot.Winform.UserControlPages // CopyPositionButton // this.CopyPositionButton.Font = new System.Drawing.Font("宋体", 12F); - this.CopyPositionButton.Location = new System.Drawing.Point(171, 20); + this.CopyPositionButton.Location = new System.Drawing.Point(138, 22); this.CopyPositionButton.Name = "CopyPositionButton"; this.CopyPositionButton.Size = new System.Drawing.Size(122, 43); this.CopyPositionButton.TabIndex = 8; @@ -549,7 +567,7 @@ namespace HighWayIot.Winform.UserControlPages // label16 // this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(89, 142); + this.label16.Location = new System.Drawing.Point(144, 142); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(23, 12); this.label16.TabIndex = 7; @@ -558,7 +576,7 @@ namespace HighWayIot.Winform.UserControlPages // label17 // this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(89, 118); + this.label17.Location = new System.Drawing.Point(144, 118); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(77, 12); this.label17.TabIndex = 6; @@ -567,7 +585,7 @@ namespace HighWayIot.Winform.UserControlPages // NowCopyLabel // this.NowCopyLabel.AutoSize = true; - this.NowCopyLabel.Location = new System.Drawing.Point(6, 142); + this.NowCopyLabel.Location = new System.Drawing.Point(13, 142); this.NowCopyLabel.Name = "NowCopyLabel"; this.NowCopyLabel.Size = new System.Drawing.Size(23, 12); this.NowCopyLabel.TabIndex = 5; @@ -576,77 +594,47 @@ namespace HighWayIot.Winform.UserControlPages // label23 // this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(6, 118); + this.label23.Location = new System.Drawing.Point(13, 118); this.label23.Name = "label23"; this.label23.Size = new System.Drawing.Size(77, 12); this.label23.TabIndex = 4; this.label23.Text = "当前复制配方"; // - // ClearCutBoradButton - // - this.ClearCutBoradButton.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.ClearCutBoradButton.Location = new System.Drawing.Point(172, 118); - this.ClearCutBoradButton.Name = "ClearCutBoradButton"; - this.ClearCutBoradButton.Size = new System.Drawing.Size(122, 43); - this.ClearCutBoradButton.TabIndex = 3; - this.ClearCutBoradButton.Text = "清除复制信息"; - this.ClearCutBoradButton.UseVisualStyleBackColor = true; - this.ClearCutBoradButton.Click += new System.EventHandler(this.ClearCutBoradButton_Click); - // // PasteParaButton // - this.PasteParaButton.Font = new System.Drawing.Font("宋体", 9F); - this.PasteParaButton.Location = new System.Drawing.Point(88, 69); + this.PasteParaButton.Font = new System.Drawing.Font("宋体", 12F); + this.PasteParaButton.Location = new System.Drawing.Point(8, 69); this.PasteParaButton.Name = "PasteParaButton"; - this.PasteParaButton.Size = new System.Drawing.Size(76, 43); + this.PasteParaButton.Size = new System.Drawing.Size(122, 43); this.PasteParaButton.TabIndex = 2; - this.PasteParaButton.Text = "粘贴配方"; + this.PasteParaButton.Text = "粘贴配方参数"; this.PasteParaButton.UseVisualStyleBackColor = true; this.PasteParaButton.Click += new System.EventHandler(this.PasteParaButton_Click); // // CopyParaButton // - this.CopyParaButton.Font = new System.Drawing.Font("宋体", 9F); - this.CopyParaButton.Location = new System.Drawing.Point(6, 69); + this.CopyParaButton.Font = new System.Drawing.Font("宋体", 12F); + this.CopyParaButton.Location = new System.Drawing.Point(8, 22); this.CopyParaButton.Name = "CopyParaButton"; - this.CopyParaButton.Size = new System.Drawing.Size(76, 43); + this.CopyParaButton.Size = new System.Drawing.Size(122, 43); this.CopyParaButton.TabIndex = 1; - this.CopyParaButton.Text = "复制配方"; + this.CopyParaButton.Text = "复制配方参数"; this.CopyParaButton.UseVisualStyleBackColor = true; this.CopyParaButton.Click += new System.EventHandler(this.CopyParaButton_Click); // // SaveParaButton // this.SaveParaButton.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.SaveParaButton.Location = new System.Drawing.Point(6, 20); + this.SaveParaButton.Location = new System.Drawing.Point(268, 22); this.SaveParaButton.Name = "SaveParaButton"; - this.SaveParaButton.Size = new System.Drawing.Size(158, 43); + this.SaveParaButton.Size = new System.Drawing.Size(122, 43); this.SaveParaButton.TabIndex = 0; - this.SaveParaButton.Text = "保存此参数"; + this.SaveParaButton.Text = "保存参数"; this.SaveParaButton.UseVisualStyleBackColor = true; this.SaveParaButton.Click += new System.EventHandler(this.SaveParaButton_Click); // // groupBox4 // - this.groupBox4.Controls.Add(this.button2); - this.groupBox4.Controls.Add(this.button1); - this.groupBox4.Controls.Add(this.SpecNameLabel); - this.groupBox4.Controls.Add(this.SpecNoLabel); - this.groupBox4.Controls.Add(this.label19); - this.groupBox4.Controls.Add(this.label18); - this.groupBox4.Controls.Add(this.label11); - this.groupBox4.Controls.Add(this.TireWeightTextBox); - this.groupBox4.Controls.Add(this.label12); - this.groupBox4.Controls.Add(this.StopDistanceTextBox); - this.groupBox4.Controls.Add(this.label13); - this.groupBox4.Controls.Add(this.SlowDistanceTextBox); - this.groupBox4.Controls.Add(this.label14); - this.groupBox4.Controls.Add(this.LightWidthTextBox); - this.groupBox4.Controls.Add(this.label15); - this.groupBox4.Controls.Add(this.RimInchTextBox); - this.groupBox4.Controls.Add(this.SideCutCheckBox); - this.groupBox4.Controls.Add(this.WeightCalCheckBox); - this.groupBox4.Controls.Add(this.PosititonIsUseCheckBox); this.groupBox4.Controls.Add(this.label6); this.groupBox4.Controls.Add(this.E10TextBox); this.groupBox4.Controls.Add(this.label7); @@ -670,18 +658,108 @@ namespace HighWayIot.Winform.UserControlPages this.groupBox4.Controls.Add(this.SideRadioButtonPanel); this.groupBox4.Controls.Add(this.PositionRadioButtonPanel); this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox4.Location = new System.Drawing.Point(300, 0); + this.groupBox4.Location = new System.Drawing.Point(400, 0); this.groupBox4.Margin = new System.Windows.Forms.Padding(0); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(1467, 170); + this.groupBox4.Size = new System.Drawing.Size(658, 170); this.groupBox4.TabIndex = 4; this.groupBox4.TabStop = false; - this.groupBox4.Text = "参数设置"; + this.groupBox4.Text = "贴合参数"; + // + // S2Check + // + this.S2Check.AutoSize = true; + this.S2Check.Location = new System.Drawing.Point(167, 66); + this.S2Check.Margin = new System.Windows.Forms.Padding(6); + this.S2Check.Name = "S2Check"; + this.S2Check.Size = new System.Drawing.Size(15, 14); + this.S2Check.TabIndex = 57; + this.S2Check.UseVisualStyleBackColor = true; + // + // S8Check + // + this.S8Check.AutoSize = true; + this.S8Check.Location = new System.Drawing.Point(167, 118); + this.S8Check.Margin = new System.Windows.Forms.Padding(6); + this.S8Check.Name = "S8Check"; + this.S8Check.Size = new System.Drawing.Size(15, 14); + this.S8Check.TabIndex = 56; + this.S8Check.UseVisualStyleBackColor = true; + // + // S5Check + // + this.S5Check.AutoSize = true; + this.S5Check.Location = new System.Drawing.Point(167, 92); + this.S5Check.Margin = new System.Windows.Forms.Padding(6); + this.S5Check.Name = "S5Check"; + this.S5Check.Size = new System.Drawing.Size(15, 14); + this.S5Check.TabIndex = 55; + this.S5Check.UseVisualStyleBackColor = true; + // + // S1Check + // + this.S1Check.AutoSize = true; + this.S1Check.Location = new System.Drawing.Point(140, 66); + this.S1Check.Margin = new System.Windows.Forms.Padding(6); + this.S1Check.Name = "S1Check"; + this.S1Check.Size = new System.Drawing.Size(15, 14); + this.S1Check.TabIndex = 54; + this.S1Check.UseVisualStyleBackColor = true; + // + // S7Check + // + this.S7Check.AutoSize = true; + this.S7Check.Location = new System.Drawing.Point(140, 118); + this.S7Check.Margin = new System.Windows.Forms.Padding(6); + this.S7Check.Name = "S7Check"; + this.S7Check.Size = new System.Drawing.Size(15, 14); + this.S7Check.TabIndex = 53; + this.S7Check.UseVisualStyleBackColor = true; + // + // S4Check + // + this.S4Check.AutoSize = true; + this.S4Check.Location = new System.Drawing.Point(140, 92); + this.S4Check.Margin = new System.Windows.Forms.Padding(6); + this.S4Check.Name = "S4Check"; + this.S4Check.Size = new System.Drawing.Size(15, 14); + this.S4Check.TabIndex = 52; + this.S4Check.UseVisualStyleBackColor = true; + // + // S0Check + // + this.S0Check.AutoSize = true; + this.S0Check.Location = new System.Drawing.Point(113, 66); + this.S0Check.Margin = new System.Windows.Forms.Padding(6); + this.S0Check.Name = "S0Check"; + this.S0Check.Size = new System.Drawing.Size(15, 14); + this.S0Check.TabIndex = 51; + this.S0Check.UseVisualStyleBackColor = true; + // + // S6Check + // + this.S6Check.AutoSize = true; + this.S6Check.Location = new System.Drawing.Point(113, 118); + this.S6Check.Margin = new System.Windows.Forms.Padding(6); + this.S6Check.Name = "S6Check"; + this.S6Check.Size = new System.Drawing.Size(15, 14); + this.S6Check.TabIndex = 50; + this.S6Check.UseVisualStyleBackColor = true; + // + // S3Check + // + this.S3Check.AutoSize = true; + this.S3Check.Location = new System.Drawing.Point(113, 92); + this.S3Check.Margin = new System.Windows.Forms.Padding(6); + this.S3Check.Name = "S3Check"; + this.S3Check.Size = new System.Drawing.Size(15, 14); + this.S3Check.TabIndex = 49; + this.S3Check.UseVisualStyleBackColor = true; // // button2 // this.button2.Font = new System.Drawing.Font("宋体", 12F); - this.button2.Location = new System.Drawing.Point(1079, 99); + this.button2.Location = new System.Drawing.Point(268, 120); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(122, 43); this.button2.TabIndex = 48; @@ -691,7 +769,7 @@ namespace HighWayIot.Winform.UserControlPages // button1 // this.button1.Font = new System.Drawing.Font("宋体", 12F); - this.button1.Location = new System.Drawing.Point(939, 99); + this.button1.Location = new System.Drawing.Point(268, 71); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(122, 43); this.button1.TabIndex = 47; @@ -702,7 +780,7 @@ namespace HighWayIot.Winform.UserControlPages // this.SpecNameLabel.AutoSize = true; this.SpecNameLabel.Font = new System.Drawing.Font("宋体", 13F); - this.SpecNameLabel.Location = new System.Drawing.Point(1040, 52); + this.SpecNameLabel.Location = new System.Drawing.Point(400, 125); this.SpecNameLabel.Name = "SpecNameLabel"; this.SpecNameLabel.Size = new System.Drawing.Size(35, 18); this.SpecNameLabel.TabIndex = 46; @@ -712,7 +790,7 @@ namespace HighWayIot.Winform.UserControlPages // this.SpecNoLabel.AutoSize = true; this.SpecNoLabel.Font = new System.Drawing.Font("宋体", 13F); - this.SpecNoLabel.Location = new System.Drawing.Point(1040, 26); + this.SpecNoLabel.Location = new System.Drawing.Point(400, 69); this.SpecNoLabel.Name = "SpecNoLabel"; this.SpecNoLabel.Size = new System.Drawing.Size(35, 18); this.SpecNoLabel.TabIndex = 45; @@ -722,7 +800,7 @@ namespace HighWayIot.Winform.UserControlPages // this.label19.AutoSize = true; this.label19.Font = new System.Drawing.Font("宋体", 13F); - this.label19.Location = new System.Drawing.Point(936, 52); + this.label19.Location = new System.Drawing.Point(396, 98); this.label19.Name = "label19"; this.label19.Size = new System.Drawing.Size(98, 18); this.label19.TabIndex = 44; @@ -732,7 +810,7 @@ namespace HighWayIot.Winform.UserControlPages // this.label18.AutoSize = true; this.label18.Font = new System.Drawing.Font("宋体", 13F); - this.label18.Location = new System.Drawing.Point(954, 26); + this.label18.Location = new System.Drawing.Point(396, 43); this.label18.Name = "label18"; this.label18.Size = new System.Drawing.Size(80, 18); this.label18.TabIndex = 43; @@ -741,7 +819,7 @@ namespace HighWayIot.Winform.UserControlPages // label11 // this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(743, 136); + this.label11.Location = new System.Drawing.Point(215, 139); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(53, 12); this.label11.TabIndex = 41; @@ -749,7 +827,7 @@ namespace HighWayIot.Winform.UserControlPages // // TireWeightTextBox // - this.TireWeightTextBox.Location = new System.Drawing.Point(802, 132); + this.TireWeightTextBox.Location = new System.Drawing.Point(274, 135); this.TireWeightTextBox.Name = "TireWeightTextBox"; this.TireWeightTextBox.Size = new System.Drawing.Size(100, 21); this.TireWeightTextBox.TabIndex = 40; @@ -757,7 +835,7 @@ namespace HighWayIot.Winform.UserControlPages // label12 // this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(743, 109); + this.label12.Location = new System.Drawing.Point(215, 112); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(53, 12); this.label12.TabIndex = 39; @@ -765,7 +843,7 @@ namespace HighWayIot.Winform.UserControlPages // // StopDistanceTextBox // - this.StopDistanceTextBox.Location = new System.Drawing.Point(802, 105); + this.StopDistanceTextBox.Location = new System.Drawing.Point(274, 108); this.StopDistanceTextBox.Name = "StopDistanceTextBox"; this.StopDistanceTextBox.Size = new System.Drawing.Size(100, 21); this.StopDistanceTextBox.TabIndex = 38; @@ -773,7 +851,7 @@ namespace HighWayIot.Winform.UserControlPages // label13 // this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(743, 83); + this.label13.Location = new System.Drawing.Point(215, 86); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(53, 12); this.label13.TabIndex = 37; @@ -781,7 +859,7 @@ namespace HighWayIot.Winform.UserControlPages // // SlowDistanceTextBox // - this.SlowDistanceTextBox.Location = new System.Drawing.Point(802, 78); + this.SlowDistanceTextBox.Location = new System.Drawing.Point(274, 81); this.SlowDistanceTextBox.Name = "SlowDistanceTextBox"; this.SlowDistanceTextBox.Size = new System.Drawing.Size(100, 21); this.SlowDistanceTextBox.TabIndex = 36; @@ -789,7 +867,7 @@ namespace HighWayIot.Winform.UserControlPages // label14 // this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(743, 55); + this.label14.Location = new System.Drawing.Point(215, 58); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(53, 12); this.label14.TabIndex = 35; @@ -797,7 +875,7 @@ namespace HighWayIot.Winform.UserControlPages // // LightWidthTextBox // - this.LightWidthTextBox.Location = new System.Drawing.Point(802, 51); + this.LightWidthTextBox.Location = new System.Drawing.Point(274, 54); this.LightWidthTextBox.Name = "LightWidthTextBox"; this.LightWidthTextBox.Size = new System.Drawing.Size(100, 21); this.LightWidthTextBox.TabIndex = 34; @@ -805,7 +883,7 @@ namespace HighWayIot.Winform.UserControlPages // label15 // this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(743, 28); + this.label15.Location = new System.Drawing.Point(215, 31); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(53, 12); this.label15.TabIndex = 33; @@ -813,40 +891,20 @@ namespace HighWayIot.Winform.UserControlPages // // RimInchTextBox // - this.RimInchTextBox.Location = new System.Drawing.Point(802, 24); + this.RimInchTextBox.Location = new System.Drawing.Point(274, 27); this.RimInchTextBox.Name = "RimInchTextBox"; this.RimInchTextBox.Size = new System.Drawing.Size(100, 21); this.RimInchTextBox.TabIndex = 32; // - // SideCutCheckBox + // S9Check // - this.SideCutCheckBox.AutoSize = true; - this.SideCutCheckBox.Location = new System.Drawing.Point(641, 54); - this.SideCutCheckBox.Name = "SideCutCheckBox"; - this.SideCutCheckBox.Size = new System.Drawing.Size(72, 16); - this.SideCutCheckBox.TabIndex = 31; - this.SideCutCheckBox.Text = "包边裁切"; - this.SideCutCheckBox.UseVisualStyleBackColor = true; - // - // WeightCalCheckBox - // - this.WeightCalCheckBox.AutoSize = true; - this.WeightCalCheckBox.Location = new System.Drawing.Point(641, 108); - this.WeightCalCheckBox.Name = "WeightCalCheckBox"; - this.WeightCalCheckBox.Size = new System.Drawing.Size(72, 16); - this.WeightCalCheckBox.TabIndex = 30; - this.WeightCalCheckBox.Text = "称重校准"; - this.WeightCalCheckBox.UseVisualStyleBackColor = true; - // - // PosititonIsUseCheckBox - // - this.PosititonIsUseCheckBox.AutoSize = true; - this.PosititonIsUseCheckBox.Location = new System.Drawing.Point(641, 81); - this.PosititonIsUseCheckBox.Name = "PosititonIsUseCheckBox"; - this.PosititonIsUseCheckBox.Size = new System.Drawing.Size(72, 16); - this.PosititonIsUseCheckBox.TabIndex = 29; - this.PosititonIsUseCheckBox.Text = "工位使用"; - this.PosititonIsUseCheckBox.UseVisualStyleBackColor = true; + this.S9Check.AutoSize = true; + this.S9Check.Location = new System.Drawing.Point(86, 92); + this.S9Check.Margin = new System.Windows.Forms.Padding(6); + this.S9Check.Name = "S9Check"; + this.S9Check.Size = new System.Drawing.Size(15, 14); + this.S9Check.TabIndex = 29; + this.S9Check.UseVisualStyleBackColor = true; // // label6 // @@ -1134,7 +1192,7 @@ namespace HighWayIot.Winform.UserControlPages this.tableLayoutPanel2.Name = "tableLayoutPanel2"; this.tableLayoutPanel2.RowCount = 1; this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(1773, 63); + this.tableLayoutPanel2.Size = new System.Drawing.Size(1722, 63); this.tableLayoutPanel2.TabIndex = 9; // // panel1 @@ -1147,10 +1205,10 @@ namespace HighWayIot.Winform.UserControlPages this.panel1.Controls.Add(this.UpdateWeightButton); this.panel1.Controls.Add(this.AddWeightButton); this.panel1.Controls.Add(this.DeleteWeightButton); - this.panel1.Location = new System.Drawing.Point(886, 0); + this.panel1.Location = new System.Drawing.Point(861, 0); this.panel1.Margin = new System.Windows.Forms.Padding(0); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(887, 58); + this.panel1.Size = new System.Drawing.Size(861, 58); this.panel1.TabIndex = 5; // // label27 @@ -1207,7 +1265,7 @@ namespace HighWayIot.Winform.UserControlPages // DeleteWeightButton // this.DeleteWeightButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.DeleteWeightButton.Location = new System.Drawing.Point(772, 9); + this.DeleteWeightButton.Location = new System.Drawing.Point(746, 9); this.DeleteWeightButton.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.DeleteWeightButton.Name = "DeleteWeightButton"; this.DeleteWeightButton.Size = new System.Drawing.Size(103, 39); @@ -1216,6 +1274,118 @@ namespace HighWayIot.Winform.UserControlPages this.DeleteWeightButton.UseVisualStyleBackColor = true; this.DeleteWeightButton.Click += new System.EventHandler(this.DeleteWeightButton_Click); // + // groupbox5 + // + this.groupbox5.Controls.Add(this.label30); + this.groupbox5.Controls.Add(this.label31); + this.groupbox5.Controls.Add(this.label29); + this.groupbox5.Controls.Add(this.label28); + this.groupbox5.Controls.Add(this.label22); + this.groupbox5.Controls.Add(this.label21); + this.groupbox5.Controls.Add(this.label20); + this.groupbox5.Controls.Add(this.S2Check); + this.groupbox5.Controls.Add(this.label11); + this.groupbox5.Controls.Add(this.S8Check); + this.groupbox5.Controls.Add(this.S9Check); + this.groupbox5.Controls.Add(this.S5Check); + this.groupbox5.Controls.Add(this.RimInchTextBox); + this.groupbox5.Controls.Add(this.S1Check); + this.groupbox5.Controls.Add(this.label15); + this.groupbox5.Controls.Add(this.S7Check); + this.groupbox5.Controls.Add(this.LightWidthTextBox); + this.groupbox5.Controls.Add(this.S4Check); + this.groupbox5.Controls.Add(this.label14); + this.groupbox5.Controls.Add(this.S0Check); + this.groupbox5.Controls.Add(this.SlowDistanceTextBox); + this.groupbox5.Controls.Add(this.S6Check); + this.groupbox5.Controls.Add(this.label13); + this.groupbox5.Controls.Add(this.S3Check); + this.groupbox5.Controls.Add(this.StopDistanceTextBox); + this.groupbox5.Controls.Add(this.label12); + this.groupbox5.Controls.Add(this.TireWeightTextBox); + this.groupbox5.Controls.Add(this.SpecNameLabel); + this.groupbox5.Controls.Add(this.label18); + this.groupbox5.Controls.Add(this.SpecNoLabel); + this.groupbox5.Controls.Add(this.label19); + this.groupbox5.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupbox5.Location = new System.Drawing.Point(1058, 0); + this.groupbox5.Margin = new System.Windows.Forms.Padding(0); + this.groupbox5.Name = "groupbox5"; + this.groupbox5.Size = new System.Drawing.Size(658, 170); + this.groupbox5.TabIndex = 5; + this.groupbox5.TabStop = false; + this.groupbox5.Text = "公共参数"; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(25, 66); + this.label20.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(53, 12); + this.label20.TabIndex = 58; + this.label20.Text = "包边裁切"; + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Location = new System.Drawing.Point(25, 92); + this.label21.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(53, 12); + this.label21.TabIndex = 59; + this.label21.Text = "工位使用"; + // + // label22 + // + this.label22.AutoSize = true; + this.label22.Location = new System.Drawing.Point(25, 118); + this.label22.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(53, 12); + this.label22.TabIndex = 60; + this.label22.Text = "称重校准"; + // + // label28 + // + this.label28.AutoSize = true; + this.label28.Location = new System.Drawing.Point(84, 42); + this.label28.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6); + this.label28.Name = "label28"; + this.label28.Size = new System.Drawing.Size(17, 12); + this.label28.TabIndex = 61; + this.label28.Text = "2#"; + // + // label29 + // + this.label29.AutoSize = true; + this.label29.Location = new System.Drawing.Point(111, 42); + this.label29.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6); + this.label29.Name = "label29"; + this.label29.Size = new System.Drawing.Size(17, 12); + this.label29.TabIndex = 62; + this.label29.Text = "3#"; + // + // label30 + // + this.label30.AutoSize = true; + this.label30.Location = new System.Drawing.Point(165, 42); + this.label30.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(17, 12); + this.label30.TabIndex = 64; + this.label30.Text = "5#"; + // + // label31 + // + this.label31.AutoSize = true; + this.label31.Location = new System.Drawing.Point(138, 42); + this.label31.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6); + this.label31.Name = "label31"; + this.label31.Size = new System.Drawing.Size(17, 12); + this.label31.TabIndex = 63; + this.label31.Text = "4#"; + // // RecipeConfigPage // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -1226,7 +1396,7 @@ namespace HighWayIot.Winform.UserControlPages this.Controls.Add(this.tableLayoutPanel1); this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Name = "RecipeConfigPage"; - this.Size = new System.Drawing.Size(1773, 1036); + this.Size = new System.Drawing.Size(1722, 1066); ((System.ComponentModel.ISupportInitialize)(this.WeightDataGridView)).EndInit(); this.ButtonPanel.ResumeLayout(false); this.ButtonPanel.PerformLayout(); @@ -1247,6 +1417,8 @@ namespace HighWayIot.Winform.UserControlPages this.tableLayoutPanel2.ResumeLayout(false); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); + this.groupbox5.ResumeLayout(false); + this.groupbox5.PerformLayout(); this.ResumeLayout(false); } @@ -1277,7 +1449,6 @@ namespace HighWayIot.Winform.UserControlPages private Button SaveParaButton; private Label NowCopyLabel; private Label label23; - private Button ClearCutBoradButton; private DataGridViewTextBoxColumn Id; private DataGridViewTextBoxColumn MaterialCode; private DataGridViewTextBoxColumn MaterialName; @@ -1332,9 +1503,7 @@ namespace HighWayIot.Winform.UserControlPages private TextBox E3TextBox; private Label label2; private TextBox E2TextBox; - private CheckBox SideCutCheckBox; - private CheckBox WeightCalCheckBox; - private CheckBox PosititonIsUseCheckBox; + private CheckBox S9Check; private Label label11; private TextBox TireWeightTextBox; private Label label12; @@ -1355,5 +1524,22 @@ namespace HighWayIot.Winform.UserControlPages private Label SpecNoLabel; private Button button2; private Button button1; + private CheckBox S8Check; + private CheckBox S5Check; + private CheckBox S1Check; + private CheckBox S7Check; + private CheckBox S4Check; + private CheckBox S6Check; + private CheckBox S3Check; + private GroupBox groupbox5; + private Label label30; + private Label label31; + private Label label29; + private Label label28; + private Label label22; + private Label label21; + private Label label20; + private CheckBox S0Check; + private CheckBox S2Check; } } diff --git a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.cs b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.cs index 6714f65..e82fef5 100644 --- a/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.cs +++ b/HighWayIot.Winform/UserControlPages/RecipeConfigPages/RecipeConfigPage.cs @@ -1,6 +1,7 @@ using HighWayIot.Repository.domain; using HighWayIot.Repository.service; using HighWayIot.Winform.Business; +using HighWayIot.Winform.MainForm; using HighWayIot.Winform.UserControlPages.RecipeConfigPages; using HighWayIot.Winform.UserControlPages.SysConfigPages; using Models; @@ -74,6 +75,11 @@ namespace HighWayIot.Winform.UserControlPages /// private List WeightLists; + /// + /// 现所选配方号 + /// + private string NowRecipeCode; + public RecipeConfigPage() { InitializeComponent(); @@ -89,6 +95,9 @@ namespace HighWayIot.Winform.UserControlPages RecipeDataGridView.DataSource = null; RecipeDataGridView.DataSource = RecipeLists; + + NowRecipeCode = RecipeDataGridView.Rows[0].Cells["RecipeCode"].Value.ToString(); + } /// @@ -114,7 +123,7 @@ namespace HighWayIot.Winform.UserControlPages { int a = RecipeDataGridView.CurrentRow.Index; - string s = RecipeDataGridView.Rows[a].Cells["RecipeCode"].Value.ToString(); + //string s = RecipeDataGridView.Rows[a].Cells["RecipeCode"].Value.ToString(); int id; try { @@ -126,16 +135,16 @@ namespace HighWayIot.Winform.UserControlPages return; } - if (MessageBox.Show($"确定要删除编号为 [{s}] 的配方信息?", "确认", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + if (MessageBox.Show($"确定要删除编号为 [{NowRecipeCode}] 的配方信息?", "确认", MessageBoxButtons.OKCancel) == DialogResult.Cancel) { return; } - if (zxWeightService.GetWeightInfos(s).Count > 0) + if (zxWeightService.GetWeightInfos(NowRecipeCode).Count > 0) { if (MessageBox.Show("是否要删除其关联的所有称量信息?", "确认", MessageBoxButtons.OKCancel) == DialogResult.OK) { - if (zxWeightService.DeleteWeightInfoByRecipeCode(s)) + if (zxWeightService.DeleteWeightInfoByRecipeCode(NowRecipeCode)) { MessageBox.Show("称量信息删除成功"); } @@ -235,12 +244,10 @@ namespace HighWayIot.Winform.UserControlPages MessageBox.Show("请先选择一条配方!"); return; } - int a = RecipeDataGridView.CurrentRow.Index; - string s = RecipeDataGridView.Rows[a].Cells["RecipeCode"].Value.ToString(); - AddWeightForm form = new AddWeightForm(s); + AddWeightForm form = new AddWeightForm(NowRecipeCode); form.ShowDialog(); - WeightLists = zxWeightService.GetWeightInfos(s); + WeightLists = zxWeightService.GetWeightInfos(NowRecipeCode); WeightToDataSource(); @@ -256,8 +263,6 @@ namespace HighWayIot.Winform.UserControlPages private void DeleteWeightButton_Click(object sender, EventArgs e) { int a = WeightDataGridView.CurrentRow.Index; - int b = RecipeDataGridView.CurrentRow.Index; - string s1 = RecipeDataGridView.Rows[b].Cells["RecipeCode"].Value.ToString(); string s2 = WeightDataGridView.Rows[a].Cells["MaterialCode"].Value.ToString(); int id; try @@ -270,7 +275,7 @@ namespace HighWayIot.Winform.UserControlPages return; } - if (MessageBox.Show($"确定要删除配方编号为 [{s1}] 物料编码为 [{s2}] 的称重信息?", "确认", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + if (MessageBox.Show($"确定要删除配方编号为 [{NowRecipeCode}] 物料编码为 [{s2}] 的称重信息?", "确认", MessageBoxButtons.OKCancel) == DialogResult.Cancel) { return; } @@ -284,7 +289,7 @@ namespace HighWayIot.Winform.UserControlPages MessageBox.Show("配方信息删除失败!请检查数据库连接情况"); } - WeightLists = zxWeightService.GetWeightInfos(s1); + WeightLists = zxWeightService.GetWeightInfos(NowRecipeCode); WeightToDataSource(); @@ -301,11 +306,9 @@ namespace HighWayIot.Winform.UserControlPages { DataGridViewRow nowRow = WeightDataGridView.CurrentRow; - int a = RecipeDataGridView.CurrentRow.Index; - string s = RecipeDataGridView.Rows[a].Cells["RecipeCode"].Value.ToString(); - if (MessageBox.Show($"确认要更改配方编号为 [{s}] 物料编号为 [{nowRow.Cells["MaterialCode"].Value.ToString()}] 的数据吗" + if (MessageBox.Show($"确认要更改配方编号为 [{NowRecipeCode}] 物料编号为 [{nowRow.Cells["MaterialCode"].Value.ToString()}] 的数据吗" , "确认" , MessageBoxButtons.OKCancel) == DialogResult.Cancel) @@ -318,7 +321,7 @@ namespace HighWayIot.Winform.UserControlPages try { entity.Id = int.Parse(nowRow.Cells["Id"].Value.ToString().Trim()); - entity.RecipeCode = s; + entity.RecipeCode = NowRecipeCode; entity.MaterialCode = nowRow.Cells["MaterialCode"].Value.ToString().Trim(); entity.SetThickness = decimal.Parse(nowRow.Cells["SetThickness"].Value.ToString().Trim()); entity.SetWidth = decimal.Parse(nowRow.Cells["SetWidth"].Value.ToString().Trim()); @@ -343,7 +346,7 @@ namespace HighWayIot.Winform.UserControlPages MessageBox.Show("称量信息更新失败!"); } - WeightLists = zxWeightService.GetWeightInfos(s); + WeightLists = zxWeightService.GetWeightInfos(NowRecipeCode); WeightToDataSource(); @@ -358,10 +361,9 @@ namespace HighWayIot.Winform.UserControlPages /// private void RefreshWeightButton_Click(object sender, EventArgs e) { - int a = RecipeDataGridView.CurrentRow.Index; - string s = RecipeDataGridView.Rows[a].Cells["RecipeCode"].Value.ToString(); - WeightLists = zxWeightService.GetWeightInfos(s); + + WeightLists = zxWeightService.GetWeightInfos(NowRecipeCode); WeightToDataSource(); @@ -376,29 +378,31 @@ namespace HighWayIot.Winform.UserControlPages /// private void SaveParaButton_Click(object sender, EventArgs e) { - string s = RecipeDataGridView.CurrentRow.Cells["RecipeCode"].Value.ToString(); - //if (MessageBox.Show($"确定要保存配方编号为 [{s}] 的配方的参数?", "确认", MessageBoxButtons.OKCancel) == DialogResult.Cancel) //{ // return; //} - ZxRecipePositionParaEntity entity = GetParaValue(); - - var paraData = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(zxRecipeParaEntity.RecipeCode); + //获取前端的值 + GetParaValue(); + //搜索配方字段 + var paraData = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(NowRecipeCode); int flag = GetSelectIndex(); - + var positionParaData = zxRecipePositionParaService.GetRecipePositionParaInfos(x => x.RecipeCode == NowRecipeCode && x.Position == flag); + //获得对应工位号 + bool isSuccess = false; + //公共参数 //没有就插入 if (paraData.Count == 0) { - if (zxRecipeParaService.InsertRecipeParaInfo(zxRecipeParaEntity)) + if(zxRecipeParaService.InsertRecipeParaInfo(zxRecipeParaEntity)) { - MessageBox.Show("保存成功!"); + isSuccess = true; } else { - MessageBox.Show("保存失败!"); + isSuccess = false; } } //有就更改 @@ -407,18 +411,59 @@ namespace HighWayIot.Winform.UserControlPages zxRecipeParaEntity.Id = paraData[0].Id; if (zxRecipeParaService.UpdateRecipeParaInfo(zxRecipeParaEntity)) { - MessageBox.Show("保存成功!"); + isSuccess = true; } else { - MessageBox.Show("保存失败!"); + isSuccess = false; } } else { - MessageBox.Show("存在多条未删除的相同配方参数!请检查数据库。"); + MessageBox.Show("存在多条未删除的相同公共参数!请检查数据库。"); return; } + + //贴合参数 + //没有就插入 + if (positionParaData.Count == 0) + { + if (zxRecipePositionParaService.InsertRecipePositionParaInfo(zxRecipePositionParaEntity)) + { + isSuccess = true; + } + else + { + isSuccess = false; + } + } + //有就更改 + else if (positionParaData.Count == 1) + { + zxRecipePositionParaEntity.Id = positionParaData[0].Id; + if (zxRecipePositionParaService.UpdateRecipePositionParaInfo(zxRecipePositionParaEntity)) + { + isSuccess = true; + } + else + { + isSuccess = false; + } + } + else + { + MessageBox.Show("存在多条未删除的相同贴合参数!请检查数据库。"); + return; + } + + if (isSuccess) + { + BaseForm.LogRefreshAction.Invoke("保存成功" + DateTime.Now.ToString()); + } + else + { + BaseForm.LogRefreshAction.Invoke("保存失败" + DateTime.Now.ToString()); + } } /// @@ -429,7 +474,7 @@ namespace HighWayIot.Winform.UserControlPages private void CopyParaButton_Click(object sender, EventArgs e) { //zxRecipeParaEntityCut = GetParaValue(); - NowCopyLabel.Text = RecipeDataGridView.CurrentRow.Cells["RecipeCode"].Value.ToString(); + NowCopyLabel.Text = NowRecipeCode; } /// @@ -471,9 +516,9 @@ namespace HighWayIot.Winform.UserControlPages private void RecipeDataGridView_SelectionChanged(object sender, EventArgs e) { int a = RecipeDataGridView.CurrentRow.Index; - string s = RecipeDataGridView.Rows[a].Cells["RecipeCode"].Value.ToString(); + NowRecipeCode = RecipeDataGridView.Rows[a].Cells["RecipeCode"].Value.ToString(); - WeightLists = zxWeightService.GetWeightInfos(s); + WeightLists = zxWeightService.GetWeightInfos(NowRecipeCode); WeightToDataSource(); @@ -481,22 +526,41 @@ namespace HighWayIot.Winform.UserControlPages WeightDataGridView.DataSource = weightDataSourceEntities; //设置参数 - var paraData = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(s); + var paraData = zxRecipeParaService.GetRecipeParaInfoByRecipeCode(NowRecipeCode); + int flag = GetSelectIndex(); + var positionParaData = zxRecipePositionParaService.GetRecipePositionParaInfos(x => x.RecipeCode == NowRecipeCode && x.Position == flag); //没有就全0 if (paraData.Count == 0) { - //SetParaValue(new ZxRecipeParaEntity()); + SetPublicParaValue(new ZxRecipeParaEntity()); } //有就显示 else if (paraData.Count == 1) { - //SetParaValue(paraData[0]); + SetPublicParaValue(paraData[0]); } //有多条设为第一条 else { MessageBox.Show("存在多条未删除的相同配方字段信息!将设置为第一条,请检查数据库。"); - //SetParaValue(paraData[0]); + SetPublicParaValue(paraData[0]); + } + + //没有就全0 + if (positionParaData.Count == 0) + { + SetPrivateParaValue(new ZxRecipePositionParaEntity()); + } + //有就显示 + else if (positionParaData.Count == 1) + { + SetPrivateParaValue(positionParaData[0]); + } + //有多条设为第一条 + else + { + MessageBox.Show("存在多条未删除的相同配方字段信息!将设置为第一条,请检查数据库。"); + SetPrivateParaValue(positionParaData[0]); } } @@ -542,10 +606,10 @@ namespace HighWayIot.Winform.UserControlPages } /// - /// 设置显示的配方字段值 + /// 设置显示的贴合参数字段值 /// /// - private void SetParaValue(ZxRecipePositionParaEntity entity) + private void SetPrivateParaValue(ZxRecipePositionParaEntity entity) { E1TextBox.Text = GeneralUtils.IntEmptyOrToString(entity.E1); E2TextBox.Text = GeneralUtils.IntEmptyOrToString(entity.E2); @@ -557,28 +621,68 @@ namespace HighWayIot.Winform.UserControlPages E8TextBox.Text = GeneralUtils.IntEmptyOrToString(entity.E8); E9TextBox.Text = GeneralUtils.IntEmptyOrToString(entity.E9); E10TextBox.Text = GeneralUtils.IntEmptyOrToString(entity.E10); + + } + + /// + /// 设置公共参数 + /// + /// + private void SetPublicParaValue(ZxRecipeParaEntity paraEntity) + { + S0Check.Checked = paraEntity.S0 ?? false; + S1Check.Checked = paraEntity.S1 ?? false; + S2Check.Checked = paraEntity.S2 ?? false; + S3Check.Checked = paraEntity.S3 ?? false; + S4Check.Checked = paraEntity.S4 ?? false; + S5Check.Checked = paraEntity.S5 ?? false; + S6Check.Checked = paraEntity.S6 ?? false; + S7Check.Checked = paraEntity.S7 ?? false; + S8Check.Checked = paraEntity.S8 ?? false; + S9Check.Checked = paraEntity.S9 ?? false; + + RimInchTextBox.Text = GeneralUtils.IntEmptyOrToString(paraEntity.RimInch); + LightWidthTextBox.Text = GeneralUtils.IntEmptyOrToString(paraEntity.LightWidth); + SlowDistanceTextBox.Text = GeneralUtils.IntEmptyOrToString(paraEntity.SlowDistance); + StopDistanceTextBox.Text = GeneralUtils.IntEmptyOrToString(paraEntity.StopDistance); + TireWeightTextBox.Text = GeneralUtils.IntEmptyOrToString(paraEntity.TireWeight); } /// /// 获取界面上的配方参数 /// /// 获取到的配方参数值 - private ZxRecipePositionParaEntity GetParaValue() + private void GetParaValue() { - ZxRecipePositionParaEntity entity = new ZxRecipePositionParaEntity() - { - E1 = GeneralUtils.StringNullOrToInt(E1TextBox.Text), - E2 = GeneralUtils.StringNullOrToInt(E2TextBox.Text), - E3 = GeneralUtils.StringNullOrToInt(E3TextBox.Text), - E4 = GeneralUtils.StringNullOrToInt(E4TextBox.Text), - E5 = GeneralUtils.StringNullOrToInt(E5TextBox.Text), - E6 = GeneralUtils.StringNullOrToInt(E6TextBox.Text), - E7 = GeneralUtils.StringNullOrToInt(E7TextBox.Text), - E8 = GeneralUtils.StringNullOrToInt(E8TextBox.Text), - E9 = GeneralUtils.StringNullOrToInt(E9TextBox.Text), - E10 = GeneralUtils.StringNullOrToInt(E10TextBox.Text) - }; - return entity; + zxRecipePositionParaEntity.E1 = GeneralUtils.StringNullOrToInt(E1TextBox.Text); + zxRecipePositionParaEntity.E2 = GeneralUtils.StringNullOrToInt(E2TextBox.Text); + zxRecipePositionParaEntity.E3 = GeneralUtils.StringNullOrToInt(E3TextBox.Text); + zxRecipePositionParaEntity.E4 = GeneralUtils.StringNullOrToInt(E4TextBox.Text); + zxRecipePositionParaEntity.E5 = GeneralUtils.StringNullOrToInt(E5TextBox.Text); + zxRecipePositionParaEntity.E6 = GeneralUtils.StringNullOrToInt(E6TextBox.Text); + zxRecipePositionParaEntity.E7 = GeneralUtils.StringNullOrToInt(E7TextBox.Text); + zxRecipePositionParaEntity.E8 = GeneralUtils.StringNullOrToInt(E8TextBox.Text); + zxRecipePositionParaEntity.E9 = GeneralUtils.StringNullOrToInt(E9TextBox.Text); + zxRecipePositionParaEntity.E10 = GeneralUtils.StringNullOrToInt(E10TextBox.Text); + zxRecipePositionParaEntity.Position = GetSelectIndex(); + zxRecipePositionParaEntity.RecipeCode = NowRecipeCode; + + zxRecipeParaEntity.S0 = S0Check.Checked; + zxRecipeParaEntity.S1 = S1Check.Checked; + zxRecipeParaEntity.S2 = S2Check.Checked; + zxRecipeParaEntity.S3 = S3Check.Checked; + zxRecipeParaEntity.S4 = S4Check.Checked; + zxRecipeParaEntity.S5 = S5Check.Checked; + zxRecipeParaEntity.S6 = S6Check.Checked; + zxRecipeParaEntity.S7 = S7Check.Checked; + zxRecipeParaEntity.S8 = S8Check.Checked; + zxRecipeParaEntity.S9 = S9Check.Checked; + zxRecipeParaEntity.RimInch = GeneralUtils.StringNullOrToInt(RimInchTextBox.Text); + zxRecipeParaEntity.LightWidth = GeneralUtils.StringNullOrToInt(LightWidthTextBox.Text); + zxRecipeParaEntity.SlowDistance = GeneralUtils.StringNullOrToInt(SlowDistanceTextBox.Text); + zxRecipeParaEntity.StopDistance = GeneralUtils.StringNullOrToInt(StopDistanceTextBox.Text); + zxRecipeParaEntity.TireWeight = GeneralUtils.StringNullOrToInt(TireWeightTextBox.Text); + zxRecipeParaEntity.RecipeCode = NowRecipeCode; } /// @@ -593,46 +697,34 @@ namespace HighWayIot.Winform.UserControlPages if (s.Checked) { int flag = GetSelectIndex(); - switch (flag) + + SetParaView(flag); + if(flag < 10) { - case 1: - SetParaViewById(zxRecipeParaEntity.P1); - break; - case 2: - SetParaViewById(zxRecipeParaEntity.P2); - break; - case 31: - SetParaViewById(zxRecipeParaEntity.P31); - break; - case 32: - SetParaViewById(zxRecipeParaEntity.P32); - break; - case 41: - SetParaViewById(zxRecipeParaEntity.P41); - break; - case 42: - SetParaViewById(zxRecipeParaEntity.P42); - break; - case 51: - SetParaViewById(zxRecipeParaEntity.P51); - break; - case 52: - SetParaViewById(zxRecipeParaEntity.P52); - break; - case 0: - SetParaViewById(0); - break; - default: - SetParaViewById(0); - break; + BodyRadioButton.Enabled = false; + SideRadioButton.Enabled = false; + } + else + { + BodyRadioButton.Enabled = true; + SideRadioButton.Enabled = true; } } } - private void SetParaViewById(int? id) + /// + /// 读取数据库设置贴合参数字段 + /// + /// + /// + private void SetParaView(int flag) { - zxRecipePositionParaEntity = zxRecipePositionParaService.GetRecipePositionParaInfoById(id ?? 0); - SetParaValue(zxRecipePositionParaEntity); + zxRecipePositionParaEntity = zxRecipePositionParaService.GetRecipePositionParaInfos(x => x.Position == flag && x.RecipeCode == NowRecipeCode).FirstOrDefault(); + if (zxRecipePositionParaEntity == null) + { + zxRecipePositionParaEntity = new ZxRecipePositionParaEntity(); + } + SetPrivateParaValue(zxRecipePositionParaEntity); } ///