优化数量计算时候的卡顿问题
This commit is contained in:
1 parent
9ddc4c3640
commit
c8adf98ae5
8 files changed
+382
-219
No files matched your search
@@ -126,18 +126,22 @@ namespace TemuKJD.ToolForms
|
||||
{
|
||||
for (int i = 3; i > 0; i--)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pnlMask.Visible = true;
|
||||
this.pnlMask.Text = "自动拍单倒计时\r\n" + i;
|
||||
}));
|
||||
if (this.Created)
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pnlMask.Visible = true;
|
||||
this.pnlMask.Text = "自动拍单倒计时\r\n" + i;
|
||||
}));
|
||||
else
|
||||
break;
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pnlMask.Visible = false;
|
||||
}));
|
||||
if (this.Created)
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.pnlMask.Visible = false;
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -470,6 +474,9 @@ namespace TemuKJD.ToolForms
|
||||
var oneGoodsPrice = BaseRegex.GetIntJson(ref data, "goodsPrice");
|
||||
var buyCnt = BaseRegex.GetIntJson(ref data, "goods_number");
|
||||
var buyPrice = BaseRegex.GetIntJson(ref data, "pay_price");
|
||||
|
||||
if (!this.Created)
|
||||
return;
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
if (!goodsId.IsNullOrZero()) this.txtBuyGoodsId.Text = goodsId.ParseToString();
|
||||
@@ -480,7 +487,9 @@ namespace TemuKJD.ToolForms
|
||||
if (!buyPrice.IsNullOrZero()) this.txtBuyPrice.Text = (buyPrice * 0.01m).ParseToString();
|
||||
}));
|
||||
|
||||
Invoke(new Action(() =>
|
||||
if (!this.Created)
|
||||
return;
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
if (BuyType == "direct" && txtBuyTransitWarehouse.Text.Contains("******"))
|
||||
{
|
||||
@@ -653,6 +662,8 @@ namespace TemuKJD.ToolForms
|
||||
//}
|
||||
})();";
|
||||
var ts1 = client.Runtime.EvaluateAsync(jsStr1, null, true, null, null, true, null, true);
|
||||
if (!this.Created)
|
||||
return "窗口已关闭";
|
||||
ts1.Wait(5000);
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
@@ -680,7 +691,10 @@ namespace TemuKJD.ToolForms
|
||||
ts1 = client.Runtime.EvaluateAsync(jsStr1, null, true, null, null, true, null, true);
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
if (ts1.Result.Result.Value is string rstStr)
|
||||
if (!this.Created)
|
||||
return "窗口已关闭";
|
||||
|
||||
if (ts1.Result.Result.Value is string rstStr)
|
||||
{
|
||||
if (rstStr == "success")
|
||||
break;
|
||||
@@ -739,8 +753,10 @@ namespace TemuKJD.ToolForms
|
||||
}
|
||||
ts1 = client.Runtime.EvaluateAsync(jsStr1, null, true, null, null, true, null, true);
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
if (ts1.Result.Result.Value is string rstStr)
|
||||
{
|
||||
if (!this.Created)
|
||||
return "窗口已关闭";
|
||||
if (ts1.Result.Result.Value is string rstStr)
|
||||
{
|
||||
if (rstStr == "success")
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user