From a17738e1545ff7dbef6398b8ec1eab93ab59c9a1 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 30 六月 2022 19:14:47 +0800
Subject: [PATCH] '功能完善'

---
 ConsoleApplication/main.cpp |   47 ++++++++++++++++++++++++-----------------------
 1 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/ConsoleApplication/main.cpp b/ConsoleApplication/main.cpp
index 58a73d5..b9877a4 100644
--- a/ConsoleApplication/main.cpp
+++ b/ConsoleApplication/main.cpp
@@ -20,7 +20,7 @@
 		//鍚岃姳椤�(v9.10.50) - 娣卞湷Level-2鍒嗘椂璧板娍
 		//鍚岃姳椤�(v9.10.50) - pppp
 		list<TradeData>  map = creenDataCapture->captureLevel2TradeData(cv::imread( "C:\\Users\\Administrator\\Desktop\\ocr\\demo\\0_388.jpg"),p);
-		break;
+		//break;
 	}
 
 	return 0L;
@@ -90,12 +90,30 @@
 }
 */
 
+void notify(int index,string code, list<TradeData> data,void *context) {
+	cout << index << endl;
+}
+
 int main() {
-	//THSActionUtil::openSecondScreen();
+	ImgUtil::init();
+
+	ScreenDataCapture* capture = new ScreenDataCapture();
+	capture->init(notify,nullptr);
+	capture->start();
+	capture->startAll();
+	/*
 	RecognitionUtil::init();
 	CaptureUtil::init("鍚岃姳椤�(v9.10.50) - 鐑棬鑲�888");// 鐑棬鑲�888
 	ImgUtil::init();
-	ths();
+	std::list<string> codeList;
+	codeList.push_back("000333");
+	bool setResult = THSActionUtil::setListenL2GP(4,"000333");
+	printf("璁剧疆鑲$エ浠g爜缁撴灉锛�%d\n", setResult);
+		cv::waitKey(0);
+	cv::destroyAllWindows();
+	return 0;
+
+	*/
 
 	/*
 	RecognitionManager* recognitionManager = new RecognitionManager();
@@ -114,26 +132,9 @@
 	}
 	*/
 
-
-	cv::waitKey(0);
-	cv::destroyAllWindows();
-	return 0;
-		
-	
-	
-	string path = "C:\\Users\\Administrator\\Desktop\\ocr\\temp.jpg";
-	
-
-	cv::Mat img = CaptureUtil::capture(HWND(0x00010CA6));
-	cv::imwrite(path, img);
-	
-
-
-	//return 0;
-	
+	/*
 	
 	RecognitionUtil::init();
-	CaptureUtil::init("鍚岃姳椤�(v9.10.50) - 鐑棬鑲�888");// 鐑棬鑲�888
 	ImgUtil::init();
 	for (int i = 0;i < 1;i++)
 	{
@@ -144,7 +145,8 @@
 	
 
 	system("PAUSE");
-
+	*/
+	system("PAUSE");
 	cv::waitKey(0);
 	cv::destroyAllWindows();
 
@@ -153,7 +155,6 @@
 
 int main__() {
 
-	CaptureUtil::init("鍚岃姳椤�(v9.10.50) - 鎴戠殑椤甸潰13");
 	for (int i =5;i < 6;i++)
 	{
 	 cv::Mat img=	CaptureUtil::capture(1);

--
Gitblit v1.8.0