|
|
@ -35,11 +35,11 @@ namespace MaterialTraceabilityUI
|
|
|
|
InitializeComponent();
|
|
|
|
InitializeComponent();
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (appConfig.processId.Contains("LY"))
|
|
|
|
if (appConfig.processId == "AB")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MainBusiness.LogRefreshEvent += LogRefresh;
|
|
|
|
MainBusiness.LogRefreshEvent += LogRefresh;
|
|
|
|
LYSignalReadBusiness.LogRefreshEvent += LogRefresh;
|
|
|
|
ABSignalReadBusiness.LogRefreshEvent += LogRefresh;
|
|
|
|
LYSignalReadBusiness.ViewModelRefreshEvent += ProductionParam;
|
|
|
|
ABSignalReadBusiness.ViewModelRefreshEvent += ProductionParam;
|
|
|
|
UserControlInit();
|
|
|
|
UserControlInit();
|
|
|
|
|
|
|
|
|
|
|
|
refreshThread();
|
|
|
|
refreshThread();
|
|
|
@ -78,138 +78,138 @@ namespace MaterialTraceabilityUI
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
|
action = () =>
|
|
|
|
action = () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.Down_SFC_1.Text = "SFC:" + viewModelDto.rfidInfo.sfc;
|
|
|
|
this.Down_SFC_5.Text = "SFC:" + viewModelDto.rfidInfo.sfc;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
Down_SFC_1.Dispatcher.BeginInvoke(action);
|
|
|
|
Down_SFC_5.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
action = () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.Down_RFID_1.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
this.Down_RFID_5.Text = "RFID:" + viewModelDto.rfidInfo.rfid;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
Down_RFID_1.Dispatcher.BeginInvoke(action);
|
|
|
|
Down_RFID_5.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
action = () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.Down_EA_1.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
this.Down_EA_5.Text = "EA:" + viewModelDto.rfidInfo.ea;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
Down_EA_1.Dispatcher.BeginInvoke(action);
|
|
|
|
Down_EA_5.Dispatcher.BeginInvoke(action);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
case 2:
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_SFC_2.Text = "SFC:" + viewModelDto.rfidInfo.sfc;
|
|
|
|
// this.Down_SFC_2.Text = "SFC:" + viewModelDto.rfidInfo.sfc;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_SFC_2.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_SFC_2.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_RFID_2.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
// this.Down_RFID_2.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_RFID_2.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_RFID_2.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_EA_2.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
// this.Down_EA_2.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_EA_2.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_EA_2.Dispatcher.BeginInvoke(action);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
case 5:
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_SFC_3.Text = "SFC:"+viewModelDto.rfidInfo.sfc;
|
|
|
|
// this.Down_SFC_3.Text = "SFC:"+viewModelDto.rfidInfo.sfc;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_SFC_3.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_SFC_3.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_RFID_3.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
// this.Down_RFID_3.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_RFID_3.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_RFID_3.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_EA_3.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
// this.Down_EA_3.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_EA_3.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_EA_3.Dispatcher.BeginInvoke(action);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
case 6:
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_SFC_4.Text = "SFC:"+viewModelDto.rfidInfo.sfc;
|
|
|
|
// this.Down_SFC_4.Text = "SFC:"+viewModelDto.rfidInfo.sfc;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_SFC_4.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_SFC_4.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_RFID_4.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
// this.Down_RFID_4.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_RFID_4.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_RFID_4.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_EA_4.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
// this.Down_EA_4.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_EA_4.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_EA_4.Dispatcher.BeginInvoke(action);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
case 4:
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_SFC_5.Text = "SFC:"+viewModelDto.rfidInfo.sfc;
|
|
|
|
// this.Down_SFC_5.Text = "SFC:"+viewModelDto.rfidInfo.sfc;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_SFC_5.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_SFC_5.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_RFID_5.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
// this.Down_RFID_5.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_RFID_5.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_RFID_5.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_EA_5.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
// this.Down_EA_5.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_EA_5.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_EA_5.Dispatcher.BeginInvoke(action);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
case 3:
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_SFC_6.Text = "SFC:"+viewModelDto.rfidInfo.sfc;
|
|
|
|
// this.Down_SFC_6.Text = "SFC:"+viewModelDto.rfidInfo.sfc;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_SFC_6.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_SFC_6.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_RFID_6.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
// this.Down_RFID_6.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_RFID_6.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_RFID_6.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_EA_6.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
// this.Down_EA_6.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_EA_6.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_EA_6.Dispatcher.BeginInvoke(action);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 8:
|
|
|
|
case 8:
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_SFC_7.Text = "SFC:"+viewModelDto.rfidInfo.sfc;
|
|
|
|
// this.Down_SFC_7.Text = "SFC:"+viewModelDto.rfidInfo.sfc;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_SFC_7.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_SFC_7.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_RFID_7.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
// this.Down_RFID_7.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_RFID_7.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_RFID_7.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_EA_7.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
// this.Down_EA_7.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_EA_7.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_EA_7.Dispatcher.BeginInvoke(action);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 7:
|
|
|
|
case 7:
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_SFC_8.Text = "SFC:"+viewModelDto.rfidInfo.sfc;
|
|
|
|
// this.Down_SFC_8.Text = "SFC:"+viewModelDto.rfidInfo.sfc;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_SFC_8.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_SFC_8.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_RFID_8.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
// this.Down_RFID_8.Text = "RFID:"+viewModelDto.rfidInfo.rfid;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_RFID_8.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_RFID_8.Dispatcher.BeginInvoke(action);
|
|
|
|
action = () =>
|
|
|
|
//action = () =>
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
this.Down_EA_8.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
// this.Down_EA_8.Text = "EA:"+viewModelDto.rfidInfo.ea;
|
|
|
|
};
|
|
|
|
//};
|
|
|
|
Down_EA_8.Dispatcher.BeginInvoke(action);
|
|
|
|
//Down_EA_8.Dispatcher.BeginInvoke(action);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -404,8 +404,8 @@ namespace MaterialTraceabilityUI
|
|
|
|
logInfoServices.Add(new RecordLogInfo()
|
|
|
|
logInfoServices.Add(new RecordLogInfo()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
id = System.Guid.NewGuid().ToString("N"),
|
|
|
|
id = System.Guid.NewGuid().ToString("N"),
|
|
|
|
processId = "LY_A",
|
|
|
|
processId = appConfig.processId,
|
|
|
|
machineId = ConfigurationManager.AppSettings["machineId"].ToString(),
|
|
|
|
machineId = appConfig.machineId.ToString(),
|
|
|
|
alarmType = logTypeStr,
|
|
|
|
alarmType = logTypeStr,
|
|
|
|
alarmInfo = info,
|
|
|
|
alarmInfo = info,
|
|
|
|
isAlarm = isAlarm,
|
|
|
|
isAlarm = isAlarm,
|
|
|
@ -565,8 +565,8 @@ namespace MaterialTraceabilityUI
|
|
|
|
/// <param name="e"></param>
|
|
|
|
/// <param name="e"></param>
|
|
|
|
private void down_5_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
|
|
|
private void down_5_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//WriteInfo write = new WriteInfo(appConfig.processId, 4);
|
|
|
|
WriteInfo write = new WriteInfo(appConfig.processId, 1);
|
|
|
|
//write.ShowDialog();
|
|
|
|
write.ShowDialog();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|