|
@@ -84,13 +84,14 @@ namespace FileWatcher
|
|
|
//获取缓存信息
|
|
//获取缓存信息
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
- ComPort.Text= BaseUtil.GetCacheData("ComPort").ToString();
|
|
|
|
|
|
|
+ ComPort.Text = BaseUtil.GetCacheData("ComPort").ToString();
|
|
|
Type.Text = BaseUtil.GetCacheData("Type").ToString();
|
|
Type.Text = BaseUtil.GetCacheData("Type").ToString();
|
|
|
li_code.Text = BaseUtil.GetCacheData("Line").ToString();
|
|
li_code.Text = BaseUtil.GetCacheData("Line").ToString();
|
|
|
Read.Text = BaseUtil.GetCacheData("Read").ToString();
|
|
Read.Text = BaseUtil.GetCacheData("Read").ToString();
|
|
|
Write.Text = BaseUtil.GetCacheData("Write").ToString();
|
|
Write.Text = BaseUtil.GetCacheData("Write").ToString();
|
|
|
ToZero.Text = BaseUtil.GetCacheData("ToZero").ToString();
|
|
ToZero.Text = BaseUtil.GetCacheData("ToZero").ToString();
|
|
|
- CountType.Text= BaseUtil.GetCacheData("CountType").ToString();
|
|
|
|
|
|
|
+ CountType.Text = BaseUtil.GetCacheData("CountType").ToString();
|
|
|
|
|
+ UseScan.Text = BaseUtil.GetCacheData("UseScan").ToString();
|
|
|
}
|
|
}
|
|
|
catch (Exception ex) { OperateResult.AppendText(ex.Message); }
|
|
catch (Exception ex) { OperateResult.AppendText(ex.Message); }
|
|
|
RemindTimer.Start();
|
|
RemindTimer.Start();
|
|
@@ -129,7 +130,10 @@ namespace FileWatcher
|
|
|
dh.ExecuteSql("insert into makehourcount(mhc_id,mhc_macode,mhc_indate,mhc_type,mhc_qty,mhc_linecode,mhc_pcbcount)" +
|
|
dh.ExecuteSql("insert into makehourcount(mhc_id,mhc_macode,mhc_indate,mhc_type,mhc_qty,mhc_linecode,mhc_pcbcount)" +
|
|
|
"values(makehourcount_seq.nextval,'" + ma_code.Text + "',sysdate,'" + Type.Text + "','" + (qty - lastqty) + "','" + li_code.Text + "','" + pr_pcbacount.Value + "')", "insert");
|
|
"values(makehourcount_seq.nextval,'" + ma_code.Text + "',sysdate,'" + Type.Text + "','" + (qty - lastqty) + "','" + li_code.Text + "','" + pr_pcbacount.Value + "')", "insert");
|
|
|
}
|
|
}
|
|
|
- LogicHandler.CS_SetResultRXY(ma_code.Text, li_code.Text, "", qty.ToString(), li_code.Text, "OK", out error);
|
|
|
|
|
|
|
+ if (Counter.Checked)
|
|
|
|
|
+ {
|
|
|
|
|
+ LogicHandler.CS_SetResultRXY(ma_code.Text, li_code.Text, "", qty.ToString(), li_code.Text, "OK", out error);
|
|
|
|
|
+ }
|
|
|
lastqty = qty;
|
|
lastqty = qty;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -265,7 +269,7 @@ namespace FileWatcher
|
|
|
if (LogicHandler.CS_SetResultRXY(ma_code.Text, li_code.Text, MainSN, "0", li_code.Text, "OK", out error))
|
|
if (LogicHandler.CS_SetResultRXY(ma_code.Text, li_code.Text, MainSN, "0", li_code.Text, "OK", out error))
|
|
|
{
|
|
{
|
|
|
OperateResult.AppendText("SN:" + MainSN + "采集成功\n");
|
|
OperateResult.AppendText("SN:" + MainSN + "采集成功\n");
|
|
|
- OperateResult. ScrollToCaret();
|
|
|
|
|
|
|
+ OperateResult.ScrollToCaret();
|
|
|
ms_sncode.Clear();
|
|
ms_sncode.Clear();
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
@@ -295,6 +299,9 @@ namespace FileWatcher
|
|
|
BaseUtil.SetCacheData("ToZero", ToZero.Text);
|
|
BaseUtil.SetCacheData("ToZero", ToZero.Text);
|
|
|
BaseUtil.SetCacheData("Type", Type.Text);
|
|
BaseUtil.SetCacheData("Type", Type.Text);
|
|
|
BaseUtil.SetCacheData("CountType", CountType.Text);
|
|
BaseUtil.SetCacheData("CountType", CountType.Text);
|
|
|
|
|
+ BaseUtil.SetCacheData("UseScan", UseScan.Text);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
if (!dh.CheckExist("Make", "ma_code='" + ma_code.Text + "'"))
|
|
if (!dh.CheckExist("Make", "ma_code='" + ma_code.Text + "'"))
|
|
|
{
|
|
{
|
|
|
OperateResult.AppendText("工单号不能为空\n");
|
|
OperateResult.AppendText("工单号不能为空\n");
|
|
@@ -366,10 +373,10 @@ namespace FileWatcher
|
|
|
{
|
|
{
|
|
|
StartWatch.Enabled = true;
|
|
StartWatch.Enabled = true;
|
|
|
ma_code.Enabled = true;
|
|
ma_code.Enabled = true;
|
|
|
-
|
|
|
|
|
StopWatch.Enabled = false;
|
|
StopWatch.Enabled = false;
|
|
|
OperateResult.AppendText("停止执行监控\n");
|
|
OperateResult.AppendText("停止执行监控\n");
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
bool realwritedata = false;
|
|
bool realwritedata = false;
|
|
|
|
|
|
|
|
private void Timer_Tick(object sender, EventArgs e)
|
|
private void Timer_Tick(object sender, EventArgs e)
|
|
@@ -418,7 +425,10 @@ namespace FileWatcher
|
|
|
dh.ExecuteSql("insert into makehourcount(mhc_id,mhc_macode,mhc_indate,mhc_type,mhc_qty,mhc_linecode,mhc_pcbcount)" +
|
|
dh.ExecuteSql("insert into makehourcount(mhc_id,mhc_macode,mhc_indate,mhc_type,mhc_qty,mhc_linecode,mhc_pcbcount)" +
|
|
|
"values(makehourcount_seq.nextval,'" + ma_code.Text + "',sysdate,'" + Type.Text + "','" + (qty - lastqty) + "','" + li_code.Text + "','" + pr_pcbacount.Value + "')", "insert");
|
|
"values(makehourcount_seq.nextval,'" + ma_code.Text + "',sysdate,'" + Type.Text + "','" + (qty - lastqty) + "','" + li_code.Text + "','" + pr_pcbacount.Value + "')", "insert");
|
|
|
}
|
|
}
|
|
|
- LogicHandler.CS_SetResultRXY(ma_code.Text, li_code.Text, "", qty.ToString(), li_code.Text, "OK", out error);
|
|
|
|
|
|
|
+ if (Counter.Checked)
|
|
|
|
|
+ {
|
|
|
|
|
+ LogicHandler.CS_SetResultRXY(ma_code.Text, li_code.Text, "", qty.ToString(), li_code.Text, "OK", out error);
|
|
|
|
|
+ }
|
|
|
lastqty = qty;
|
|
lastqty = qty;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|