From c4bd9d8c587bd1401f0fb2f60c34a4964d7afe20 Mon Sep 17 00:00:00 2001
From: asmrobot <asmrobot@hotmail.com>
Date: Sun, 27 Oct 2019 16:02:50 +0000
Subject: [PATCH] o

---
 src/RichCreator/Jobs/WeGameJob.cs |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/RichCreator/Jobs/WeGameJob.cs b/src/RichCreator/Jobs/WeGameJob.cs
index 5a06ee1..f28c2db 100644
--- a/src/RichCreator/Jobs/WeGameJob.cs
+++ b/src/RichCreator/Jobs/WeGameJob.cs
@@ -28,9 +28,8 @@
         private string UserName;
         private string Password;
 
-        public override bool DoWork(out bool tryAgain, CancellationToken cancellationToken,Int32 runningStep)
+        public override ZTResult Do(CancellationToken cancellationToken,Int32 runningStep)
         {
-            tryAgain = true;
             
             Process.Start(this.Config.TGPDaemonPath);
             G.Instance.InfoWriter("等待We Game运行");
@@ -42,7 +41,7 @@
             if (!result)
             {
                 G.Instance.InfoWriter("查找游戏失败");
-                return false;
+                return ZTResult.Failed;
             }
 
             G.Instance.InfoWriter("WeGame于:" + weGameRect.ToString() + ",切换按钮于:" + changeLoginMethodButtonRect.ToString());
@@ -52,7 +51,7 @@
             if (!result)
             {
                 G.Instance.InfoWriter("登陆失败");
-                return false;
+                return ZTResult.Failed;
             }
             G.Instance.InfoWriter("WeGame登陆成功");
             
@@ -61,11 +60,11 @@
             if (!result)
             {
                 G.Instance.InfoWriter("DNF未成功打开");
-                return false;
+                return ZTResult.Failed;
             }
             G.Instance.InfoWriter("开始启动DNF游戏");
 
-            return true;
+            return ZTResult.Success;
         }
         
 
@@ -102,11 +101,11 @@
         private bool LoginWeGame(CancellationToken cancelToken, Int64 timeoutSecond, ZTRectangle weGameRect, ZTRectangle changButtonRect)
         {
 
-            ZTPoint basePoint = changButtonRect.GetCenterPoint();
+            Utility.Structs.ZTPoint basePoint = changButtonRect.GetCenterPoint();
 
-            ZTPoint userPoint = new ZTPoint(basePoint.X, basePoint.Y - 148);
-            ZTPoint pwdPoint = new ZTPoint(basePoint.X, basePoint.Y - 118);
-            ZTPoint loginPoint = new ZTPoint(basePoint.X, basePoint.Y - 42);
+            Utility.Structs.ZTPoint userPoint = new Utility.Structs.ZTPoint(basePoint.X, basePoint.Y - 148);
+            Utility.Structs.ZTPoint pwdPoint = new Utility.Structs.ZTPoint(basePoint.X, basePoint.Y - 118);
+            Utility.Structs.ZTPoint loginPoint = new Utility.Structs.ZTPoint(basePoint.X, basePoint.Y - 42);
             
             //输入用户名
             G.Instance.InputControl.MoveToAndClick(userPoint);

--
Gitblit v1.9.3