From f25f89101a98ad815c0ae2d25e1a8dc35d53a5dd Mon Sep 17 00:00:00 2001
From: asmrobot <asmrobot@hotmail.com>
Date: Tue, 29 Oct 2019 13:55:37 +0000
Subject: [PATCH] format state machine

---
 src/RichCreator.Utility/CV/GroupCVHelper.cs |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/src/RichCreator.Utility/CV/GroupCVHelper.cs b/src/RichCreator.Utility/CV/GroupCVHelper.cs
index 1d5b4aa..52360e4 100644
--- a/src/RichCreator.Utility/CV/GroupCVHelper.cs
+++ b/src/RichCreator.Utility/CV/GroupCVHelper.cs
@@ -204,6 +204,42 @@
             return true;
         }
 
+        //邀请入门标题文字
+        private static ColorArray YaoqingZuduiWindowTitle = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "1162,491,255,255,255$1163,481,255,255,255$1162,480,255,255,255$1162,484,255,255,255$1163,484,255,255,255$1163,487,255,255,255$1163,490,255,255,255$1164,491,255,255,255$1167,491,255,255,255$1172,491,255,255,255$1172,490,255,255,255$1171,489,255,255,255$1169,489,255,255,255$1170,488,255,255,255$1170,487,255,255,255$1171,486,255,255,255$1171,482,255,255,255$1172,482,255,255,255$1169,482,255,255,255$1169,480,255,255,255$1166,480,255,255,255$1166,481,255,255,255$1165,481,255,255,255$1167,481,255,255,255$1167,483,255,255,255$1165,483,255,255,255$1165,485,255,255,255$1167,485,255,255,255$1166,487,255,255,255$1164,487,255,255,255$1168,487,255,255,255$1167,489,255,255,255$1175,491,255,255,255$1176,490,255,255,255$1175,487,255,255,255$1175,484,255,255,255$1174,484,255,255,255$1174,480,255,255,255$1175,481,255,255,255$1177,481,255,255,255$1180,481,255,255,255$1180,480,255,255,255$1183,481,255,255,255$1184,481,255,255,255$1205,480,255,255,255$1205,485,255,255,255$1204,486,255,255,255$1204,488,255,255,255$1203,489,255,255,255$1203,490,255,255,255$1202,491,255,255,255$1208,491,255,255,255$1207,490,255,255,255$1206,486,255,255,255$1198,485,255,255,255$1200,485,255,255,255$1201,488,255,255,255$1198,488,255,255,255$1198,491,255,255,255$1200,489,255,255,255");
+        //申请入门文字
+        private static ColorArray ShengqingruduiText = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "1239,637,221,197,147$1137,627,221,197,147$1136,626,221,197,147$1135,630,221,197,147$1137,630,221,197,147$1137,633,221,197,147$1137,636,221,197,147$1138,635,221,197,147$1144,633,221,197,147$1145,632,221,197,147$1145,637,221,197,147$1151,637,221,197,147$1157,637,221,197,147$1157,636,221,197,147$1157,635,221,197,147$1159,636,221,197,147$1161,636,221,197,147$1162,635,221,197,147$1163,635,221,197,147$1164,634,221,197,147$1167,634,221,197,147$1171,635,221,197,147$1175,635,221,197,147$1175,637,221,197,147$1179,635,221,197,147$1179,628,221,197,147$1171,628,221,197,147$1175,626,221,197,147$1181,626,221,197,147$1182,627,221,197,147$1182,637,221,197,147$1183,636,221,197,147$1185,637,221,197,147$1189,637,221,197,147$1190,637,221,197,147$1190,636,221,197,147$1191,631,221,197,147$1231,626,221,197,147$1231,627,221,197,147$1230,628,221,197,147$1230,629,221,197,147$1230,630,221,197,147$1229,630,221,197,147$1230,637,221,197,147$1230,632,221,197,147$1233,631,221,197,147$1238,631,221,197,147$1238,637,221,197,147$1232,637,221,197,147");
+        /// <summary>
+        /// 查找邀请组队窗口
+        /// </summary>
+        /// <param name="yesPoint"></param>
+        /// <param name="noPoint"></param>
+        /// <param name="limitRect"></param>
+        /// <returns></returns>
+        public static bool FindYaoqingZuduiWindow(out Structs.ZTPoint yesPoint,out Structs.ZTPoint noPoint, ZTRectangle limitRect)
+        {
+            ZTRectangle textRect = ZTRectangle.Empty;
+            yesPoint = Structs.ZTPoint.Empty;
+            noPoint = Structs.ZTPoint.Empty;
+            Image<Rgb, byte> image = ScreenCapture.Instance.CaptureScreenReturnImage();
+
+            if (!CVHelper.FindColorArray(out textRect, image, YaoqingZuduiWindowTitle, limitRect))
+            {
+                return false;
+            }
+
+            ZTRectangle shengqingTextRect = ZTRectangle.Empty;
+            if (!CVHelper.FindColorArray(out shengqingTextRect, image, ShengqingruduiText, limitRect))
+            {
+                return false;
+            }
+
+            Structs.ZTPoint center = textRect.GetCenterPoint();
+            yesPoint = new Structs.ZTPoint(center.X - 28, center.Y + 186);
+            noPoint = new Structs.ZTPoint(center.X + 28, center.Y + 186);
+            return true;
+        }
+
+
         /// <summary>
         /// 频道项
         /// </summary>

--
Gitblit v1.9.3