pry há 2 anos
ascendente
cometimento
63d8cf9bc5
2 ficheiros alterados com 10 adições e 3 eliminações
  1. +8
    -3
      HKCardOUT/ViewModels/AdWindowViewModel.cs
  2. +2
    -0
      HKCardOUT/Views/AdWindow.xaml.cs

+ 8
- 3
HKCardOUT/ViewModels/AdWindowViewModel.cs Ver ficheiro

@@ -23,7 +23,7 @@ namespace HKCardOUT.ViewModels
{
Foods.Add("");
}
}

#region 属性
@@ -61,7 +61,8 @@ namespace HKCardOUT.ViewModels
{
FoodsInit(BindScreen);

ThreadManage.GetInstance().StartLong(() => {
ThreadManage.GetInstance().StartLong(() =>
{
if (DateTime.Now.Hour == 16)
{
LAdInfo.AInfo = new ObservableCollection<ScreenInfoDto>();
@@ -115,7 +116,7 @@ namespace HKCardOUT.ViewModels
data.UserName = DataBus.UserListDto
.Where(t => t.Cards.Select(x => x.CardNum).Contains(data.CardNo))
.Select(x => x.Name).FirstOrDefault();
HKLog.HKLogImport.WriteInfo("取出刷卡信息" + data.ToJsonString());
App.Current.Dispatcher.Invoke(() =>
{
if (LAdInfo.Info != null && !string.IsNullOrEmpty(LAdInfo.Info.UserName))
@@ -128,6 +129,10 @@ namespace HKCardOUT.ViewModels
}
}
}
else
{
HKLog.HKLogImport.WriteInfo("未包含屏幕" + BindScreen[i]);
}
}
Thread.Sleep(10);
}, $"屏幕刷卡信息{BindScreen[0]}-{BindScreen[1]}", true);


+ 2
- 0
HKCardOUT/Views/AdWindow.xaml.cs Ver ficheiro

@@ -52,8 +52,10 @@ namespace HKCardOUT.Views
{
if (DataBus.saleLogDtos.Count > 0)
{
HKLog.HKLogImport.WriteInfo("添加刷卡信息");
if (DataBus.saleLogDtos.TryDequeue(out SaleLogDto info))
{
HKLog.HKLogImport.WriteInfo("取出信息加入队列");
if (!DataBus.SaleLogDtoList.ContainsKey(info.Location))
DataBus.SaleLogDtoList.TryAdd(info.Location, new ConcurrentQueue<SaleLogDto>());
DataBus.SaleLogDtoList[info.Location].Enqueue(info);


Carregando…
Cancelar
Guardar