| | |
| | | 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运行"); |
| | |
| | | if (!result) |
| | | { |
| | | G.Instance.InfoWriter("查找游戏失败"); |
| | | return false; |
| | | return ZTResult.Failed; |
| | | } |
| | | |
| | | G.Instance.InfoWriter("WeGame于:" + weGameRect.ToString() + ",切换按钮于:" + changeLoginMethodButtonRect.ToString()); |
| | |
| | | if (!result) |
| | | { |
| | | G.Instance.InfoWriter("登陆失败"); |
| | | return false; |
| | | return ZTResult.Failed; |
| | | } |
| | | G.Instance.InfoWriter("WeGame登陆成功"); |
| | | |
| | |
| | | if (!result) |
| | | { |
| | | G.Instance.InfoWriter("DNF未成功打开"); |
| | | return false; |
| | | return ZTResult.Failed; |
| | | } |
| | | G.Instance.InfoWriter("开始启动DNF游戏"); |
| | | |
| | | return true; |
| | | return ZTResult.Success; |
| | | } |
| | | |
| | | |
| | |
| | | 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); |