From 589ed88a5924a7494e21b95b6bbff5e46ff49ddd Mon Sep 17 00:00:00 2001
From: asmrobot <asmrobot@hotmail.com>
Date: Thu, 21 Nov 2019 01:08:42 +0000
Subject: [PATCH] kalete map

---
 src/RichCreator/Maps/Test/TestMap.cs |   38 +++++---------------------------------
 1 files changed, 5 insertions(+), 33 deletions(-)

diff --git a/src/RichCreator/Maps/Test/TestMap.cs b/src/RichCreator/Maps/Test/TestMap.cs
index 63b8efa..9e17c34 100644
--- a/src/RichCreator/Maps/Test/TestMap.cs
+++ b/src/RichCreator/Maps/Test/TestMap.cs
@@ -28,14 +28,11 @@
 
         }
         
-        private const bool isCreateGroup = true;
-        
         public override ZTResult Start(Int32 runningStep)
-        {WindowUtils.SetDnfToTop();
+        {
+            WindowUtils.SetDnfToTop();
 
-            
-           
-
+            const bool isCreateGroup = true;
             string groupName = "aabbccddee";
             if (isCreateGroup)
             {
@@ -57,7 +54,7 @@
             }
             //沉默一段时间
             Thread.Sleep(50000000);
-            CloseAllAlertWindow(this.CancelToken, this.GameRect);
+            CloseAllAlertWindowByX(this.CancelToken, this.GameRect);
             return ZTResult.Success;
         }
         
@@ -233,7 +230,7 @@
             ZTRectangle innerGroupWindowTextRect = ZTRectangle.Empty, innerSearchButtonRect = ZTRectangle.Empty, innerCreateGroupButton = ZTRectangle.Empty;
             for (int i = 0; i < 2; i++)
             {
-                CloseAllAlertWindow(this.CancelToken, this.GameRect);
+                CloseAllAlertWindowByX(this.CancelToken, this.GameRect);
                 G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.RightSquarebrackets);
 
                 bool result = FuncUtils.TimeoutCancelableWrap(5000, this.CancelToken, () => {
@@ -296,31 +293,6 @@
             return false;
         }
         
-        /// <summary>
-        /// 关闭所有弹出窗
-        /// </summary>
-        /// <param name="cancelToken"></param>
-        /// <param name="gameRect"></param>
-        /// <returns></returns>
-        private void CloseAllAlertWindow(CancellationToken cancelToken, ZTRectangle gameRect)
-        {
-            while (!cancelToken.IsCancellationRequested)
-            {
-                //G.Instance.InputControl.MoveTo(gameRect.Start.X,gameRect.Start.Y, false, false, false);
-                //Thread.Sleep(10);
-                //截图
-                Image<Rgb, byte> image = ScreenCapture.Instance.CaptureScreenReturnImage();
-
-                ZTRectangle closeButtonRect = ZTRectangle.Empty;
-                if (!DnfCVHelper.GetAlertWindow(out closeButtonRect, image, gameRect))
-                {
-                    return;
-                }
-
-                G.Instance.InputControl.MoveToAndClick(closeButtonRect.GetCenterPoint());
-                Thread.Sleep(500);
-            }
-        }
        
     }
 }

--
Gitblit v1.9.3