o
asmrobot
2019-10-27 c4bd9d8c587bd1401f0fb2f60c34a4964d7afe20
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);