From 87e279ae8fdc2bcf544724caa9855c54ee88efe0 Mon Sep 17 00:00:00 2001 From: MistEO Date: Tue, 28 Sep 2021 23:27:44 +0800 Subject: [PATCH] =?UTF-8?q?fix.=E4=BF=AE=E5=A4=8D=E6=8E=89=E7=BA=BF?= =?UTF-8?q?=E9=87=8D=E8=BF=9E=E7=9A=84=E8=AF=86=E5=88=AB=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/tasks.json | 23 +++++++++++++++++++++-- src/MeoAsstGui/Helper/AsstProxy.cs | 8 +++++++- src/MeoAsstGui/MeoAsstGui.csproj | 3 +-- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/resource/tasks.json b/resource/tasks.json index 4c6549a2d5..4125d2915d 100644 --- a/resource/tasks.json +++ b/resource/tasks.json @@ -10,6 +10,7 @@ "UseMedicine", "UseStone", "EndOfAction", + "PrtsErrorConfirm", "OfflineConfirm", "StartToWakeUp", "TodaysSupplies", @@ -64,6 +65,7 @@ "PRTS", "PrtsErrorConfirm", "EndOfAction", + "OfflineConfirm", "WaitAfterPRTS" ] }, @@ -174,21 +176,38 @@ }, "PrtsErrorConfirm": { "template": "PrtsErrorConfirm.png", + "templThreshold": 0.8, + "cache": false, "action": "doNothing", "next": [ - "AbandonAction" + "AbandonAction", + "OfflineConfirmAfterBattle" ] }, "AbandonAction": { "template": "AbandonAction.png", "action": "clickSelf", + "cache": false, "reduceOtherTimes": [ "StartButton1", "StartButton2", "Loading" ], "next": [ - "EndOfAction" + "EndOfAction", + "StartToWakeUp", + "OfflineConfirm" + ] + }, + "OfflineConfirmAfterBattle": { + "template": "PopupConfirm.png", + "action": "clickSelf", + "cache": false, + "next": [ + "PRTS", + "PrtsErrorConfirm", + "OfflineConfirm", + "StartToWakeUp" ] }, "OfflineConfirm": { diff --git a/src/MeoAsstGui/Helper/AsstProxy.cs b/src/MeoAsstGui/Helper/AsstProxy.cs index ab0ac8f80e..c6ccc389b7 100644 --- a/src/MeoAsstGui/Helper/AsstProxy.cs +++ b/src/MeoAsstGui/Helper/AsstProxy.cs @@ -4,6 +4,7 @@ using Stylet; using StyletIoC; using System; using System.Runtime.InteropServices; +using System.Threading.Tasks; using System.Windows; namespace MeoAsstGui @@ -154,8 +155,13 @@ namespace MeoAsstGui mfvm.RunStatus = "出现错误,已停止运行"; break; } + ++_retryTimes; - AsstStartSanity(); + Task.Run(() => + { + AsstStop(); + AsstStartSanity(); + }); } } break; diff --git a/src/MeoAsstGui/MeoAsstGui.csproj b/src/MeoAsstGui/MeoAsstGui.csproj index 394a12cbae..22c2962b44 100644 --- a/src/MeoAsstGui/MeoAsstGui.csproj +++ b/src/MeoAsstGui/MeoAsstGui.csproj @@ -326,7 +326,6 @@ - - + xcopy /e /y /i /c $(SolutionDir)resource $(TargetDir)resource \ No newline at end of file