|
@@ -35,8 +35,8 @@ namespace SCADA_DAQ.Customer
|
|
[UctMenu("扫码界面", Icon = "看板")]
|
|
[UctMenu("扫码界面", Icon = "看板")]
|
|
public partial class UctFrmCodeScanningGun : BaseUctFrm
|
|
public partial class UctFrmCodeScanningGun : BaseUctFrm
|
|
{
|
|
{
|
|
- private ScannerMachine_v1 FirstMachinelCodeScanningSun = MachineServer.GetInstance().GetMachine<ScannerMachine_v1>("上料扫码枪");
|
|
|
|
- private ScannerMachine_v1 SencndMachinelCodeScanningSun = MachineServer.GetInstance().GetMachine<ScannerMachine_v1>("下料扫码枪");
|
|
|
|
|
|
+ private ScannerMachine FirstMachinelCodeScanningSun = MachineServer.GetInstance().GetMachine<ScannerMachine>("上料扫码枪");
|
|
|
|
+ //private ScannerMachine SencndMachinelCodeScanningSun = MachineServer.GetInstance().GetMachine<ScannerMachine>("下料扫码枪");
|
|
|
|
|
|
private List<SolidColorBrush> brushesList = new List<SolidColorBrush>()
|
|
private List<SolidColorBrush> brushesList = new List<SolidColorBrush>()
|
|
{
|
|
{
|
|
@@ -56,10 +56,10 @@ namespace SCADA_DAQ.Customer
|
|
FirstMachinelCodeScanningSun.BarCodeReceived += Machinel_BarCodeReceived;
|
|
FirstMachinelCodeScanningSun.BarCodeReceived += Machinel_BarCodeReceived;
|
|
|
|
|
|
}
|
|
}
|
|
- else if (SencndMachinelCodeScanningSun != null)
|
|
|
|
- {
|
|
|
|
- SencndMachinelCodeScanningSun.BarCodeReceived += Machinel_BarCodeReceived;
|
|
|
|
- }
|
|
|
|
|
|
+ //else if (SencndMachinelCodeScanningSun != null)
|
|
|
|
+ //{
|
|
|
|
+ // SencndMachinelCodeScanningSun.BarCodeReceived += Machinel_BarCodeReceived;
|
|
|
|
+ //}
|
|
|
|
|
|
|
|
|
|
Env.Schedual.DateTimeChanged += Schedual_DateTimeChanged;
|
|
Env.Schedual.DateTimeChanged += Schedual_DateTimeChanged;
|
|
@@ -76,18 +76,18 @@ namespace SCADA_DAQ.Customer
|
|
private void Machinel_BarCodeReceived(object sender, BarcodeReceivedEventArgs e)
|
|
private void Machinel_BarCodeReceived(object sender, BarcodeReceivedEventArgs e)
|
|
{
|
|
{
|
|
Dispatcher.Invoke(() =>
|
|
Dispatcher.Invoke(() =>
|
|
|
|
+ {
|
|
|
|
+ TextContent.Text = e.Barcode;
|
|
|
|
+ TextContent.Background = brushesList[brushListIndex];
|
|
|
|
+ brushListIndex++;
|
|
|
|
+ if (brushListIndex > brushesList.Count - 1)
|
|
{
|
|
{
|
|
- TextContent.Text = e.Barcode;
|
|
|
|
- TextContent.Background = brushesList[brushListIndex];
|
|
|
|
- brushListIndex++;
|
|
|
|
- if (brushListIndex > brushesList.Count - 1)
|
|
|
|
- {
|
|
|
|
- brushListIndex = 0;
|
|
|
|
- }
|
|
|
|
- TextContentTime.Text = e.TimeStamp.ToLongTimeString();
|
|
|
|
- // 全屏提示、语音播报
|
|
|
|
- FrmShowMessage.ShowMessage(e.Barcode, "扫码成功", SCADA.CommonCtrl.MessageLevel.Info, 2500);
|
|
|
|
- });
|
|
|
|
|
|
+ brushListIndex = 0;
|
|
|
|
+ }
|
|
|
|
+ TextContentTime.Text = e.TimeStamp.ToLongTimeString();
|
|
|
|
+ // 全屏提示、语音播报
|
|
|
|
+ FrmShowMessage.ShowMessage(e.Barcode, "扫码成功", SCADA.CommonCtrl.MessageLevel.Info, 2500);
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
private void Schedual_DateTimeChanged(object sender, DateTimeChangedArgs e)
|
|
private void Schedual_DateTimeChanged(object sender, DateTimeChangedArgs e)
|