抽屉打开 订阅事件里设置channelStocks[0].process字段去掉
This commit is contained in:
parent
7cbf366a98
commit
f43e691ee0
|
@ -824,6 +824,7 @@ namespace DM_Weight.Port
|
|||
|
||||
private bool DrawerState(int[] r)
|
||||
{
|
||||
logger.Info($"DrawerState DrawerNo:{DrawerNo};r.length:{r.Length}");
|
||||
int index = DrawerNo > 8 ? DrawerNo - 7 : DrawerNo + 1;
|
||||
return r[index] == 0;
|
||||
}
|
||||
|
|
|
@ -221,25 +221,25 @@ namespace DM_Weight.ViewModels
|
|||
// 抽屉打开
|
||||
case EventType.DRAWEROPEN:
|
||||
|
||||
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 1)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 2);
|
||||
}
|
||||
//Status = 2;
|
||||
}
|
||||
logger.Info($"抽屉打开,channelStocks{channelStocks != null}");
|
||||
//if (Status == 1)
|
||||
//{
|
||||
// if (channelStocks!=null&& channelStocks[0]!=null&&channelStocks[0].process == 1)
|
||||
// {
|
||||
// channelStocks.ForEach(it => it.process = 2);
|
||||
// }
|
||||
// //Status = 2;
|
||||
//}
|
||||
|
||||
break;
|
||||
// 抽屉关闭
|
||||
case EventType.DRAWERCLOSE:
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 2)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 3);
|
||||
}
|
||||
//if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 2)
|
||||
//{
|
||||
// channelStocks.ForEach(it => it.process = 3);
|
||||
//}
|
||||
IGrouping<int, ChannelStock> groupingBefore = enumerator.Current;
|
||||
int DrawerNoBefore = groupingBefore.Key; //Convert.ToInt32(groupingBefore.Key.Substring(0, groupingBefore.Key.IndexOf('-')));
|
||||
if (enumerator.MoveNext())
|
||||
|
|
|
@ -104,24 +104,25 @@ namespace DM_Weight.ViewModels
|
|||
// 抽屉打开
|
||||
case EventType.DRAWEROPEN:
|
||||
|
||||
logger.Info($"抽屉打开,channelStocks{channelStocks != null}");
|
||||
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 1)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 2);
|
||||
}
|
||||
}
|
||||
//if (Status == 1)
|
||||
//{
|
||||
// if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 1)
|
||||
// {
|
||||
// channelStocks.ForEach(it => it.process = 2);
|
||||
// }
|
||||
//}
|
||||
|
||||
break;
|
||||
// 抽屉关闭
|
||||
case EventType.DRAWERCLOSE:
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 2)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 3);
|
||||
}
|
||||
//if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 2)
|
||||
//{
|
||||
// channelStocks.ForEach(it => it.process = 3);
|
||||
//}
|
||||
IGrouping<int, ChannelStock> groupingBefore = enumerator.Current;
|
||||
int DrawerNoBefore = groupingBefore.Key;
|
||||
if (enumerator.MoveNext())
|
||||
|
|
|
@ -62,23 +62,24 @@ namespace DM_Weight.ViewModels
|
|||
case EventType.DRAWEROPEN:
|
||||
|
||||
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 1)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 2);
|
||||
}
|
||||
}
|
||||
logger.Info($"抽屉打开,channelStocks{channelStocks != null}");
|
||||
//if (Status == 1)
|
||||
//{
|
||||
// if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 1)
|
||||
// {
|
||||
// channelStocks.ForEach(it => it.process = 2);
|
||||
// }
|
||||
//}
|
||||
|
||||
break;
|
||||
// 抽屉关闭
|
||||
case EventType.DRAWERCLOSE:
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 2)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 3);
|
||||
}
|
||||
//if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 2)
|
||||
//{
|
||||
// channelStocks.ForEach(it => it.process = 3);
|
||||
//}
|
||||
IGrouping<int, ChannelStock> groupingBefore = enumerator.Current;
|
||||
int DrawerNoBefore = groupingBefore.Key;
|
||||
if (enumerator.MoveNext())
|
||||
|
|
|
@ -66,23 +66,24 @@ namespace DM_Weight.ViewModels
|
|||
case EventType.DRAWEROPEN:
|
||||
|
||||
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 1)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 2);
|
||||
}
|
||||
}
|
||||
logger.Info($"抽屉打开,channelStocks{channelStocks != null}");
|
||||
//if (Status == 1)
|
||||
//{
|
||||
// if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 1)
|
||||
// {
|
||||
// channelStocks.ForEach(it => it.process = 2);
|
||||
// }
|
||||
//}
|
||||
|
||||
break;
|
||||
// 抽屉关闭
|
||||
case EventType.DRAWERCLOSE:
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 2)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 3);
|
||||
}
|
||||
//if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 2)
|
||||
//{
|
||||
// channelStocks.ForEach(it => it.process = 3);
|
||||
//}
|
||||
IGrouping<int, ChannelStock> groupingBefore = enumerator.Current;
|
||||
int DrawerNoBefore = groupingBefore.Key;
|
||||
if (enumerator.MoveNext())
|
||||
|
|
|
@ -65,23 +65,24 @@ namespace DM_Weight.ViewModels
|
|||
case EventType.DRAWEROPEN:
|
||||
|
||||
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 1)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 2);
|
||||
}
|
||||
}
|
||||
logger.Info($"抽屉打开,channelStocks{channelStocks != null}");
|
||||
//if (Status == 1)
|
||||
//{
|
||||
// if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 1)
|
||||
// {
|
||||
// channelStocks.ForEach(it => it.process = 2);
|
||||
// }
|
||||
//}
|
||||
|
||||
break;
|
||||
// 抽屉关闭
|
||||
case EventType.DRAWERCLOSE:
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 2)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 3);
|
||||
}
|
||||
//if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 2)
|
||||
//{
|
||||
// channelStocks.ForEach(it => it.process = 3);
|
||||
//}
|
||||
//IGrouping<int, ChannelStock> groupingBefore = enumerator.Current;
|
||||
//int DrawerNoBefore = groupingBefore.Key;
|
||||
if (enumerator.MoveNext())
|
||||
|
|
|
@ -70,23 +70,24 @@ namespace DM_Weight.ViewModels
|
|||
case EventType.DRAWEROPEN:
|
||||
|
||||
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 1)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 2);
|
||||
}
|
||||
}
|
||||
logger.Info($"抽屉打开,channelStocks{channelStocks != null}");
|
||||
//if (Status == 1)
|
||||
//{
|
||||
// if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 1)
|
||||
// {
|
||||
// channelStocks.ForEach(it => it.process = 2);
|
||||
// }
|
||||
//}
|
||||
|
||||
break;
|
||||
// 抽屉关闭
|
||||
case EventType.DRAWERCLOSE:
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 2)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 3);
|
||||
}
|
||||
//if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 2)
|
||||
//{
|
||||
// channelStocks.ForEach(it => it.process = 3);
|
||||
//}
|
||||
IGrouping<int, ChannelStock> groupingBefore = enumerator.Current;
|
||||
int DrawerNoBefore = groupingBefore.Key;
|
||||
if (enumerator.MoveNext())
|
||||
|
|
|
@ -62,23 +62,24 @@ namespace DM_Weight.ViewModels
|
|||
case EventType.DRAWEROPEN:
|
||||
|
||||
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 1)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 2);
|
||||
}
|
||||
}
|
||||
logger.Info($"抽屉打开,channelStocks{channelStocks != null}");
|
||||
//if (Status == 1)
|
||||
//{
|
||||
// if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 1)
|
||||
// {
|
||||
// channelStocks.ForEach(it => it.process = 2);
|
||||
// }
|
||||
//}
|
||||
|
||||
break;
|
||||
// 抽屉关闭
|
||||
case EventType.DRAWERCLOSE:
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 2)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 3);
|
||||
}
|
||||
//if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 2)
|
||||
//{
|
||||
// channelStocks.ForEach(it => it.process = 3);
|
||||
//}
|
||||
IGrouping<int, ChannelStock> groupingBefore = enumerator.Current;
|
||||
int DrawerNoBefore = groupingBefore.Key;
|
||||
if (enumerator.MoveNext())
|
||||
|
|
Loading…
Reference in New Issue