Commit 7669e091 刘韬

修正模版标签不能添加超过一行的问题

1 个父辈 05682e0f
......@@ -230,7 +230,8 @@ namespace BLL
BATCH = TryGetDictValue(keyv, "BATCH"),
MPN = TryGetDictValue(keyv, "MPN"),
SiteCode = TryGetDictValue(keyv, "SiteCode"),
TraceCode = "ADMIN",
VEN = TryGetDictValue(keyv, "VEN"),
TraceCode = TryGetDictValue(keyv, "Trace"),
};
if (string.IsNullOrWhiteSpace(initPPID_Request_DPS.ToLoc))
......@@ -301,6 +302,7 @@ namespace BLL
public string LotNo { get; set; }
public string DCODE { get; set; }
public string TraceCode { get; set; }
public string VEN { get; set; }
}
public class APIResponse
......
......@@ -61,7 +61,7 @@ namespace SmartScan
this.BtnOK.BorderWidth = 2;
this.BtnOK.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnOK.HoldPress = false;
this.BtnOK.Location = new System.Drawing.Point(508, 673);
this.BtnOK.Location = new System.Drawing.Point(508, 656);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Padding = new System.Windows.Forms.Padding(3);
this.BtnOK.Size = new System.Drawing.Size(120, 40);
......@@ -77,7 +77,7 @@ namespace SmartScan
this.BtnCancel.BorderWidth = 2;
this.BtnCancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnCancel.HoldPress = false;
this.BtnCancel.Location = new System.Drawing.Point(634, 673);
this.BtnCancel.Location = new System.Drawing.Point(634, 656);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Padding = new System.Windows.Forms.Padding(3);
this.BtnCancel.Size = new System.Drawing.Size(120, 40);
......@@ -103,17 +103,16 @@ namespace SmartScan
//
// PnlTemp
//
this.PnlTemp.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.PnlTemp.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.PnlTemp.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.PnlTemp.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.PnlTemp.BorderWidth = 2;
this.PnlTemp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.PnlTemp.Location = new System.Drawing.Point(11, 172);
this.PnlTemp.Location = new System.Drawing.Point(11, 184);
this.PnlTemp.Name = "PnlTemp";
this.PnlTemp.Padding = new System.Windows.Forms.Padding(3);
this.PnlTemp.Size = new System.Drawing.Size(743, 495);
this.PnlTemp.Size = new System.Drawing.Size(743, 466);
this.PnlTemp.TabIndex = 28;
this.PnlTemp.Text = "facePanel1";
this.PnlTemp.TitleFont = new System.Drawing.Font("宋体", 12F);
......@@ -125,30 +124,30 @@ namespace SmartScan
| System.Windows.Forms.AnchorStyles.Right)));
this.flowLayoutPanel1.Location = new System.Drawing.Point(11, 121);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(743, 45);
this.flowLayoutPanel1.Size = new System.Drawing.Size(743, 63);
this.flowLayoutPanel1.TabIndex = 29;
//
// FrmCodeExtract
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(765, 724);
this.Controls.Add(this.flowLayoutPanel1);
this.ClientSize = new System.Drawing.Size(765, 707);
this.Controls.Add(this.PnlTemp);
this.Controls.Add(this.BtnAddMatch);
this.Controls.Add(this.BtnCancel);
this.Controls.Add(this.BtnOK);
this.Controls.Add(this.LblCode);
this.Controls.Add(this.flowLayoutPanel1);
this.Icon = global::SmartScan.Properties.Resources.NEO_64;
this.Name = "FrmCodeExtract";
this.Text = "FrmCodeExtract";
this.Load += new System.EventHandler(this.FrmCodeExtract_Load);
this.Controls.SetChildIndex(this.flowLayoutPanel1, 0);
this.Controls.SetChildIndex(this.LblCode, 0);
this.Controls.SetChildIndex(this.BtnOK, 0);
this.Controls.SetChildIndex(this.BtnCancel, 0);
this.Controls.SetChildIndex(this.BtnAddMatch, 0);
this.Controls.SetChildIndex(this.PnlTemp, 0);
this.Controls.SetChildIndex(this.flowLayoutPanel1, 0);
this.ResumeLayout(false);
}
......
......@@ -19,10 +19,11 @@ namespace SmartScan
private readonly string codeType;
private readonly Dictionary<FaceButton, UsrCodeExtractList> matchButton = new();
int windowHeight = 0;
public FrmCodeExtract(string codeText, int codeID,string codeType, List<MaterialCodeMatch> match)
{
InitializeComponent();
windowHeight = this.Height;
codeText = codeText.Replace("\r", "");
this.codeText = codeText.Replace("\n", "");
this.codeID = codeID;
......@@ -42,9 +43,10 @@ namespace SmartScan
private void AddMatch(MaterialCodeMatch match)
{
FaceButton btn = new() { Text = string.Format("[{0}]", match.Keyword), Margin = new Padding(0, 0, 6, 0), Width = 100, Height = flowLayoutPanel1.Height };
FaceButton btn = new() { Text = string.Format("[{0}]", match.Keyword), Margin = new Padding(0, 0, 6, 6), Width = 100, Height = 50 };
btn.Click += Btn_Click;
flowLayoutPanel1.Controls.Add(btn);
UsrCodeExtractList list = new(codeText,codeType, codeText.Length, match);
list.DelClick += List_DelClick;
......@@ -59,8 +61,30 @@ namespace SmartScan
pnl.Anchor = PnlTemp.Anchor;
pnl.Visible = false;
Controls.Add(pnl);
clacWindowHeight();
}
void clacWindowHeight() {
if (flowLayoutPanel1.Controls.Count > 14)
{
matchButton.Values.ToList().ForEach((x)=> {x.GetPanel().Top = 184 + 56 * 2; });
flowLayoutPanel1.Height = 56 * 3;
this.Height = windowHeight + 56 * 2 - 4;
}
else if (flowLayoutPanel1.Controls.Count > 7)
{
matchButton.Values.ToList().ForEach((x) => { x.GetPanel().Top = 184 + 56 * 1; });
flowLayoutPanel1.Height = 56 * 2 - 4;
this.Height = windowHeight + 56;
}
else
{
matchButton.Values.ToList().ForEach((x) => { x.GetPanel().Top = 184; });
flowLayoutPanel1.Height = 56 - 4;
this.Height = windowHeight;
}
}
private void List_KeyChanged(object sender, string key)
{
UsrCodeExtractList ctl = sender as UsrCodeExtractList;
......@@ -84,7 +108,11 @@ namespace SmartScan
break;
}
if (matchButton.Count > 0)
matchButton.ElementAt(0).Value.GetPanel().Visible = true;
{
matchButton.Last().Key.HoldPress = true;
matchButton.Last().Value.GetPanel().Visible = true;
}
clacWindowHeight();
}
private void BtnAddMatch_Click(object sender, EventArgs e)
......@@ -150,6 +178,7 @@ namespace SmartScan
private void FrmCodeExtract_Load(object sender, EventArgs e)
{
LblCode.Text = codeText;
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!