diff --git a/JY.Inspection/Config/Configure.ini b/JY.Inspection/Config/Configure.ini index fd73962..c79c3bb 100644 --- a/JY.Inspection/Config/Configure.ini +++ b/JY.Inspection/Config/Configure.ini @@ -22,6 +22,7 @@ GradingMesUrl=http://10.22.167.141/core/api/public/eve/pm/eqm/new/grading ResultProcessMesUrl=http://10.22.167.2/core/api/public/product/process/param/new/result StationArrivalUrl=http://10.22.167.2/core/api/public/formation/section/arrival/bz StationExitUrl=http://10.22.167.2/core/api/public/eve/pm/formation-section/bz +LoginMesUrl=http://127.0.0.1/ NGMessage=²»·ÖÀà,ÕýÃæ(2D/3D),·´Ãæ(2D/3D),×ó²àÃæ(2D/3D),ÓҲàÃæ(2D/3D),¶¥Ãæ(2D/3D),µ×Ãæ(2D/3D),µ×WE2,µ×WE2,µ×WE3,µ×WE4,ÖÐME1,ÖÐME2,ÖÐME3,ÖÐME1,¼«Öù(POS/NEG),·À±¬·§(PRO),ɨÂëNG,·ֵµNG,ÆäËû CCDResultMessage=²»·ÖÀà,NG,OK Grading1=K77 diff --git a/JY.Inspection/Frm/FormMesDataSet.cs b/JY.Inspection/Frm/FormMesDataSet.cs index 6675e8d..6d37df9 100644 --- a/JY.Inspection/Frm/FormMesDataSet.cs +++ b/JY.Inspection/Frm/FormMesDataSet.cs @@ -35,6 +35,7 @@ namespace JY.Inspection.Frm tb_productType.DataBindings.Add(new Binding("Text", bindingSource1, "ProductType", true, DataSourceUpdateMode.OnPropertyChanged)); tb_StationArrival.DataBindings.Add(new Binding("Text", bindingSource1, "StationArrivalUrl", true, DataSourceUpdateMode.OnPropertyChanged)); tb_stationExit.DataBindings.Add(new Binding("Text", bindingSource1, "StationExitUrl", true, DataSourceUpdateMode.OnPropertyChanged)); + tb_loginMes.DataBindings.Add(new Binding("Text", bindingSource1, "LoginMesUrl", true, DataSourceUpdateMode.OnPropertyChanged)); } #endregion @@ -56,6 +57,7 @@ namespace JY.Inspection.Frm txtResultProcessMesUrl.Text = IniFileHelper.ReadIniData("MES配置", "ResultProcessMesUrl"); _viewModel.StationArrivalUrl = IniFileHelper.ReadIniData("MES配置", "StationArrivalUrl"); _viewModel.StationExitUrl = IniFileHelper.ReadIniData("MES配置", "StationExitUrl"); + _viewModel.LoginMesUrl = IniFileHelper.ReadIniData("MES配置", "LoginMesUrl"); LoginTime.Text = IniFileHelper.ReadIniData("MES配置", "LoginTime"); txtMesRequestTime.Text = IniFileHelper.ReadIniData("MES配置", "MesRequestTime"); @@ -81,6 +83,7 @@ namespace JY.Inspection.Frm IniFileHelper.WriteIniData("MES配置", "ResultProcessMesUrl", txtResultProcessMesUrl.Text.Trim()); IniFileHelper.WriteIniData("MES配置", "StationArrivalUrl", _viewModel.StationArrivalUrl.Trim()); IniFileHelper.WriteIniData("MES配置", "StationExitUrl", _viewModel.StationExitUrl.Trim()); + IniFileHelper.WriteIniData("MES配置", "LoginMesUrl", _viewModel.LoginMesUrl.Trim()); IniFileHelper.WriteIniData("MES配置", "LoginTime", LoginTime.Text.Trim()); LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置权限超时时间[{LoginTime.Text.Trim()}]", LogAddtype.local, Logtype.Warning); diff --git a/JY.Inspection/Frm/FormMesDataSet.designer.cs b/JY.Inspection/Frm/FormMesDataSet.designer.cs index 0fc93d0..9374c18 100644 --- a/JY.Inspection/Frm/FormMesDataSet.designer.cs +++ b/JY.Inspection/Frm/FormMesDataSet.designer.cs @@ -47,28 +47,30 @@ namespace JY.Inspection.Frm this.txtResultProcessMesUrl = new MetroFramework.Controls.MetroTextBox(); this.metroLabel6 = new MetroFramework.Controls.MetroLabel(); this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.linkLabel_editCollectItemCfg = new System.Windows.Forms.LinkLabel(); - this.metroLabel21 = new MetroFramework.Controls.MetroLabel(); - this.LoginTime = new System.Windows.Forms.NumericUpDown(); - this.metroLabel22 = new MetroFramework.Controls.MetroLabel(); - this.metroLabel18 = new MetroFramework.Controls.MetroLabel(); - this.txtMesRequestTime = new System.Windows.Forms.NumericUpDown(); - this.metroLabel20 = new MetroFramework.Controls.MetroLabel(); - this.chkIsMesUP = new System.Windows.Forms.CheckBox(); - this.metroLabel7 = new MetroFramework.Controls.MetroLabel(); - this.tb_productType = new MetroFramework.Controls.MetroTextBox(); this.metroPanel_top = new MetroFramework.Controls.MetroPanel(); + this.tb_productType = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel18 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel21 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel7 = new MetroFramework.Controls.MetroLabel(); + this.LoginTime = new System.Windows.Forms.NumericUpDown(); + this.txtMesRequestTime = new System.Windows.Forms.NumericUpDown(); + this.metroLabel22 = new MetroFramework.Controls.MetroLabel(); + this.metroLabel20 = new MetroFramework.Controls.MetroLabel(); this.metroPanel_mid = new MetroFramework.Controls.MetroPanel(); - this.metroPanel_bottom = new MetroFramework.Controls.MetroPanel(); - this.metroLabel8 = new MetroFramework.Controls.MetroLabel(); - this.tb_StationArrival = new MetroFramework.Controls.MetroTextBox(); - this.metroLabel9 = new MetroFramework.Controls.MetroLabel(); this.tb_stationExit = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel9 = new MetroFramework.Controls.MetroLabel(); + this.tb_StationArrival = new MetroFramework.Controls.MetroTextBox(); + this.metroLabel8 = new MetroFramework.Controls.MetroLabel(); + this.metroPanel_bottom = new MetroFramework.Controls.MetroPanel(); + this.linkLabel_editCollectItemCfg = new System.Windows.Forms.LinkLabel(); + this.chkIsMesUP = new System.Windows.Forms.CheckBox(); this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.metroLabel10 = new MetroFramework.Controls.MetroLabel(); + this.tb_loginMes = new MetroFramework.Controls.MetroTextBox(); this.groupBox1.SuspendLayout(); + this.metroPanel_top.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.LoginTime)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txtMesRequestTime)).BeginInit(); - this.metroPanel_top.SuspendLayout(); this.metroPanel_mid.SuspendLayout(); this.metroPanel_bottom.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -99,9 +101,9 @@ namespace JY.Inspection.Frm // // this.txtlineCode.CustomButton.Image = null; - this.txtlineCode.CustomButton.Location = new System.Drawing.Point(123, 1); + this.txtlineCode.CustomButton.Location = new System.Drawing.Point(164, 1); this.txtlineCode.CustomButton.Name = ""; - this.txtlineCode.CustomButton.Size = new System.Drawing.Size(16, 17); + this.txtlineCode.CustomButton.Size = new System.Drawing.Size(21, 21); this.txtlineCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; this.txtlineCode.CustomButton.TabIndex = 1; this.txtlineCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; @@ -148,9 +150,9 @@ namespace JY.Inspection.Frm // // this.txtequipCode.CustomButton.Image = null; - this.txtequipCode.CustomButton.Location = new System.Drawing.Point(123, 1); + this.txtequipCode.CustomButton.Location = new System.Drawing.Point(164, 1); this.txtequipCode.CustomButton.Name = ""; - this.txtequipCode.CustomButton.Size = new System.Drawing.Size(16, 17); + this.txtequipCode.CustomButton.Size = new System.Drawing.Size(21, 21); this.txtequipCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; this.txtequipCode.CustomButton.TabIndex = 1; this.txtequipCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; @@ -178,9 +180,9 @@ namespace JY.Inspection.Frm // // this.txtsiteCode.CustomButton.Image = null; - this.txtsiteCode.CustomButton.Location = new System.Drawing.Point(123, 1); + this.txtsiteCode.CustomButton.Location = new System.Drawing.Point(164, 1); this.txtsiteCode.CustomButton.Name = ""; - this.txtsiteCode.CustomButton.Size = new System.Drawing.Size(16, 17); + this.txtsiteCode.CustomButton.Size = new System.Drawing.Size(21, 21); this.txtsiteCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; this.txtsiteCode.CustomButton.TabIndex = 1; this.txtsiteCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; @@ -227,9 +229,9 @@ namespace JY.Inspection.Frm // // this.txtmaterialCode.CustomButton.Image = null; - this.txtmaterialCode.CustomButton.Location = new System.Drawing.Point(123, 1); + this.txtmaterialCode.CustomButton.Location = new System.Drawing.Point(164, 1); this.txtmaterialCode.CustomButton.Name = ""; - this.txtmaterialCode.CustomButton.Size = new System.Drawing.Size(16, 17); + this.txtmaterialCode.CustomButton.Size = new System.Drawing.Size(21, 21); this.txtmaterialCode.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; this.txtmaterialCode.CustomButton.TabIndex = 1; this.txtmaterialCode.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; @@ -266,16 +268,16 @@ namespace JY.Inspection.Frm // // this.txtGradingMesUrl.CustomButton.Image = null; - this.txtGradingMesUrl.CustomButton.Location = new System.Drawing.Point(376, 1); + this.txtGradingMesUrl.CustomButton.Location = new System.Drawing.Point(502, 1); this.txtGradingMesUrl.CustomButton.Name = ""; - this.txtGradingMesUrl.CustomButton.Size = new System.Drawing.Size(16, 17); + this.txtGradingMesUrl.CustomButton.Size = new System.Drawing.Size(21, 21); this.txtGradingMesUrl.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; this.txtGradingMesUrl.CustomButton.TabIndex = 1; this.txtGradingMesUrl.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; this.txtGradingMesUrl.CustomButton.UseSelectable = true; this.txtGradingMesUrl.CustomButton.Visible = false; this.txtGradingMesUrl.Lines = new string[0]; - this.txtGradingMesUrl.Location = new System.Drawing.Point(176, 177); + this.txtGradingMesUrl.Location = new System.Drawing.Point(176, 6); this.txtGradingMesUrl.MaxLength = 32767; this.txtGradingMesUrl.Name = "txtGradingMesUrl"; this.txtGradingMesUrl.PasswordChar = '\0'; @@ -293,7 +295,7 @@ namespace JY.Inspection.Frm // metroLabel5 // this.metroLabel5.AutoSize = true; - this.metroLabel5.Location = new System.Drawing.Point(29, 177); + this.metroLabel5.Location = new System.Drawing.Point(31, 6); this.metroLabel5.Name = "metroLabel5"; this.metroLabel5.Size = new System.Drawing.Size(135, 19); this.metroLabel5.TabIndex = 32; @@ -305,16 +307,16 @@ namespace JY.Inspection.Frm // // this.txtResultProcessMesUrl.CustomButton.Image = null; - this.txtResultProcessMesUrl.CustomButton.Location = new System.Drawing.Point(376, 1); + this.txtResultProcessMesUrl.CustomButton.Location = new System.Drawing.Point(502, 1); this.txtResultProcessMesUrl.CustomButton.Name = ""; - this.txtResultProcessMesUrl.CustomButton.Size = new System.Drawing.Size(16, 17); + this.txtResultProcessMesUrl.CustomButton.Size = new System.Drawing.Size(21, 21); this.txtResultProcessMesUrl.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; this.txtResultProcessMesUrl.CustomButton.TabIndex = 1; this.txtResultProcessMesUrl.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; this.txtResultProcessMesUrl.CustomButton.UseSelectable = true; this.txtResultProcessMesUrl.CustomButton.Visible = false; this.txtResultProcessMesUrl.Lines = new string[0]; - this.txtResultProcessMesUrl.Location = new System.Drawing.Point(176, 214); + this.txtResultProcessMesUrl.Location = new System.Drawing.Point(176, 40); this.txtResultProcessMesUrl.MaxLength = 32767; this.txtResultProcessMesUrl.Name = "txtResultProcessMesUrl"; this.txtResultProcessMesUrl.PasswordChar = '\0'; @@ -332,7 +334,7 @@ namespace JY.Inspection.Frm // metroLabel6 // this.metroLabel6.AutoSize = true; - this.metroLabel6.Location = new System.Drawing.Point(3, 214); + this.metroLabel6.Location = new System.Drawing.Point(7, 44); this.metroLabel6.Name = "metroLabel6"; this.metroLabel6.Size = new System.Drawing.Size(163, 19); this.metroLabel6.TabIndex = 34; @@ -340,8 +342,8 @@ namespace JY.Inspection.Frm // // groupBox1 // - this.groupBox1.Controls.Add(this.metroPanel_top); this.groupBox1.Controls.Add(this.metroPanel_mid); + this.groupBox1.Controls.Add(this.metroPanel_top); this.groupBox1.Controls.Add(this.metroPanel_bottom); this.groupBox1.Location = new System.Drawing.Point(23, 63); this.groupBox1.Name = "groupBox1"; @@ -350,154 +352,6 @@ namespace JY.Inspection.Frm this.groupBox1.TabStop = false; this.groupBox1.Text = "MES配置"; // - // linkLabel_editCollectItemCfg - // - this.linkLabel_editCollectItemCfg.AutoSize = true; - this.linkLabel_editCollectItemCfg.Location = new System.Drawing.Point(482, 7); - this.linkLabel_editCollectItemCfg.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.linkLabel_editCollectItemCfg.Name = "linkLabel_editCollectItemCfg"; - this.linkLabel_editCollectItemCfg.Size = new System.Drawing.Size(101, 12); - this.linkLabel_editCollectItemCfg.TabIndex = 182; - this.linkLabel_editCollectItemCfg.TabStop = true; - this.linkLabel_editCollectItemCfg.Text = "配置采集项参照表"; - this.linkLabel_editCollectItemCfg.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel_editCollectItemCfg_LinkClicked); - // - // metroLabel21 - // - this.metroLabel21.AutoSize = true; - this.metroLabel21.Location = new System.Drawing.Point(573, 127); - this.metroLabel21.Name = "metroLabel21"; - this.metroLabel21.Size = new System.Drawing.Size(31, 19); - this.metroLabel21.TabIndex = 180; - this.metroLabel21.Text = "min"; - this.metroLabel21.Visible = false; - // - // LoginTime - // - this.LoginTime.Location = new System.Drawing.Point(491, 127); - this.LoginTime.Maximum = new decimal(new int[] { - 1000, - 0, - 0, - 0}); - this.LoginTime.Name = "LoginTime"; - this.LoginTime.Size = new System.Drawing.Size(76, 21); - this.LoginTime.TabIndex = 179; - this.LoginTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.LoginTime.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.LoginTime.Visible = false; - // - // metroLabel22 - // - this.metroLabel22.AutoSize = true; - this.metroLabel22.Location = new System.Drawing.Point(378, 127); - this.metroLabel22.Name = "metroLabel22"; - this.metroLabel22.Size = new System.Drawing.Size(107, 19); - this.metroLabel22.TabIndex = 176; - this.metroLabel22.Text = "权限登录时长:"; - this.metroLabel22.Visible = false; - // - // metroLabel18 - // - this.metroLabel18.AutoSize = true; - this.metroLabel18.Location = new System.Drawing.Point(573, 53); - this.metroLabel18.Name = "metroLabel18"; - this.metroLabel18.Size = new System.Drawing.Size(14, 19); - this.metroLabel18.TabIndex = 97; - this.metroLabel18.Text = "s"; - // - // txtMesRequestTime - // - this.txtMesRequestTime.DecimalPlaces = 1; - this.txtMesRequestTime.Increment = new decimal(new int[] { - 5, - 0, - 0, - 65536}); - this.txtMesRequestTime.Location = new System.Drawing.Point(491, 53); - this.txtMesRequestTime.Maximum = new decimal(new int[] { - 1000, - 0, - 0, - 0}); - this.txtMesRequestTime.Minimum = new decimal(new int[] { - 5, - 0, - 0, - 65536}); - this.txtMesRequestTime.Name = "txtMesRequestTime"; - this.txtMesRequestTime.Size = new System.Drawing.Size(76, 21); - this.txtMesRequestTime.TabIndex = 96; - this.txtMesRequestTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.txtMesRequestTime.Value = new decimal(new int[] { - 5, - 0, - 0, - 65536}); - // - // metroLabel20 - // - this.metroLabel20.AutoSize = true; - this.metroLabel20.Location = new System.Drawing.Point(352, 53); - this.metroLabel20.Name = "metroLabel20"; - this.metroLabel20.Size = new System.Drawing.Size(133, 19); - this.metroLabel20.TabIndex = 49; - this.metroLabel20.Text = "请求MES超时时长:"; - // - // chkIsMesUP - // - this.chkIsMesUP.AutoSize = true; - this.chkIsMesUP.Enabled = false; - this.chkIsMesUP.Location = new System.Drawing.Point(279, 6); - this.chkIsMesUP.Name = "chkIsMesUP"; - this.chkIsMesUP.Size = new System.Drawing.Size(90, 16); - this.chkIsMesUP.TabIndex = 36; - this.chkIsMesUP.Text = "开启MES模式"; - this.chkIsMesUP.UseVisualStyleBackColor = true; - // - // metroLabel7 - // - this.metroLabel7.AutoSize = true; - this.metroLabel7.Location = new System.Drawing.Point(406, 15); - this.metroLabel7.Name = "metroLabel7"; - this.metroLabel7.Size = new System.Drawing.Size(79, 19); - this.metroLabel7.TabIndex = 183; - this.metroLabel7.Text = "产品类型:"; - // - // tb_productType - // - // - // - // - this.tb_productType.CustomButton.Image = null; - this.tb_productType.CustomButton.Location = new System.Drawing.Point(164, 1); - this.tb_productType.CustomButton.Name = ""; - this.tb_productType.CustomButton.Size = new System.Drawing.Size(21, 21); - this.tb_productType.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; - this.tb_productType.CustomButton.TabIndex = 1; - this.tb_productType.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; - this.tb_productType.CustomButton.UseSelectable = true; - this.tb_productType.CustomButton.Visible = false; - this.tb_productType.Lines = new string[0]; - this.tb_productType.Location = new System.Drawing.Point(491, 15); - this.tb_productType.MaxLength = 32767; - this.tb_productType.Name = "tb_productType"; - this.tb_productType.PasswordChar = '\0'; - this.tb_productType.ScrollBars = System.Windows.Forms.ScrollBars.None; - this.tb_productType.SelectedText = ""; - this.tb_productType.SelectionLength = 0; - this.tb_productType.SelectionStart = 0; - this.tb_productType.ShortcutsEnabled = true; - this.tb_productType.Size = new System.Drawing.Size(186, 23); - this.tb_productType.TabIndex = 184; - this.tb_productType.UseSelectable = true; - this.tb_productType.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); - this.tb_productType.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); - // // metroPanel_top // this.metroPanel_top.Controls.Add(this.tb_productType); @@ -528,8 +382,135 @@ namespace JY.Inspection.Frm this.metroPanel_top.VerticalScrollbarHighlightOnWheel = false; this.metroPanel_top.VerticalScrollbarSize = 10; // + // tb_productType + // + // + // + // + this.tb_productType.CustomButton.Image = null; + this.tb_productType.CustomButton.Location = new System.Drawing.Point(164, 1); + this.tb_productType.CustomButton.Name = ""; + this.tb_productType.CustomButton.Size = new System.Drawing.Size(21, 21); + this.tb_productType.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.tb_productType.CustomButton.TabIndex = 1; + this.tb_productType.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.tb_productType.CustomButton.UseSelectable = true; + this.tb_productType.CustomButton.Visible = false; + this.tb_productType.Lines = new string[0]; + this.tb_productType.Location = new System.Drawing.Point(491, 15); + this.tb_productType.MaxLength = 32767; + this.tb_productType.Name = "tb_productType"; + this.tb_productType.PasswordChar = '\0'; + this.tb_productType.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.tb_productType.SelectedText = ""; + this.tb_productType.SelectionLength = 0; + this.tb_productType.SelectionStart = 0; + this.tb_productType.ShortcutsEnabled = true; + this.tb_productType.Size = new System.Drawing.Size(186, 23); + this.tb_productType.TabIndex = 184; + this.tb_productType.UseSelectable = true; + this.tb_productType.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.tb_productType.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel18 + // + this.metroLabel18.AutoSize = true; + this.metroLabel18.Location = new System.Drawing.Point(573, 53); + this.metroLabel18.Name = "metroLabel18"; + this.metroLabel18.Size = new System.Drawing.Size(14, 19); + this.metroLabel18.TabIndex = 97; + this.metroLabel18.Text = "s"; + // + // metroLabel21 + // + this.metroLabel21.AutoSize = true; + this.metroLabel21.Location = new System.Drawing.Point(573, 127); + this.metroLabel21.Name = "metroLabel21"; + this.metroLabel21.Size = new System.Drawing.Size(31, 19); + this.metroLabel21.TabIndex = 180; + this.metroLabel21.Text = "min"; + this.metroLabel21.Visible = false; + // + // metroLabel7 + // + this.metroLabel7.AutoSize = true; + this.metroLabel7.Location = new System.Drawing.Point(406, 15); + this.metroLabel7.Name = "metroLabel7"; + this.metroLabel7.Size = new System.Drawing.Size(79, 19); + this.metroLabel7.TabIndex = 183; + this.metroLabel7.Text = "产品类型:"; + // + // LoginTime + // + this.LoginTime.Location = new System.Drawing.Point(491, 127); + this.LoginTime.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.LoginTime.Name = "LoginTime"; + this.LoginTime.Size = new System.Drawing.Size(76, 21); + this.LoginTime.TabIndex = 179; + this.LoginTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.LoginTime.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.LoginTime.Visible = false; + // + // txtMesRequestTime + // + this.txtMesRequestTime.DecimalPlaces = 1; + this.txtMesRequestTime.Increment = new decimal(new int[] { + 5, + 0, + 0, + 65536}); + this.txtMesRequestTime.Location = new System.Drawing.Point(491, 53); + this.txtMesRequestTime.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.txtMesRequestTime.Minimum = new decimal(new int[] { + 5, + 0, + 0, + 65536}); + this.txtMesRequestTime.Name = "txtMesRequestTime"; + this.txtMesRequestTime.Size = new System.Drawing.Size(76, 21); + this.txtMesRequestTime.TabIndex = 96; + this.txtMesRequestTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtMesRequestTime.Value = new decimal(new int[] { + 5, + 0, + 0, + 65536}); + // + // metroLabel22 + // + this.metroLabel22.AutoSize = true; + this.metroLabel22.Location = new System.Drawing.Point(378, 127); + this.metroLabel22.Name = "metroLabel22"; + this.metroLabel22.Size = new System.Drawing.Size(107, 19); + this.metroLabel22.TabIndex = 176; + this.metroLabel22.Text = "权限登录时长:"; + this.metroLabel22.Visible = false; + // + // metroLabel20 + // + this.metroLabel20.AutoSize = true; + this.metroLabel20.Location = new System.Drawing.Point(352, 53); + this.metroLabel20.Name = "metroLabel20"; + this.metroLabel20.Size = new System.Drawing.Size(133, 19); + this.metroLabel20.TabIndex = 49; + this.metroLabel20.Text = "请求MES超时时长:"; + // // metroPanel_mid // + this.metroPanel_mid.Controls.Add(this.tb_loginMes); + this.metroPanel_mid.Controls.Add(this.metroLabel10); this.metroPanel_mid.Controls.Add(this.tb_stationExit); this.metroPanel_mid.Controls.Add(this.metroLabel9); this.metroPanel_mid.Controls.Add(this.tb_StationArrival); @@ -542,14 +523,93 @@ namespace JY.Inspection.Frm this.metroPanel_mid.HorizontalScrollbarBarColor = true; this.metroPanel_mid.HorizontalScrollbarHighlightOnWheel = false; this.metroPanel_mid.HorizontalScrollbarSize = 10; - this.metroPanel_mid.Location = new System.Drawing.Point(3, 17); + this.metroPanel_mid.Location = new System.Drawing.Point(3, 180); this.metroPanel_mid.Name = "metroPanel_mid"; - this.metroPanel_mid.Size = new System.Drawing.Size(713, 379); + this.metroPanel_mid.Size = new System.Drawing.Size(713, 216); this.metroPanel_mid.TabIndex = 186; + this.metroPanel_mid.VerticalScrollbar = true; this.metroPanel_mid.VerticalScrollbarBarColor = true; this.metroPanel_mid.VerticalScrollbarHighlightOnWheel = false; this.metroPanel_mid.VerticalScrollbarSize = 10; // + // tb_stationExit + // + // + // + // + this.tb_stationExit.CustomButton.Image = null; + this.tb_stationExit.CustomButton.Location = new System.Drawing.Point(502, 1); + this.tb_stationExit.CustomButton.Name = ""; + this.tb_stationExit.CustomButton.Size = new System.Drawing.Size(21, 21); + this.tb_stationExit.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.tb_stationExit.CustomButton.TabIndex = 1; + this.tb_stationExit.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.tb_stationExit.CustomButton.UseSelectable = true; + this.tb_stationExit.CustomButton.Visible = false; + this.tb_stationExit.Lines = new string[0]; + this.tb_stationExit.Location = new System.Drawing.Point(176, 110); + this.tb_stationExit.MaxLength = 32767; + this.tb_stationExit.Name = "tb_stationExit"; + this.tb_stationExit.PasswordChar = '\0'; + this.tb_stationExit.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.tb_stationExit.SelectedText = ""; + this.tb_stationExit.SelectionLength = 0; + this.tb_stationExit.SelectionStart = 0; + this.tb_stationExit.ShortcutsEnabled = true; + this.tb_stationExit.Size = new System.Drawing.Size(524, 23); + this.tb_stationExit.TabIndex = 39; + this.tb_stationExit.UseSelectable = true; + this.tb_stationExit.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.tb_stationExit.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel9 + // + this.metroLabel9.AutoSize = true; + this.metroLabel9.Location = new System.Drawing.Point(31, 110); + this.metroLabel9.Name = "metroLabel9"; + this.metroLabel9.Size = new System.Drawing.Size(135, 19); + this.metroLabel9.TabIndex = 38; + this.metroLabel9.Text = "产品出站接口地址:"; + // + // tb_StationArrival + // + // + // + // + this.tb_StationArrival.CustomButton.Image = null; + this.tb_StationArrival.CustomButton.Location = new System.Drawing.Point(502, 1); + this.tb_StationArrival.CustomButton.Name = ""; + this.tb_StationArrival.CustomButton.Size = new System.Drawing.Size(21, 21); + this.tb_StationArrival.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.tb_StationArrival.CustomButton.TabIndex = 1; + this.tb_StationArrival.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.tb_StationArrival.CustomButton.UseSelectable = true; + this.tb_StationArrival.CustomButton.Visible = false; + this.tb_StationArrival.Lines = new string[0]; + this.tb_StationArrival.Location = new System.Drawing.Point(176, 77); + this.tb_StationArrival.MaxLength = 32767; + this.tb_StationArrival.Name = "tb_StationArrival"; + this.tb_StationArrival.PasswordChar = '\0'; + this.tb_StationArrival.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.tb_StationArrival.SelectedText = ""; + this.tb_StationArrival.SelectionLength = 0; + this.tb_StationArrival.SelectionStart = 0; + this.tb_StationArrival.ShortcutsEnabled = true; + this.tb_StationArrival.Size = new System.Drawing.Size(524, 23); + this.tb_StationArrival.TabIndex = 37; + this.tb_StationArrival.UseSelectable = true; + this.tb_StationArrival.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.tb_StationArrival.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // metroLabel8 + // + this.metroLabel8.AutoSize = true; + this.metroLabel8.Location = new System.Drawing.Point(33, 77); + this.metroLabel8.Name = "metroLabel8"; + this.metroLabel8.Size = new System.Drawing.Size(135, 19); + this.metroLabel8.TabIndex = 36; + this.metroLabel8.Text = "产品进站接口地址:"; + // // metroPanel_bottom // this.metroPanel_bottom.Controls.Add(this.linkLabel_editCollectItemCfg); @@ -569,83 +629,67 @@ namespace JY.Inspection.Frm this.metroPanel_bottom.VerticalScrollbarHighlightOnWheel = false; this.metroPanel_bottom.VerticalScrollbarSize = 10; // - // metroLabel8 + // linkLabel_editCollectItemCfg // - this.metroLabel8.AutoSize = true; - this.metroLabel8.Location = new System.Drawing.Point(29, 250); - this.metroLabel8.Name = "metroLabel8"; - this.metroLabel8.Size = new System.Drawing.Size(135, 19); - this.metroLabel8.TabIndex = 36; - this.metroLabel8.Text = "产品进站接口地址:"; + this.linkLabel_editCollectItemCfg.AutoSize = true; + this.linkLabel_editCollectItemCfg.Location = new System.Drawing.Point(482, 7); + this.linkLabel_editCollectItemCfg.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.linkLabel_editCollectItemCfg.Name = "linkLabel_editCollectItemCfg"; + this.linkLabel_editCollectItemCfg.Size = new System.Drawing.Size(101, 12); + this.linkLabel_editCollectItemCfg.TabIndex = 182; + this.linkLabel_editCollectItemCfg.TabStop = true; + this.linkLabel_editCollectItemCfg.Text = "配置采集项参照表"; + this.linkLabel_editCollectItemCfg.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel_editCollectItemCfg_LinkClicked); // - // tb_StationArrival + // chkIsMesUP + // + this.chkIsMesUP.AutoSize = true; + this.chkIsMesUP.Enabled = false; + this.chkIsMesUP.Location = new System.Drawing.Point(279, 6); + this.chkIsMesUP.Name = "chkIsMesUP"; + this.chkIsMesUP.Size = new System.Drawing.Size(90, 16); + this.chkIsMesUP.TabIndex = 36; + this.chkIsMesUP.Text = "开启MES模式"; + this.chkIsMesUP.UseVisualStyleBackColor = true; + // + // metroLabel10 + // + this.metroLabel10.AutoSize = true; + this.metroLabel10.Location = new System.Drawing.Point(31, 145); + this.metroLabel10.Name = "metroLabel10"; + this.metroLabel10.Size = new System.Drawing.Size(135, 19); + this.metroLabel10.TabIndex = 40; + this.metroLabel10.Text = "员工登录接口地址:"; + // + // tb_loginMes // // // // - this.tb_StationArrival.CustomButton.Image = null; - this.tb_StationArrival.CustomButton.Location = new System.Drawing.Point(502, 1); - this.tb_StationArrival.CustomButton.Name = ""; - this.tb_StationArrival.CustomButton.Size = new System.Drawing.Size(21, 21); - this.tb_StationArrival.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; - this.tb_StationArrival.CustomButton.TabIndex = 1; - this.tb_StationArrival.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; - this.tb_StationArrival.CustomButton.UseSelectable = true; - this.tb_StationArrival.CustomButton.Visible = false; - this.tb_StationArrival.Lines = new string[0]; - this.tb_StationArrival.Location = new System.Drawing.Point(176, 250); - this.tb_StationArrival.MaxLength = 32767; - this.tb_StationArrival.Name = "tb_StationArrival"; - this.tb_StationArrival.PasswordChar = '\0'; - this.tb_StationArrival.ScrollBars = System.Windows.Forms.ScrollBars.None; - this.tb_StationArrival.SelectedText = ""; - this.tb_StationArrival.SelectionLength = 0; - this.tb_StationArrival.SelectionStart = 0; - this.tb_StationArrival.ShortcutsEnabled = true; - this.tb_StationArrival.Size = new System.Drawing.Size(524, 23); - this.tb_StationArrival.TabIndex = 37; - this.tb_StationArrival.UseSelectable = true; - this.tb_StationArrival.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); - this.tb_StationArrival.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); - // - // metroLabel9 - // - this.metroLabel9.AutoSize = true; - this.metroLabel9.Location = new System.Drawing.Point(29, 283); - this.metroLabel9.Name = "metroLabel9"; - this.metroLabel9.Size = new System.Drawing.Size(135, 19); - this.metroLabel9.TabIndex = 38; - this.metroLabel9.Text = "产品出站接口地址:"; - // - // tb_stationExit - // - // - // - // - this.tb_stationExit.CustomButton.Image = null; - this.tb_stationExit.CustomButton.Location = new System.Drawing.Point(502, 1); - this.tb_stationExit.CustomButton.Name = ""; - this.tb_stationExit.CustomButton.Size = new System.Drawing.Size(21, 21); - this.tb_stationExit.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; - this.tb_stationExit.CustomButton.TabIndex = 1; - this.tb_stationExit.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; - this.tb_stationExit.CustomButton.UseSelectable = true; - this.tb_stationExit.CustomButton.Visible = false; - this.tb_stationExit.Lines = new string[0]; - this.tb_stationExit.Location = new System.Drawing.Point(176, 283); - this.tb_stationExit.MaxLength = 32767; - this.tb_stationExit.Name = "tb_stationExit"; - this.tb_stationExit.PasswordChar = '\0'; - this.tb_stationExit.ScrollBars = System.Windows.Forms.ScrollBars.None; - this.tb_stationExit.SelectedText = ""; - this.tb_stationExit.SelectionLength = 0; - this.tb_stationExit.SelectionStart = 0; - this.tb_stationExit.ShortcutsEnabled = true; - this.tb_stationExit.Size = new System.Drawing.Size(524, 23); - this.tb_stationExit.TabIndex = 39; - this.tb_stationExit.UseSelectable = true; - this.tb_stationExit.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); - this.tb_stationExit.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + this.tb_loginMes.CustomButton.Image = null; + this.tb_loginMes.CustomButton.Location = new System.Drawing.Point(502, 1); + this.tb_loginMes.CustomButton.Name = ""; + this.tb_loginMes.CustomButton.Size = new System.Drawing.Size(21, 21); + this.tb_loginMes.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.tb_loginMes.CustomButton.TabIndex = 1; + this.tb_loginMes.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.tb_loginMes.CustomButton.UseSelectable = true; + this.tb_loginMes.CustomButton.Visible = false; + this.tb_loginMes.Lines = new string[0]; + this.tb_loginMes.Location = new System.Drawing.Point(176, 145); + this.tb_loginMes.MaxLength = 32767; + this.tb_loginMes.Name = "tb_loginMes"; + this.tb_loginMes.PasswordChar = '\0'; + this.tb_loginMes.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.tb_loginMes.SelectedText = ""; + this.tb_loginMes.SelectionLength = 0; + this.tb_loginMes.SelectionStart = 0; + this.tb_loginMes.ShortcutsEnabled = true; + this.tb_loginMes.Size = new System.Drawing.Size(524, 23); + this.tb_loginMes.TabIndex = 41; + this.tb_loginMes.UseSelectable = true; + this.tb_loginMes.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.tb_loginMes.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); // // FormMesDataSet // @@ -661,10 +705,10 @@ namespace JY.Inspection.Frm this.Text = "系统参数设置"; this.Load += new System.EventHandler(this.FormMesDataSet_Load); this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.LoginTime)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.txtMesRequestTime)).EndInit(); this.metroPanel_top.ResumeLayout(false); this.metroPanel_top.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.LoginTime)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtMesRequestTime)).EndInit(); this.metroPanel_mid.ResumeLayout(false); this.metroPanel_mid.PerformLayout(); this.metroPanel_bottom.ResumeLayout(false); @@ -709,5 +753,7 @@ namespace JY.Inspection.Frm private MetroFramework.Controls.MetroTextBox tb_StationArrival; private MetroFramework.Controls.MetroLabel metroLabel8; private System.Windows.Forms.BindingSource bindingSource1; + private MetroFramework.Controls.MetroLabel metroLabel10; + private MetroFramework.Controls.MetroTextBox tb_loginMes; } } \ No newline at end of file diff --git a/JY.Inspection/HomeForm.cs b/JY.Inspection/HomeForm.cs index f889283..58eded6 100644 --- a/JY.Inspection/HomeForm.cs +++ b/JY.Inspection/HomeForm.cs @@ -504,6 +504,7 @@ namespace JY.Inspection Global.systemConfig.ResultProcessMesUrl = IniFileHelper.ReadIniData("MES配置", "ResultProcessMesUrl"); Global.systemConfig.StationArrivalUrl = IniFileHelper.ReadIniData("MES配置", "StationArrivalUrl"); Global.systemConfig.StationExitUrl = IniFileHelper.ReadIniData("MES配置", "StationExitUrl"); + Global.systemConfig.LoginMesUrl = IniFileHelper.ReadIniData("MES配置", "LoginMesUrl"); try { diff --git a/JY.Inspection/Mes/MESDataCombin.cs b/JY.Inspection/Mes/MESDataCombin.cs index 9ca58f5..d0c61df 100644 --- a/JY.Inspection/Mes/MESDataCombin.cs +++ b/JY.Inspection/Mes/MESDataCombin.cs @@ -322,7 +322,7 @@ namespace JY.Inspection.Mes // TODO MES登录请求地址 DateTime currentTime = DateTime.Now; - string reqUrl = string.Empty; + string reqUrl = Global.systemConfig.LoginMesUrl; MesCallResult resp = new MesCallResult(); try diff --git a/JY.Inspection/ViewModel/FrmMesSettingVM.cs b/JY.Inspection/ViewModel/FrmMesSettingVM.cs index 3129022..182e4d3 100644 --- a/JY.Inspection/ViewModel/FrmMesSettingVM.cs +++ b/JY.Inspection/ViewModel/FrmMesSettingVM.cs @@ -46,6 +46,18 @@ namespace JY.Inspection.ViewModel set { stationExitUrl = value; OnPropertyChanged(); } } + private string loginMesUrl; + + /// + /// Mes登录接口地址 + /// + public string LoginMesUrl + { + get { return loginMesUrl; } + set { loginMesUrl = value; OnPropertyChanged(); } + } + + private string productType; /// diff --git a/JY.Model/DB.Entity/SystemConfig.cs b/JY.Model/DB.Entity/SystemConfig.cs index f620ef5..8584e82 100644 --- a/JY.Model/DB.Entity/SystemConfig.cs +++ b/JY.Model/DB.Entity/SystemConfig.cs @@ -52,6 +52,11 @@ namespace JY.Model /// public string StationExitUrl = "http://127.0.0.1"; + /// + /// MES登录接口地址 + /// + public string LoginMesUrl = "http://127.0.0.1"; + public List CollectItemCfgList { get; set; } = new List(); #endregion