..
This commit is contained in:
@@ -286,32 +286,41 @@ namespace Project
|
||||
PUB.log.Add($"ListFormmatData");
|
||||
|
||||
arDatagridView1.SuspendLayout();
|
||||
foreach (DataGridViewRow item in this.arDatagridView1.Rows)
|
||||
|
||||
try
|
||||
{
|
||||
var drv = item.DataBoundItem as System.Data.DataRowView;
|
||||
var dr = drv.Row as DataSet1.K4EE_Component_Reel_ResultRow;
|
||||
foreach (DataGridViewRow item in this.arDatagridView1.Rows)
|
||||
{
|
||||
var drv = item.DataBoundItem as System.Data.DataRowView;
|
||||
var dr = drv.Row as DataSet1.K4EE_Component_Reel_ResultRow;
|
||||
|
||||
if (dr.REMARK.StartsWith("(BYPASS"))
|
||||
{
|
||||
item.DefaultCellStyle.BackColor = Color.LightSkyBlue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dr.LOC == "L")
|
||||
item.DefaultCellStyle.BackColor = Color.FromArgb(220, 220, 220);
|
||||
if (dr.REMARK.StartsWith("(BYPASS"))
|
||||
{
|
||||
item.DefaultCellStyle.BackColor = Color.LightSkyBlue;
|
||||
}
|
||||
else
|
||||
item.DefaultCellStyle.BackColor = Color.FromArgb(250, 250, 250);
|
||||
}
|
||||
{
|
||||
if (dr.LOC == "L")
|
||||
item.DefaultCellStyle.BackColor = Color.FromArgb(220, 220, 220);
|
||||
else
|
||||
item.DefaultCellStyle.BackColor = Color.FromArgb(250, 250, 250);
|
||||
}
|
||||
|
||||
if (dr.REMARK.StartsWith("(BYPASS"))
|
||||
item.DefaultCellStyle.ForeColor = Color.Black;
|
||||
else if (dr.PRNATTACH == false)
|
||||
item.DefaultCellStyle.ForeColor = Color.FromArgb(0xfe, 0x2a, 0x00);
|
||||
else if (dr.PRNVALID == false)
|
||||
item.DefaultCellStyle.ForeColor = Color.FromArgb(0x1f, 0x3b, 0x34);
|
||||
else
|
||||
item.DefaultCellStyle.ForeColor = Color.Black;
|
||||
if (dr.REMARK.StartsWith("(BYPASS"))
|
||||
item.DefaultCellStyle.ForeColor = Color.Black;
|
||||
else if (dr.PRNATTACH == false)
|
||||
item.DefaultCellStyle.ForeColor = Color.FromArgb(0xfe, 0x2a, 0x00);
|
||||
else if (dr.PRNVALID == false)
|
||||
item.DefaultCellStyle.ForeColor = Color.FromArgb(0x1f, 0x3b, 0x34);
|
||||
else
|
||||
item.DefaultCellStyle.ForeColor = Color.Black;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
arDatagridView1.ResumeLayout();
|
||||
}
|
||||
async private void __Load(object sender, EventArgs e)
|
||||
@@ -492,10 +501,17 @@ namespace Project
|
||||
var data = e.StrValue.Replace("\r", "").Replace("\n", "");
|
||||
bool findregex = false;
|
||||
PUB.log.Add($"Fixed barcode received\n{data}");
|
||||
var cnt = BarcodeRegExProcess(
|
||||
PUB.Result.BCDPattern,
|
||||
PUB.Result.BCDIgnorePattern,
|
||||
PUB.Result.ItemDataC.VisionData, string.Empty, data, out bool IgnoreBarcode, out findregex);
|
||||
|
||||
Tuple<int, List<string>> cnt = null;
|
||||
bool IgnoreBarcode = false;
|
||||
lock (PUB.Result.BCDPatternLock)
|
||||
{
|
||||
cnt = BarcodeRegExProcess(
|
||||
PUB.Result.BCDPattern,
|
||||
PUB.Result.BCDIgnorePattern,
|
||||
PUB.Result.ItemDataC.VisionData, string.Empty, data, out IgnoreBarcode, out findregex);
|
||||
}
|
||||
|
||||
|
||||
if (IgnoreBarcode) PUB.log.AddE("This is an ignore barcode");
|
||||
else if (cnt.Item1 == 0) PUB.log.AddAT("(Manual) No applicable barcode value");
|
||||
@@ -1107,15 +1123,15 @@ namespace Project
|
||||
}
|
||||
if (reelinfo.id.isEmpty() == false)
|
||||
{
|
||||
vdata.VisionData.SetRID(reelinfo.id,"TEST");
|
||||
vdata.VisionData.SetRID(reelinfo.id, "TEST");
|
||||
vdata.VisionData.RID_Trust = true;
|
||||
}
|
||||
if(reelinfo.mfg.isEmpty()==false)
|
||||
if (reelinfo.mfg.isEmpty() == false)
|
||||
{
|
||||
vdata.VisionData.MFGDATE = reelinfo.mfg;
|
||||
vdata.VisionData.MFGDATE_Trust = true;
|
||||
}
|
||||
if(reelinfo.qty > 0)
|
||||
if (reelinfo.qty > 0)
|
||||
{
|
||||
vdata.VisionData.QTY = reelinfo.qty.ToString();
|
||||
vdata.VisionData.QTY_Trust = true;
|
||||
@@ -1769,9 +1785,12 @@ namespace Project
|
||||
|
||||
private void bcdRegProcessClearToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
lock (PUB.Result.BCDPatternLock)
|
||||
{
|
||||
PUB.Result.BCDPattern.Clear();
|
||||
PUB.Result.BCDIgnorePattern.Clear();
|
||||
}
|
||||
|
||||
PUB.Result.BCDPattern.Clear();
|
||||
PUB.Result.BCDIgnorePattern.Clear();
|
||||
|
||||
|
||||
if (PUB.Result.ItemDataC.VisionData == null) return;
|
||||
@@ -1790,6 +1809,18 @@ namespace Project
|
||||
{
|
||||
using (var f = new Dialog.RegExRule())
|
||||
f.ShowDialog();
|
||||
|
||||
if (PUB.sm.Step != eSMStep.IDLE)
|
||||
{
|
||||
lock (PUB.Result.BCDPatternLock)
|
||||
{
|
||||
var modelName = PUB.Result.vModel.Title;
|
||||
PUB.Result.BCDPattern = PUB.GetPatterns(modelName, false);
|
||||
PUB.Result.BCDIgnorePattern = PUB.GetPatterns(modelName, true);
|
||||
PUB.log.Add($"Model pattern loading: {PUB.Result.BCDPattern.Count}/{PUB.Result.BCDIgnorePattern.Count}");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2220,5 +2251,17 @@ namespace Project
|
||||
{
|
||||
PUB.Result.AutoReelOut = !PUB.Result.AutoReelOut;
|
||||
}
|
||||
|
||||
private void tbBarcodeR_Click(object sender, EventArgs e)
|
||||
{
|
||||
var lb = sender as arCtl.arLabel;
|
||||
if (lb == null) return;
|
||||
var txt = lb.Text.Trim();
|
||||
if(txt.isEmpty()==false)
|
||||
{
|
||||
Clipboard.SetText(txt);
|
||||
PUB.log.AddI($"Clipboard copy : {txt}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user