把绑定的数据的计算移动到线程里

This commit is contained in:
wule_5900x committed 2026-10-17 15:33:24 +08:00
1 parent 2f9c98b105
commit b827c6e118
14 files changed
+350 -144

No files matched your search

@@ -54,6 +54,8 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
/// </summary>
public partial class PDDBuyerOrderReadCtrl : UserControl
{
private static readonly object locker = new object();
Dictionary<BuyerLoginInfo, PddPickInfo> dicPddPickInfo = new Dictionary<BuyerLoginInfo, PddPickInfo>();
ConcurrentList<yh_sync_logistics> lstSyncLogistics = new ConcurrentList<yh_sync_logistics>();
@@ -1132,7 +1134,21 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
}
bool isUpdate = false;
PddBuyerAfterSaleLiteInfo afterSale = lstPddBuyerAfterSaleInfoLite.ToList().FirstOrDefault(aft => aft.afterSalesId == af.afterSalesId);
PddBuyerAfterSaleLiteInfo afterSale = null;
//lock (locker)
var success = false;
for (int i = 0; i < 10 && success == false; i++)
{
Thread.Sleep(1);
try
{
afterSale = lstPddBuyerAfterSaleInfoLite.ToList().FirstOrDefault(aft => aft.afterSalesId == af.afterSalesId);
success = true;
}
catch
{
}
}
if (afterSale == null)
{
isUpdate = true;