admin
2025-04-08 5c9991be21f57781573f04961ec511ac2938ea3d
'功能完善'
143个文件已添加
37个文件已修改
6791 ■■■■■ 已修改文件
DelegateQueue/DataStruct.h 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DelegateQueue/MainFrame.cpp 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DelegateQueue/TradeQueueFrame.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DelegateQueue/config.cfg 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DelegateQueue/main.cpp 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/CSettingDlg.cpp 565 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/CSettingDlg.h 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/ConfigUtil.cpp 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/ConfigUtil.h 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/DataStruct.h 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/DealQueueDlg.cpp 384 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/DealQueueDlg.h 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/FloatTrade.aps 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/FloatTrade.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/FloatTrade.rc 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/FloatTrade.vcxproj 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/FloatTrade.vcxproj.filters 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/FloatTrade.vcxproj.user 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/FloatTradeDlg.cpp 318 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/FloatTradeDlg.h 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/ImgDivider.cpp 211 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/ImgDivider.h 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/PositionDlg.cpp 229 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/PositionDlg.h 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/QueueListCtrl.cpp 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/QueueListCtrl.h 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/SellManager.cpp 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/SellStruct.h 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/ThsCodeOCR.cpp 206 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/ThsCodeOCR.h 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/archive.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/bz2.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/concrt140d.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/gif.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/jpeg62.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/leptonica-1.84.1d.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/libcrypto-3-x64.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/libcurl-d.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/liblzma.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/libpng16d.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/libsharpyuv.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/libwebp.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/libwebpmux.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/lz4.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/opencv_world455d.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/openjp2.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/resource.h 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/ScrollView.jar 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/alto 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/ambigs.train 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/api_config 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/bigram 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/box.train 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/box.train.stderr 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/digits 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/get.images 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/hocr 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/inter 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/kannada 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/linebox 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/logfile 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/lstm.train 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/lstmbox 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/lstmdebug 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/makebox 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/page 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/pdf 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/quiet 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/rebox 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/strokewidth 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/tsv 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/txt 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/unlv 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/configs/wordstrbox 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/eng.traineddata 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/jaxb-api-2.3.1.jar 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/osd.traineddata 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/pdf.ttf 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/piccolo2d-core-3.0.1.jar 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/piccolo2d-extras-3.0.1.jar 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/tessconfigs/batch 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/tessconfigs/batch.nochop 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/tessconfigs/matdemo 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/tessconfigs/msdemo 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/tessconfigs/nobatch 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tessdata/tessconfigs/segdemo 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tesseract55.lib 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tesseract55d.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/tiffd.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/win32_screen_shots.cpp 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/win32_screen_shots.h 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/zlib1.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/zlibd1.dll 补丁 | 查看 | 原始文档 | blame | 历史
FloatTrade/zstd.dll 补丁 | 查看 | 原始文档 | blame | 历史
Monitor/Monitor.aps 补丁 | 查看 | 原始文档 | blame | 历史
Monitor/Monitor.rc 补丁 | 查看 | 原始文档 | blame | 历史
Monitor/MonitorDlg.cpp 144 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Monitor/MonitorDlg.h 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Monitor/resource.h 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Setup/Setup.vdproj 1610 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
TradeDesk.sln 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
TradeRecord/ConfigUtil.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
TradeRecord/TradeRecord.vcxproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
TradeRecord/TradeRecordDlg.cpp 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
TradeRecord/config.cfg 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
TradeRecordSetup/TradeRecordSetup.vdproj 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/StringUtil.h 155 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/TimeUtil.h 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/WechatHelper.aps 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/WechatHelper.cpp 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/WechatHelper.h 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/WechatHelper.rc 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/WechatHelper.vcxproj 229 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/WechatHelper.vcxproj.filters 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/WechatHelper.vcxproj.user 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/WechatHelperDlg.cpp 178 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/WechatHelperDlg.h 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/WechatOCR.cpp 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/WechatOCR.h 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/Win32Util.cpp 249 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/Win32Util.h 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/framework.h 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/opencv_world455d.dll 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/pch.cpp 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/pch.h 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/res/WechatHelper.ico 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/res/WechatHelper.rc2 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/resource.h 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/targetver.h 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/ScrollView.jar 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/chi_sim.traineddata 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/chi_sim_vert.traineddata 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/chi_tra.traineddata 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/chi_tra_vert.traineddata 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/alto 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/ambigs.train 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/api_config 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/bigram 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/box.train 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/box.train.stderr 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/digits 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/get.images 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/hocr 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/inter 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/kannada 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/linebox 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/logfile 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/lstm.train 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/lstmbox 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/lstmdebug 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/makebox 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/page 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/pdf 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/quiet 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/rebox 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/strokewidth 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/tsv 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/txt 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/unlv 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/configs/wordstrbox 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/eng.traineddata 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/jaxb-api-2.3.1.jar 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/osd.traineddata 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/pdf.ttf 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/piccolo2d-core-3.0.1.jar 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/piccolo2d-extras-3.0.1.jar 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/tessconfigs/batch 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/tessconfigs/batch.nochop 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/tessconfigs/matdemo 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/tessconfigs/msdemo 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/tessconfigs/nobatch 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tessdata/tessconfigs/segdemo 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tesseract55.lib 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/tesseract55d.dll 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/win32_screen_shots.cpp 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WechatHelper/win32_screen_shots.h 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/NetworkApi.cpp 204 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/NetworkApi.h 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/StringUtil.h 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/TimeUtil.h 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DelegateQueue/DataStruct.h
@@ -39,4 +39,6 @@
    std::list<TradeQueue> tradeQueueList;
    wxString zyltgb;
    int mode;// 下单模式, 3-扫入下单
    wxString l_down_cancel_rate;// L下撤单比例
    wxString expire_rate;
};
DelegateQueue/MainFrame.cpp
@@ -95,7 +95,7 @@
        delegateInfoStr.Append("/").Append("封单").Append(delegateInfo.buy1_money);
        delegateInfoStr.Append(" 【比例: ");
        delegateInfoStr.Append(" 【排: ");
        ColorIndexInfo colorInfo2;
        colorInfo2.start_index = delegateInfoStr.Length();
@@ -103,6 +103,20 @@
        colorInfo2.end_index = delegateInfoStr.Length() - 1;
        colorInfo2.color = wxColor(206, 14, 95);
        delegateColors.push_back(colorInfo2);
        delegateInfoStr.Append(",撤:");
        ColorIndexInfo colorInfo22;
        colorInfo22.start_index = delegateInfoStr.Length();
        delegateInfoStr.Append(delegateInfo.l_down_cancel_rate);
        colorInfo22.end_index = delegateInfoStr.Length() - 1;
        colorInfo22.color = wxColor(0, 230, 0);
        delegateColors.push_back(colorInfo22);
        delegateInfoStr.Append(",期:");
        delegateInfoStr.Append(delegateInfo.expire_rate);
        delegateInfoStr.Append("】,");
        delegateInfoStr.Append("已成大单").Append(to_string(delegateInfo.big_num_count)).Append("笔").Append(delegateInfo.big_num_money).Append("  ");
@@ -350,6 +364,11 @@
        // 绘制简介区
        int infoWidth = cell.GetSize().GetWidth();
        wxFont font = dc->GetFont();
        font.SetPointSize(10);
        dc->SetFont(font);
        int infoHeight = WidgetsRenderUtil::drawText(dc, delegateInfoStr, wxPoint(start_x, start_y + 25 * DPI / 100), infoWidth, TEXT_LINE_HEIGHT, delegateColors);
        // 绘制队列,给文字信息留3排左右的位置
@@ -444,6 +463,11 @@
                    SendMessage(hwnd, WM_USER + 1024, 0, reinterpret_cast<LPARAM>(&data));
                }
            }
            else {
                throw CString(L"没找到盘副屏窗口");
            }
        }
        catch (CString msg) {
        }
        catch (...) {
        }
@@ -702,14 +726,16 @@
    list<DelegateInfo> fresults;
    wxString available_money = "";
    auto doc = JsonUtil::parseUTF16(result);
    if (doc.IsObject() && doc[L"code"].GetInt() == 0) {
    if (doc.IsObject() && doc[L"code"].GetInt() == 0&& doc.HasMember(L"data")&& doc[L"data"].HasMember(L"delegates")) {
        auto root = doc[L"data"].GetObject();
        auto delegates = root[L"delegates"].GetArray();
        double money = root[L"account_available_money"].GetDouble();
        double money = 0.0;
        if (root.HasMember(L"account_available_money")) {
            money = root[L"account_available_money"].GetDouble();
        }
        available_money = StringUtil::to_string(money);
        for (int i = 0; i < delegates.Size(); i++) {
            auto doc = delegates[i].GetObject();
            auto array = doc[L"code_info"].GetArray();
            DelegateInfo delegateInfo;
            delegateInfo.index = i;
@@ -741,12 +767,26 @@
                delegateInfo.limit_up_time = doc[L"limit_up_time"].GetString();
            }
            array = doc[L"trade_queue"].GetArray();
            if (doc.HasMember(L"l_down_cancel_rate")) {
                wxString st = StringUtil::to_string(doc[L"l_down_cancel_rate"].GetFloat() * 100);
                st.Append(L"%");
                delegateInfo.l_down_cancel_rate = st;
            }
            if (doc.HasMember(L"expire_rate")) {
                wxString st = doc[L"expire_rate"].GetString();
                delegateInfo.expire_rate = st;
            }
            list<TradeQueue> queueList;
            for (int j = 0; j < array.Size(); j++) {
                int num = array[j].GetArray()[0].GetInt();
                int type = array[j].GetArray()[1].GetInt();
                queueList.push_back(TradeQueue({ to_string(num),type }));
            if (doc.HasMember(L"trade_queue")) {
                array = doc[L"trade_queue"].GetArray();
                for (int j = 0; j < array.Size(); j++) {
                    int num = array[j].GetArray()[0].GetInt();
                    int type = array[j].GetArray()[1].GetInt();
                    queueList.push_back(TradeQueue({ to_string(num),type }));
                }
            }
            delegateInfo.tradeQueueList = queueList;
@@ -815,10 +855,8 @@
            //cout << "刷新UI耗时:" << TimeUtil::getNowTimeStamp() - start_time << endl;
        }
    }
    catch (string st) {
    catch (... ) {
    }
}
void MainFrame::OnSelectionChanged(wxDataViewEvent& event)
DelegateQueue/TradeQueueFrame.cpp
@@ -3,6 +3,7 @@
#include <thread>
#include "MyConfigUtil.h"
#include "../common_nopch/Win32Util.h"
#include <atlstr.h>
TradeQueueFrame::TradeQueueFrame(const wxString& title, wxString code, wxPoint position, wxSize size) :wxFrame(NULL, wxID_ANY, title, position, size) {
@@ -180,7 +181,7 @@
                    }
                }
            }
            catch (string st) {
            catch (...) {
            }
        }
        count++;
DelegateQueue/config.cfg
@@ -1,2 +1,2 @@
trade_queue_window = "[\n    -1160,\n    329,\n    522,\n    466\n]";
main_window = "[\n    266,\n    251,\n    600,\n    660\n]";
trade_queue_window = "[\n    -1603,\n    547,\n    522,\n    466\n]";
main_window = "[\n    -1281,\n    146,\n    600,\n    785\n]";
DelegateQueue/main.cpp
@@ -1,11 +1,26 @@
#include<iostream>
#include <wx/wx.h>
#include <wx/log.h>
#include <fstream>
#include "MainFrame.h"
#include "MyConfigUtil.h"
LONG WINAPI UnhandledExceptionHandler(PEXCEPTION_POINTERS ExceptionInfo)
{
    std::ofstream logFile("app_log.txt", std::ios::app);
    if (logFile.is_open())
    {
        logFile << "Unhandled exception occurred!" << std::endl;
        logFile << "Exception code: " << std::hex << ExceptionInfo->ExceptionRecord->ExceptionCode << std::endl;
        logFile << "Exception address: " << std::hex << ExceptionInfo->ExceptionRecord->ExceptionAddress << std::endl;
        logFile.close();
    }
    return EXCEPTION_EXECUTE_HANDLER;
}
@@ -13,6 +28,8 @@
public:
    bool OnInit() {
        SetUnhandledExceptionFilter(UnhandledExceptionHandler);
    
        SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE);
        
FloatTrade/CSettingDlg.cpp
@@ -8,6 +8,7 @@
#include "../common/StringUtil.h"
#include "../common/NetworkApi.h"
#include "../common/JsonUtil.h"
#include "../common/TimeUtil.h"
#include "ConfigUtil.h"
#include <iostream>
#include <string>
@@ -15,6 +16,11 @@
#include <regex>
#include <iconv.h>
#include <thread>
#include "CCBBuyDlg.h"
#include "win32_screen_shots.h"
#include "ThsCodeOCR.h"
using namespace std;
// CSettingDlg 对话框
@@ -46,6 +52,10 @@
    ON_BN_CLICKED(btn_sure_network, &CSettingDlg::OnBnClickedsurenetwork)
    ON_BN_CLICKED(btn_radical_buy_block_count_sure, &CSettingDlg::OnBnClickedradicalbuyblockcountsure)
    ON_BN_CLICKED(btn_sure_trade_params_setting, &CSettingDlg::OnBnClickedsuretradeparamssetting)
    ON_BN_CLICKED(btn_sure_ocr, &CSettingDlg::OnBnClickedsureocr)
    ON_BN_CLICKED(btn_sure_ocr_test, &CSettingDlg::OnBnClickedsureocrtest)
    ON_BN_CLICKED(IDC_BUTTON_BUY_CB, &CSettingDlg::OnBnClickedButtonBuyCb)
    ON_BN_CLICKED(IDC_BUTTON1, &CSettingDlg::OnBnClickedButton1)
END_MESSAGE_MAP()
@@ -82,6 +92,18 @@
    ConfigUtil::setVolumesSetting(volumeList);
    ConfigUtil::setThsAutoRefreshTimeSpace(stoi(StringUtil::cstring2String(refreshSpace)));
    // 获取买入/卖出默认金额
    CString buyMoney, sellMoney;
    ((CEdit*)GetDlgItem(IDC_EDIT_DEFAULT_BUY_MONEY))->GetWindowTextW(buyMoney);
    ((CEdit*)GetDlgItem(IDC_EDIT_DEFAULT_SELL_MONEY))->GetWindowTextW(sellMoney);
    if (buyMoney.IsEmpty() || sellMoney.IsEmpty()) {
        AfxMessageBox(L"请设置默认买入/卖出金额");
        return;
    }
    ConfigUtil::setBuyMoney(stoi(StringUtil::cstring2String( buyMoney).c_str()));
    ConfigUtil::setSellMoney(stoi(StringUtil::cstring2String(sellMoney).c_str()));
    AfxMessageBox(L"保存成功", MB_ICONINFORMATION);
}
@@ -102,23 +124,27 @@
                auto normal = data["normal"].GetArray();;
                auto radical = data["radical"].GetArray();
                auto moneys_enum = data["moneys"].GetArray();
                auto default_buy_money = data["default_buy_money"].GetInt();
                settings.normalCount = normal[0].GetInt();
                settings.radicalCount = radical[0].GetInt();
                settings.defaultBuyMoney = default_buy_money;
                auto money_list = normal[1].GetArray();
                for (int i = 0; i < money_list.Size(); i++) {
                    auto item = money_list[i].GetArray();
                    settings.normalMoneyList.push_back(TimeMoney({ CString(item[0].GetString()),item[1].GetInt(), item[2].GetInt() }));
                    settings.normalMoneyList.push_back(TimeMoney({ CString(item[0].GetString()),item[1].GetInt(), item[2].GetInt(), item[3].GetInt() }));
                }
                money_list = radical[1].GetArray();
                for (int i = 0; i < money_list.Size(); i++) {
                    auto item = money_list[i].GetArray();
                    settings.radicalMoneyList.push_back(TimeMoney({ CString(item[0].GetString()),item[1].GetInt(), item[2].GetInt() }));
                    settings.radicalMoneyList.push_back(TimeMoney({ CString(item[0].GetString()),item[1].GetInt(), item[2].GetInt(), item[3].GetInt() }));
                }
                int moneys[] = { combo_normal_buy_money_1 ,combo_normal_buy_money_2 ,combo_normal_buy_money_3,combo_radical_buy_money_1 ,combo_radical_buy_money_2 ,combo_radical_buy_money_3 };
                for (int i = 0; i < 6; i++) {
                int moneys[] = { combo_normal_buy_money_1 ,combo_normal_buy_money_2 ,combo_normal_buy_money_3,combo_radical_buy_money_1 ,combo_radical_buy_money_2 ,combo_radical_buy_money_3, combo_default_buy_money };
                for (int i = 0; i < 7; i++) {
                    CComboBox* box = (CComboBox*)GetDlgItem(moneys[i]);
                    for (int i = 0; i < moneys_enum.Size(); i++) {
                        box->AddString(to_wstring(moneys_enum[i].GetInt()).c_str());
@@ -153,25 +179,46 @@
    }
    ((CEdit*)GetDlgItem(IDC_EDIT_DEFAULT_BUY_MONEY))->SetWindowTextW(to_wstring(ConfigUtil::getBuyMoney()).c_str());
    ((CEdit*)GetDlgItem(IDC_EDIT_DEFAULT_SELL_MONEY))->SetWindowTextW(to_wstring(ConfigUtil::getSellMoney()).c_str());
    try {
        requestRadicalBuyBlockCount();
    }
    catch (...) {
    }
    comboTradeMode.Clear();
    comboTradeMode.AddString(L"买所有");
    comboTradeMode.AddString(L"只买想买");
    comboTradeMode.AddString(L"只买辨识度");
    std::thread t1(requestTradeMode, this);
    std::thread t1(requestTradeParamsSettings, this);
    t1.detach();
    // 设置截图参数
    int ids[] = { IDC_EDIT_OCR_WINDOW_PARAMS_TOP, IDC_EDIT_OCR_WINDOW_PARAMS_WIDTH, IDC_EDIT_OCR_WINDOW_PARAMS_HEIGHT, IDC_EDIT_OCR_WINDOW_PARAMS_SCALE };
    // 设置默认参数
    ((CEdit*)GetDlgItem(ids[0]))->SetWindowTextW(L"10");
    ((CEdit*)GetDlgItem(ids[1]))->SetWindowTextW(L"300");
    ((CEdit*)GetDlgItem(ids[2]))->SetWindowTextW(L"50");
    ((CEdit*)GetDlgItem(ids[3]))->SetWindowTextW(L"1");
    try {
        OCRWindowParams params = ConfigUtil::getOCRWindowParams();
        ((CEdit*)GetDlgItem(ids[0]))->SetWindowTextW(to_wstring(params.top).c_str());
        ((CEdit*)GetDlgItem(ids[1]))->SetWindowTextW(to_wstring(params.width).c_str());
        ((CEdit*)GetDlgItem(ids[2]))->SetWindowTextW(to_wstring(params.height).c_str());
        ((CEdit*)GetDlgItem(ids[3]))->SetWindowTextW(CString( StringUtil::to_string(params.scale).c_str()));
    }
    catch (...) {
    }
    return TRUE;  // return TRUE unless you set the focus to a control
                  // 异常: OCX 属性页应返回 FALSE
@@ -194,6 +241,7 @@
            writer.String(StringUtil::cstring2String(timeMoney.time).c_str());
            writer.Int(timeMoney.money);
            writer.Int(timeMoney.count);
            writer.Int(timeMoney.defaultCount);
            writer.EndArray();
        }
@@ -210,12 +258,13 @@
            writer1.String(StringUtil::cstring2String(timeMoney.time).c_str());
            writer1.Int(timeMoney.money);
            writer1.Int(timeMoney.count);
            writer1.Int(timeMoney.defaultCount);
            writer1.EndArray();
        }
        writer1.EndArray();
        const char* radicalMoneyJson = buf1.GetString();
        NetworkApi::set_buy_money_and_count(settings.normalCount, string(normalMoneyJson), settings.radicalCount, string(radicalMoneyJson));
        NetworkApi::set_buy_money_and_count(settings.normalCount, string(normalMoneyJson), settings.radicalCount, string(radicalMoneyJson), settings.defaultBuyMoney);
        MessageBox(L"设置成功", L"提示");
    }
    catch (CString st) {
@@ -231,10 +280,12 @@
    int normal_times[] = { edit_normal_buy_money_time_1 ,edit_normal_buy_money_time_2 ,edit_normal_buy_money_time_3 };
    int normal_moneys[] = { combo_normal_buy_money_1 ,combo_normal_buy_money_2 ,combo_normal_buy_money_3 };
    int normal_counts[] = { edit_normal_buy_count_1 ,edit_normal_buy_count_2 ,edit_normal_buy_count_3 };
    int default_normal_counts[] = { edit_normal_buy_default_count_1 ,edit_normal_buy_default_count_2 ,edit_normal_buy_default_count_3 };
    int radical_times[] = { edit_radical_buy_money_time_1 ,edit_radical_buy_money_time_2 ,edit_radical_buy_money_time_3 };
    int radical_moneys[] = { combo_radical_buy_money_1 ,combo_radical_buy_money_2 ,combo_radical_buy_money_3 };
    int radical_counts[] = { edit_radical_buy_count_1 ,edit_radical_buy_count_2 ,edit_radical_buy_count_3 };
    int default_radical_counts[] = { edit_radical_buy_default_count_1 ,edit_radical_buy_default_count_2 ,edit_radical_buy_default_count_3 };
    CString normalCount;
@@ -263,6 +314,7 @@
        CString time;
        CString money;
        CString count;
        CString defaultCount;
        ((CEdit*)GetDlgItem(normal_times[i]))->GetWindowTextW(time);
        CComboBox* moneyCombo = ((CComboBox*)GetDlgItem(normal_moneys[i]));
@@ -271,6 +323,7 @@
        }
        ((CEdit*)GetDlgItem(normal_counts[i]))->GetWindowTextW(count);
        ((CEdit*)GetDlgItem(default_normal_counts[i]))->GetWindowTextW(defaultCount);
        if (!time.IsEmpty() && !money.IsEmpty() && !count.IsEmpty()) {
            if (!validTime(time)) {
@@ -282,7 +335,10 @@
            if (!StringUtil::isNumber(StringUtil::cstring2String(count))) {
                throw CString(L"最大买入数量格式错误(必须为正整数)");
            }
            settings.normalMoneyList.push_back(TimeMoney({ time,stoi(StringUtil::cstring2String(money).c_str()),stoi(StringUtil::cstring2String(count).c_str()) }));
            if (!StringUtil::isNumber(StringUtil::cstring2String(defaultCount))) {
                throw CString(L"默认金额买入数量格式错误(必须为正整数)");
            }
            settings.normalMoneyList.push_back(TimeMoney({ time,stoi(StringUtil::cstring2String(money).c_str()),stoi(StringUtil::cstring2String(count).c_str()),stoi(StringUtil::cstring2String(defaultCount).c_str()) }));
        }
    }
@@ -292,6 +348,7 @@
        CString time;
        CString money;
        CString count;
        CString defaultCount;
        ((CEdit*)GetDlgItem(radical_times[i]))->GetWindowTextW(time);
        CComboBox* moneyCombo = ((CComboBox*)GetDlgItem(radical_moneys[i]));
        if (moneyCombo->GetCurSel() >= 0) {
@@ -299,6 +356,8 @@
        }
        ((CEdit*)GetDlgItem(radical_counts[i]))->GetWindowTextW(count);
        ((CEdit*)GetDlgItem(default_radical_counts[i]))->GetWindowTextW(defaultCount);
        if (!time.IsEmpty() && !money.IsEmpty() && !count.IsEmpty()) {
@@ -311,9 +370,22 @@
            if (!StringUtil::isNumber(StringUtil::cstring2String(count))) {
                throw CString(L"最大买入数量格式错误(必须为正整数)");
            }
            settings.radicalMoneyList.push_back(TimeMoney({ time,stoi(StringUtil::cstring2String(money).c_str()),stoi(StringUtil::cstring2String(count).c_str()) }));
            if (!StringUtil::isNumber(StringUtil::cstring2String(defaultCount))) {
                throw CString(L"默认金额买入数量格式错误(必须为正整数)");
            }
            settings.radicalMoneyList.push_back(TimeMoney({ time,stoi(StringUtil::cstring2String(money).c_str()),stoi(StringUtil::cstring2String(count).c_str()),stoi(StringUtil::cstring2String(defaultCount).c_str()) }));
        }
    }
    CString default_buy_money;
    CComboBox* moneyCombo = ((CComboBox*)GetDlgItem(combo_default_buy_money));
    if (moneyCombo->GetCurSel() >= 0) {
        moneyCombo->GetLBText(moneyCombo->GetCurSel(), default_buy_money);
    }
    settings.defaultBuyMoney = stoi(StringUtil::cstring2String(default_buy_money).c_str());
    return settings;
}
@@ -325,11 +397,11 @@
    auto doc = JsonUtil::parseUTF16(result);
    if (doc.IsObject()) {
        if (doc[L"code"].GetInt() == 0) {
         auto array =    doc[L"data"].GetArray();
         for (int i = 0; i < array.Size(); i++) {
            auto item =  array[i].GetArray();
            mList.push_back(RadicalBuyBlockInfo({ item[0].GetString(),item[1].GetInt()}));
         }
            auto array = doc[L"data"].GetArray();
            for (int i = 0; i < array.Size(); i++) {
                auto item = array[i].GetArray();
                mList.push_back(RadicalBuyBlockInfo({ item[0].GetString(),item[1].GetInt() }));
            }
        }
    }
    int block_ids[] = { IDC_EDIT_RADICAL_BUY_BLOCK_1, IDC_EDIT_RADICAL_BUY_BLOCK_2, IDC_EDIT_RADICAL_BUY_BLOCK_3, IDC_EDIT_RADICAL_BUY_BLOCK_4 };
@@ -352,10 +424,13 @@
    int normal_times[] = { edit_normal_buy_money_time_1 ,edit_normal_buy_money_time_2 ,edit_normal_buy_money_time_3 };
    int normal_moneys[] = { combo_normal_buy_money_1 ,combo_normal_buy_money_2 ,combo_normal_buy_money_3 };
    int normal_counts[] = { edit_normal_buy_count_1 ,edit_normal_buy_count_2 ,edit_normal_buy_count_3 };
    int default_normal_counts[] = { edit_normal_buy_default_count_1 ,edit_normal_buy_default_count_2 ,edit_normal_buy_default_count_3 };
    int radical_times[] = { edit_radical_buy_money_time_1 ,edit_radical_buy_money_time_2 ,edit_radical_buy_money_time_3 };
    int radical_moneys[] = { combo_radical_buy_money_1 ,combo_radical_buy_money_2 ,combo_radical_buy_money_3 };
    int radical_counts[] = { edit_radical_buy_count_1 ,edit_radical_buy_count_2 ,edit_radical_buy_count_3 };
    int default_radical_counts[] = { edit_radical_buy_default_count_1 ,edit_radical_buy_default_count_2 ,edit_radical_buy_default_count_3 };
    editNormalBuyCount.SetWindowTextW(to_wstring(setting.normalCount).c_str());
    editRadicalBuyCount.SetWindowTextW(to_wstring(setting.radicalCount).c_str());
    int index = 0;
@@ -374,6 +449,9 @@
            }
        }
        ((CEdit*)GetDlgItem(normal_counts[index]))->SetWindowTextW(to_wstring(timeMoney.count).c_str());
        ((CEdit*)GetDlgItem(default_normal_counts[index]))->SetWindowTextW(to_wstring(timeMoney.defaultCount).c_str());
        index++;
    }
@@ -393,19 +471,137 @@
            }
        }
        ((CEdit*)GetDlgItem(radical_counts[index]))->SetWindowTextW(to_wstring(timeMoney.count).c_str());
        ((CEdit*)GetDlgItem(default_radical_counts[index]))->SetWindowTextW(to_wstring(timeMoney.defaultCount).c_str());
        index++;
    }
    // 设置默认买入金额
    CComboBox* box = (CComboBox*)GetDlgItem(combo_default_buy_money);
    int nCount = box->GetCount();
    for (int i = 0; i < nCount; i++)
    {
        CString strItem;
        box->GetLBText(i, strItem);
        if (stoi(StringUtil::cstring2String(strItem).c_str()) == setting.defaultBuyMoney) {
            box->SetCurSel(i);
            break;
        }
    }
}
void CSettingDlg::requestTradeMode(CSettingDlg* context)
void CSettingDlg::requestTradeParamsSettings(CSettingDlg* context)
{
    try {
        int mode = NetworkApi::get_buy_mode();
        context->comboTradeMode.SetCurSel(mode);
    }
    catch (...) {
    }
    try {
        string result = NetworkApi::get_place_order_settings();
        auto root = JsonUtil::parseUTF8(result);
        if (root.IsObject()) {
            if (root["code"].GetInt() == 0) {
                auto data = root["data"].GetObject();
                auto radical_buy = data["radical_buy"].GetObject();
                auto prices = radical_buy["price"].GetArray();
                auto zyltgb = radical_buy["zyltgb"].GetArray();
                auto market_strong = radical_buy["top_block_count_by_market_strong"].GetArray();
                auto special_codes_rank = radical_buy["special_codes_max_block_in_rank"].GetInt();
                auto ignore_block_in_market_strong = radical_buy["ignore_block_in_money_market_strong"].GetInt();
                // 买首封
                auto buy_first_limit_up = radical_buy["buy_first_limit_up"].GetInt();
                ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_PRICE_MIN))->SetWindowTextW(to_wstring(prices[0].GetInt()).c_str());
                ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_PRICE_MAX))->SetWindowTextW(to_wstring(prices[1].GetInt()).c_str());
                ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_ZYLTGB_MIN))->SetWindowTextW(to_wstring(zyltgb[0][0].GetArray()[0].GetInt()).c_str());
                ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_ZYLTGB_MAX))->SetWindowTextW(to_wstring(zyltgb[0][0].GetArray()[1].GetInt()).c_str());
                ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_PRICE_MIN_1))->SetWindowTextW(to_wstring(zyltgb[0][1].GetArray()[0].GetInt()).c_str());
                ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_PRICE_MAX_1))->SetWindowTextW(to_wstring(zyltgb[0][1].GetArray()[1].GetInt()).c_str());
                ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_ZYLTGB_MIN2))->SetWindowTextW(to_wstring(zyltgb[1][0].GetArray()[0].GetInt()).c_str());
                ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_ZYLTGB_MAX2))->SetWindowTextW(to_wstring(zyltgb[1][0].GetArray()[1].GetInt()).c_str());
                ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_PRICE_MIN_2))->SetWindowTextW(to_wstring(zyltgb[1][1].GetArray()[0].GetInt()).c_str());
                ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_PRICE_MAX_2))->SetWindowTextW(to_wstring(zyltgb[1][1].GetArray()[1].GetInt()).c_str());
                ((CEdit*)context->GetDlgItem(IDC_EDIT_IGNORE_BLOCK_IN_MARKET_STRONG))->SetWindowTextW(to_wstring(ignore_block_in_market_strong).c_str());
                if (market_strong.Size() > 0) {
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_1))->SetWindowTextW(to_wstring(market_strong[0][0].GetInt()).c_str());
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_1))->SetWindowTextW(to_wstring(market_strong[0][1].GetInt()).c_str());
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_1))->SetWindowTextW(to_wstring(market_strong[0][2].GetInt()).c_str());
                }
                if (market_strong.Size() > 1) {
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_2))->SetWindowTextW(to_wstring(market_strong[1][0].GetInt()).c_str());
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_2))->SetWindowTextW(to_wstring(market_strong[1][1].GetInt()).c_str());
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_2))->SetWindowTextW(to_wstring(market_strong[1][2].GetInt()).c_str());
                }
                if (market_strong.Size() > 2) {
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_3))->SetWindowTextW(to_wstring(market_strong[2][0].GetInt()).c_str());
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_3))->SetWindowTextW(to_wstring(market_strong[2][1].GetInt()).c_str());
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_3))->SetWindowTextW(to_wstring(market_strong[2][2].GetInt()).c_str());
                }
                if (market_strong.Size() > 3) {
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_4))->SetWindowTextW(to_wstring(market_strong[3][0].GetInt()).c_str());
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_4))->SetWindowTextW(to_wstring(market_strong[3][1].GetInt()).c_str());
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_4))->SetWindowTextW(to_wstring(market_strong[3][2].GetInt()).c_str());
                }
                if (market_strong.Size() > 4) {
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_5))->SetWindowTextW(to_wstring(market_strong[4][0].GetInt()).c_str());
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_5))->SetWindowTextW(to_wstring(market_strong[4][1].GetInt()).c_str());
                    ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_5))->SetWindowTextW(to_wstring(market_strong[4][2].GetInt()).c_str());
                }
                ((CEdit*)context->GetDlgItem(IDC_EDIT_RADICAL_BUY_SPECIAL_BLOCK_IN_RANK))->SetWindowTextW(to_wstring(special_codes_rank).c_str());
                if (buy_first_limit_up > 0) {
                    ((CButton*)context->GetDlgItem(IDC_CHECK_BUY_FIRST_LIMIT_UP))->SetCheck(true);
                }
                else {
                    ((CButton*)context->GetDlgItem(IDC_CHECK_BUY_FIRST_LIMIT_UP))->SetCheck(false);
                }
            }
        }
    }
    catch (...) {
    }
    try {
      string result =    NetworkApi::get_buy_open_limit_up_codes();
      auto root = JsonUtil::parseUTF8(result);
      if (root.IsObject()) {
          if (root["code"].GetInt() == 0) {
              auto data = root["data"].GetArray();
              CString codes;
              for (int i = 0; i < data.Size(); i++) {
                 string code =  data[i].GetString();
                 codes.Append(CString(code.c_str()));
                 if (i < data.Size() - 1) {
                     codes.Append(L",");
                 }
              }
              ((CEdit*)context->GetDlgItem(IDC_EDIT_BUY_OPEN_LIMIT_UP_CODES))->SetWindowTextW(codes);
          }
      }
    }
    catch (...) {
    }
@@ -440,7 +636,7 @@
                }
                mList.push_back(RadicalBuyBlockInfo({ block , stoi(StringUtil::cstring2String(count)) }));
            }
        }
@@ -458,7 +654,7 @@
        const char* json = buf.GetString();
        // 设置数据
        NetworkApi::set_radical_buy_block_count(StringUtil::base64_encode(json));
        MessageBox(L"设置成功",L"提示");
        MessageBox(L"设置成功", L"提示");
    }
    catch (CString msg) {
        AfxMessageBox(msg);
@@ -476,9 +672,332 @@
    int mode = comboTradeMode.GetCurSel();
    try {
        NetworkApi::set_buy_mode(mode);
        MessageBox(L"设置成功",L"提示");
        // 价格与只有流通市值
        CString minPrice, maxPrice, minZyltgb, maxZyltgb, minZyltgbPrice, maxZyltgbPrice, minZyltgb2, maxZyltgb2, minZyltgbPrice2, maxZyltgbPrice2;
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_PRICE_MIN))->GetWindowText(minPrice);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_PRICE_MAX))->GetWindowText(maxPrice);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_ZYLTGB_MIN))->GetWindowText(minZyltgb);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_ZYLTGB_MAX))->GetWindowText(maxZyltgb);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_PRICE_MIN_1))->GetWindowText(minZyltgbPrice);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_PRICE_MAX_1))->GetWindowText(maxZyltgbPrice);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_ZYLTGB_MIN2))->GetWindowText(minZyltgb2);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_ZYLTGB_MAX2))->GetWindowText(maxZyltgb2);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_PRICE_MIN_2))->GetWindowText(minZyltgbPrice2);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_PRICE_MAX_2))->GetWindowText(maxZyltgbPrice2);
        if (!StringUtil::isNumber(StringUtil::cstring2String(minPrice)) || !StringUtil::isNumber(StringUtil::cstring2String(maxPrice))) {
            throw wstring(L"价格必须为整数");
        }
        if (!StringUtil::isNumber(StringUtil::cstring2String(minZyltgb)) || !StringUtil::isNumber(StringUtil::cstring2String(maxZyltgb))) {
            throw wstring(L"自由流通市值必须为整数");
        }
        // 市场强度与辨识度
        CString strong_min_1, strong_max_1, strong_block_in_max_1,
            strong_min_2, strong_max_2, strong_block_in_max_2,
            strong_min_3, strong_max_3, strong_block_in_max_3,
            strong_min_4, strong_max_4, strong_block_in_max_4,
            strong_min_5, strong_max_5, strong_block_in_max_5;
        CString special_codes_rank, ignore_block_in_market_strong;
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_1))->GetWindowText(strong_min_1);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_1))->GetWindowText(strong_max_1);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_1))->GetWindowText(strong_block_in_max_1);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_2))->GetWindowText(strong_min_2);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_2))->GetWindowText(strong_max_2);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_2))->GetWindowText(strong_block_in_max_2);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_3))->GetWindowText(strong_min_3);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_3))->GetWindowText(strong_max_3);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_3))->GetWindowText(strong_block_in_max_3);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_4))->GetWindowText(strong_min_4);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_4))->GetWindowText(strong_max_4);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_4))->GetWindowText(strong_block_in_max_4);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_5))->GetWindowText(strong_min_5);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_5))->GetWindowText(strong_max_5);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_5))->GetWindowText(strong_block_in_max_5);
        ((CEdit*)GetDlgItem(IDC_EDIT_RADICAL_BUY_SPECIAL_BLOCK_IN_RANK))->GetWindowText(special_codes_rank);
        ((CEdit*)GetDlgItem(IDC_EDIT_IGNORE_BLOCK_IN_MARKET_STRONG))->GetWindowText(ignore_block_in_market_strong);
        bool can_buy_first_limit_up = ((CButton*)GetDlgItem(IDC_CHECK_BUY_FIRST_LIMIT_UP))->GetCheck();
        rapidjson::StringBuffer buf;
        rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buf);
        writer.StartObject();
        writer.Key("price");
        writer.StartArray();
        writer.Int(stoi(StringUtil::cstring2String(minPrice)));
        writer.Int(stoi(StringUtil::cstring2String(maxPrice)));
        writer.EndArray();
        writer.Key("zyltgb");
        writer.StartArray();
        writer.StartArray();
        writer.StartArray();
        writer.Int(stoi(StringUtil::cstring2String(minZyltgb)));
        writer.Int(stoi(StringUtil::cstring2String(maxZyltgb)));
        writer.EndArray();
        writer.StartArray();
        writer.Int(stoi(StringUtil::cstring2String(minZyltgbPrice)));
        writer.Int(stoi(StringUtil::cstring2String(maxZyltgbPrice)));
        writer.EndArray();
        writer.EndArray();
        writer.StartArray();
        writer.StartArray();
        writer.Int(stoi(StringUtil::cstring2String(minZyltgb2)));
        writer.Int(stoi(StringUtil::cstring2String(maxZyltgb2)));
        writer.EndArray();
        writer.StartArray();
        writer.Int(stoi(StringUtil::cstring2String(minZyltgbPrice2)));
        writer.Int(stoi(StringUtil::cstring2String(maxZyltgbPrice2)));
        writer.EndArray();
        writer.EndArray();
        writer.EndArray();
        writer.Key("top_block_count_by_market_strong");
        writer.StartArray();
        if (!strong_min_1.IsEmpty() && !strong_max_1.IsEmpty() && !strong_block_in_max_1.IsEmpty()) {
            writer.StartArray();
            writer.Int(stoi(StringUtil::cstring2String(strong_min_1)));
            writer.Int(stoi(StringUtil::cstring2String(strong_max_1)));
            writer.Int(stoi(StringUtil::cstring2String(strong_block_in_max_1)));
            writer.EndArray();
        }
        if (!strong_min_2.IsEmpty() && !strong_max_2.IsEmpty() && !strong_block_in_max_2.IsEmpty()) {
            writer.StartArray();
            writer.Int(stoi(StringUtil::cstring2String(strong_min_2)));
            writer.Int(stoi(StringUtil::cstring2String(strong_max_2)));
            writer.Int(stoi(StringUtil::cstring2String(strong_block_in_max_2)));
            writer.EndArray();
        }
        if (!strong_min_3.IsEmpty() && !strong_max_3.IsEmpty() && !strong_block_in_max_3.IsEmpty()) {
            writer.StartArray();
            writer.Int(stoi(StringUtil::cstring2String(strong_min_3)));
            writer.Int(stoi(StringUtil::cstring2String(strong_max_3)));
            writer.Int(stoi(StringUtil::cstring2String(strong_block_in_max_3)));
            writer.EndArray();
        }
        if (!strong_min_4.IsEmpty() && !strong_max_4.IsEmpty() && !strong_block_in_max_4.IsEmpty()) {
            writer.StartArray();
            writer.Int(stoi(StringUtil::cstring2String(strong_min_4)));
            writer.Int(stoi(StringUtil::cstring2String(strong_max_4)));
            writer.Int(stoi(StringUtil::cstring2String(strong_block_in_max_4)));
            writer.EndArray();
        }
        if (!strong_min_5.IsEmpty() && !strong_max_5.IsEmpty() && !strong_block_in_max_5.IsEmpty()) {
            writer.StartArray();
            writer.Int(stoi(StringUtil::cstring2String(strong_min_5)));
            writer.Int(stoi(StringUtil::cstring2String(strong_max_5)));
            writer.Int(stoi(StringUtil::cstring2String(strong_block_in_max_5)));
            writer.EndArray();
        }
        writer.EndArray();
        writer.Key("special_codes_max_block_in_rank");
        writer.Int(stoi(StringUtil::cstring2String(special_codes_rank)));
        writer.Key("ignore_block_in_money_market_strong");
        writer.Int(stoi(StringUtil::cstring2String(ignore_block_in_market_strong)));
        writer.Key("buy_first_limit_up");
        writer.Int(can_buy_first_limit_up?1:0);
        writer.EndObject();
        const char* radicalJson = buf.GetString();
        auto result = NetworkApi::set_place_order_settings(radicalJson);
        auto doc = JsonUtil::parseUTF16(result);
        if (!doc.IsObject()) {
            throw wstring(L"网络请求错误");
        }
        if (doc[L"code"].GetInt() != 0) {
            throw  wstring(doc[L"msg"].GetString());
        }
    }
    catch (wstring msg) {
        AfxMessageBox(msg.c_str());
    }
    try {
        CString st;
        ((CEdit *)GetDlgItem(IDC_EDIT_BUY_OPEN_LIMIT_UP_CODES))->GetWindowText(st);
        string codes = StringUtil::cstring2String(st);
        std::stringstream ss(codes);
        std::string token;
        list<string> tokens;
        // 使用 std::stringstream 分隔字符串
        while (std::getline(ss, token, ',')) {
            tokens.push_back(token);
        }
        string result = NetworkApi::set_buy_open_limit_up_codes(tokens);
        auto doc = JsonUtil::parseUTF16(result);
        if (!doc.IsObject()) {
            throw wstring(L"网络请求错误");
        }
        if (doc[L"code"].GetInt() != 0) {
            throw  wstring(doc[L"msg"].GetString());
        }
        MessageBox(L"设置成功", L"提示");
    }
    catch (wstring msg) {
        AfxMessageBox(msg.c_str());
    }
}
void CSettingDlg::OnBnClickedsureocr()
{
    int ids[] = { IDC_EDIT_OCR_WINDOW_PARAMS_TOP, IDC_EDIT_OCR_WINDOW_PARAMS_WIDTH, IDC_EDIT_OCR_WINDOW_PARAMS_HEIGHT, IDC_EDIT_OCR_WINDOW_PARAMS_SCALE };
    CString top, width, height, scale;
    ((CEdit*)GetDlgItem(ids[0]))->GetWindowTextW(top);
    ((CEdit*)GetDlgItem(ids[1]))->GetWindowTextW(width);
    ((CEdit*)GetDlgItem(ids[2]))->GetWindowTextW(height);
    ((CEdit*)GetDlgItem(ids[3]))->GetWindowTextW(scale);
    try {
        if (!StringUtil::isNumber(StringUtil::cstring2String(top))) {
            throw CString(L"上边距格式错误");
        }
        if (!StringUtil::isNumber(StringUtil::cstring2String(width))) {
            throw CString(L"宽度格式错误");
        }
        if (!StringUtil::isNumber(StringUtil::cstring2String(height))) {
            throw CString(L"高度格式错误");
        }
        if (scale.IsEmpty()) {
            throw CString(L"请填写缩放比");
        }
        OCRWindowParams params;
        params.top = stoi(StringUtil::cstring2String(top));
        params.width = stoi(StringUtil::cstring2String(width));
        params.height = stoi(StringUtil::cstring2String(height));
        params.scale = stof(StringUtil::cstring2String(scale));
        ConfigUtil::setOCRWindowParams(params);
        MessageBox(L"保存成功", L"提示");
    }
    catch (CString st) {
        AfxMessageBox(st);
    }
    catch (...) {
        AfxMessageBox(L"保存失败");
    }
}
void CSettingDlg::OnBnClickedsureocrtest()
{
    try {
        RECT rect;
        cv::Mat mat = ThsCodeOCR::capture(ConfigUtil::getOCRWindowParams());
        cv::imwrite("D:/test_origin.jpg", mat);
        mat = ThsCodeOCR::splitForCodeImg(mat);
        cv::imwrite("D:/test.jpg", mat);
        string code;
        ThsCodeOCR *ocr =    new ThsCodeOCR();
        auto start_time = GetTickCount64();
        for (int i = 0; i < 10; i++) {
            code = ocr->ocrCode();
            cout << code << endl;
        }
        int subTime = GetTickCount64() - start_time;
        CString msg;
        msg.Append(CString(code.c_str()));
        msg.Append(L":耗时");
        msg.Append(to_wstring(subTime).c_str());
        msg.Append(L"ms");
        delete ocr;
        MessageBox(msg, L"识别结果");
    /*    cv::Mat mat = cv::imread("D:/test_origin_1.jpg", cv::IMREAD_GRAYSCALE);
        mat = ThsCodeOCR::splitForCodeImg(mat);
        ThsCodeOCR* ocr = new ThsCodeOCR();
        string code = ocr->ocrCode(mat);
        MessageBox(CString(code.c_str()), L"识别结果");*/
    }
    catch (string st) {
        AfxMessageBox(CString(st.c_str()));
    }
    catch (...) {
        AfxMessageBox(L"发生其他错误");
    }
}
void CSettingDlg::OnBnClickedButtonBuyCb()
{
    // 打开可转债买入
    CCBBuyDlg dlg;
    INT_PTR nResponse = dlg.DoModal();
}
void CSettingDlg::OnBnClickedButton1()
{
    NetworkApi::test_place_order("002387");
}
FloatTrade/CSettingDlg.h
@@ -38,11 +38,15 @@
    void setBuyDataSetting(BuyDataSettings setting);
    static void requestTradeMode(CSettingDlg* context);
    static void requestTradeParamsSettings(CSettingDlg* context);
    static bool validTime(CString st);
public:
    afx_msg void OnBnClickedradicalbuyblockcountsure();
    CComboBox comboTradeMode;
    afx_msg void OnBnClickedsuretradeparamssetting();
    afx_msg void OnBnClickedsureocr();
    afx_msg void OnBnClickedsureocrtest();
    afx_msg void OnBnClickedButtonBuyCb();
    afx_msg void OnBnClickedButton1();
};
FloatTrade/ConfigUtil.cpp
@@ -371,3 +371,68 @@
        return 20000;
    }
}
void ConfigUtil::setSellMoney(int money)
{
    setIntConfig("sell_default_money", money);
}
int ConfigUtil::getSellMoney()
{
    try {
        return readIntConfig("sell_default_money");
    }
    catch (...) {
        // 默认5k
        return 5000;
    }
}
void ConfigUtil::setOCRWindowParams(OCRWindowParams params)
{
    string st = "[";
    st.append(to_string(params.top));
    st.append(",");
    st.append(to_string(params.width));
    st.append(",");
    st.append(to_string(params.height));
    st.append(",");
    st.append(to_string(params.scale));
    st.append("]");
    setStringConfig("ocr_window_params", st);
}
OCRWindowParams ConfigUtil::getOCRWindowParams()
{
    string result = readStringConfig("ocr_window_params");
    if (result.empty()) {
        throw string("没获取到配置文件");
    }
    auto doc = JsonUtil::parseUTF8(result);
    auto array = doc.GetArray();
    OCRWindowParams params = { array[0].GetInt(),array[1].GetInt(),array[2].GetInt(),array[3].GetFloat() };
    return params;
}
void ConfigUtil::setEnableOCRCode(bool enable)
{
    setIntConfig("ocr_ths_code", enable ? 1 : 0);
}
bool ConfigUtil::getEnableOCRCode()
{
    try {
        return    readIntConfig("ocr_ths_code") > 0;
    }
    catch (...) {
        return FALSE;
    }
    return false;
}
FloatTrade/ConfigUtil.h
@@ -9,6 +9,14 @@
    long y;
};
// 图像识别参数
struct OCRWindowParams {
    int top; // 上边距
    int width; // 宽度
    int height; // 高度
    float scale; // 缩放倍数
};
using namespace std;
@@ -69,15 +77,23 @@
    // 买入金额设置
    static void setBuyMoney(int money);
    // 买入金额获取
    static int getBuyMoney();
    // 卖出金额设置
    static void setSellMoney(int money);
    // 卖出金额获取
    static int getSellMoney();
    static void setOCRWindowParams(OCRWindowParams params);
    static OCRWindowParams getOCRWindowParams();
    // 设置是否可以识别同花顺代码
    static void setEnableOCRCode(bool enable);
    static bool getEnableOCRCode();
};
FloatTrade/DataStruct.h
@@ -31,6 +31,7 @@
    CString time;
    int money;
    int count;
    int defaultCount;
};
struct BuyDataSettings
@@ -39,6 +40,7 @@
    list<TimeMoney> normalMoneyList;
    int radicalCount;
    list<TimeMoney> radicalMoneyList;
    int defaultBuyMoney;
};
FloatTrade/DealQueueDlg.cpp
New file
@@ -0,0 +1,384 @@
// CBuyDlg.cpp: 实现文件
//
#include "common/pch.h"
#include "FloatTrade.h"
#include "DealQueueDlg.h"
#include "afxdialogex.h"
#include "../common/StringUtil.h"
#include "../common/NetworkApi.h"
#include "../common/JsonUtil.h"
#include <regex>
#include <thread>
#include <afxwin.h>
#include <windows.h>
using namespace std;
// CBuyDlg 对话框
IMPLEMENT_DYNAMIC(DealQueueDlg, CDialogEx)
void DealQueueDlg::AddRoundRect(Gdiplus::GraphicsPath& path, Gdiplus::REAL x, Gdiplus::REAL y, Gdiplus::REAL width, Gdiplus::REAL height, Gdiplus::REAL radius)
{
    path.AddArc(x + width - 2 * radius, y, 2 * radius, 2 * radius, 270, 90);
    path.AddArc(x + width - 2 * radius, y + height - 2 * radius, 2 * radius, 2 * radius, 0, 90);
    path.AddArc(x, y + height - 2 * radius, 2 * radius, 2 * radius, 90, 90);
    path.AddArc(x, y, 2 * radius, 2 * radius, 180, 90);
    path.AddLine(x + radius, y, x + width - radius, y);
    //path.AddArc(x + radius, y + radius, 2 * radius, 2 * radius, 90, -180);
    //path.AddArc(x + width - radius, y + radius, 2 * radius, 2 * radius, 90, 180);
    //path.AddLine(x + radius, y, x + width - radius, y);
    //path.AddLine(x + radius, y+2*radius, x + width - radius, y + 2 * radius);
}
DealQueueDlg::DealQueueDlg(CWnd* pParent /*=nullptr*/)
    : CDialogEx(IDD_DIALOG_DEAL_QUEUE, pParent), m_Pen(Color::MakeARGB(255, 200, 200, 200), 1.0f)
{
    Gdiplus::GdiplusStartupInput startupInput;
    ULONG_PTR token;
    Gdiplus::GdiplusStartup(&token, &startupInput, NULL);
    m_pGraphics = nullptr;
    m_CornerRadius = -1;  // 调整圆角半径
}
DealQueueDlg::~DealQueueDlg()
{
}
void DealQueueDlg::setTargetCode(string code)
{
    this->code = code;
    SetWindowTextW(CString(code.c_str()));
    if (!code.empty()) {
        auto t1 = std::thread(requestDealQueue, this);
        t1.detach();
    }
}
void DealQueueDlg::startRequestDealQueueTask(DealQueueDlg* context)
{
    while (TRUE) {
        try {
            string code = context->code;
            if (!code.empty()) {
                if (context->windowClosed) {
                    break;
                }
                requestDealQueue(context);
            }
        }
        catch (...) {
        }
        Sleep(1000);
    }
}
void DealQueueDlg::requestDealQueue(DealQueueDlg* context)
{
    std::lock_guard<std::mutex> lock(context->mtx);
    string result = NetworkApi::get_code_deal_queue(context->code, context->minMoney);
    auto doc = JsonUtil::parseUTF8(result);
    list<DealQueueInfo> mLsit;
    if (doc.IsObject()) {
        if (doc["code"] == 0) {
            auto data = doc["data"].GetObjectW();
            auto deal_list = data["deal_list"].GetArray();
            for (int i = 0; i < deal_list.Size(); i++) {
                auto array = deal_list[i].GetArray();
                DealQueueInfo info;
                info.type = array[0].GetInt();
                info.orderNo = array[1].GetInt();
                info.time_str = array[2].GetString();
                info.volume = array[3].GetInt();
                info.money = array[4].GetInt();
                info.price = array[5].GetString();
                info.percent = array[6].GetInt();
                mLsit.push_back(info);
            }
            if (data.HasMember("dealing")) {
                auto dealing = data["dealing"].GetArray();
                DealQueueInfo info;
                info.type = dealing[0].GetInt();
                info.orderNo = dealing[1].GetInt();
                info.time_str = dealing[2].GetString();
                info.volume = dealing[3].GetInt();
                info.money = dealing[4].GetInt();
                info.price = StringUtil::to_string(dealing[5].GetFloat());
                info.percent = dealing[6].GetInt();
                mLsit.push_back(info);
            }
        }
    }
    if (context->windowClosed) {
        return;
    }
    context->listCtrl.SetRedraw(false);
    bool needReAdd = false;
    if (mLsit.size() != context->dealQueueList.size() || mLsit.size() == 0) {
        needReAdd = true;
    }
    else if (context->dealQueueList.size() > 0 && mLsit.size() > 0 && context->dealQueueList.back().orderNo != mLsit.back().orderNo) {
        needReAdd = true;
    }
    //填充List
    if (needReAdd) {
        // 删除原来的数据,然后新增
        context->listCtrl.DeleteAllItems();
        int index = 0;
        for (list<DealQueueInfo>::iterator it = mLsit.begin(); it != mLsit.end(); ++it) {
            DealQueueInfo info = *it;
            context->listCtrl.InsertItem(index, L"");
            context->listCtrl.SetItemText(index, 0, CString(info.time_str.c_str()));
            context->listCtrl.SetItemText(index, 1, CString(info.price.c_str()));
            CString money = CString(StringUtil::to_string(info.money / 10000.0f).c_str());
            money.Append(L"万");
            context->listCtrl.SetItemText(index, 2, money);
            CString percent = to_wstring(info.percent).c_str();
            percent.Append(L"%");
            context->listCtrl.SetItemText(index, 3, percent);
            context->listCtrl.SetItemText(index, 4, info.type == 0 ? L"买" : L"卖");
            index++;
        }
    }
    else {
        //修改最后一行的数据
        int index = mLsit.size() - 1;
        DealQueueInfo oldInfo = context->dealQueueList.back();
        DealQueueInfo info = mLsit.back();
        if (oldInfo.percent != info.percent) {
            context->listCtrl.SetItemText(index, 0, CString(info.time_str.c_str()));
            context->listCtrl.SetItemText(index, 1, CString(info.price.c_str()));
            CString money = CString(StringUtil::to_string(info.money / 10000.0f).c_str());
            money.Append(L"万");
            context->listCtrl.SetItemText(index, 2, money);
            CString percent = to_wstring(info.percent).c_str();
            percent.Append(L"%");
            context->listCtrl.SetItemText(index, 3, percent);
            context->listCtrl.SetItemText(index, 4, info.type == 0 ? L"买" : L"卖");
        }
    }
    context->listCtrl.SetRedraw(true);
    context->dealQueueList = mLsit;
}
void DealQueueDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialogEx::DoDataExchange(pDX);
    DDX_Control(pDX, IDC_LIST_DEAL_QUEUE, listCtrl);
    DDX_Control(pDX, IDC_EDIT_MIN_MONEY, editMinMoney);
}
BOOL DealQueueDlg::OnInitDialog()
{
    CDialogEx::OnInitDialog();
    InitializeGDIPlus();
    minMoney = 50;
    editMinMoney.SetWindowTextW(to_wstring(minMoney).c_str());
    listCtrl.InsertColumn(0, _T("时间"), LVCFMT_LEFT, 65, 0);
    listCtrl.InsertColumn(1, _T("价格"), LVCFMT_LEFT, 50, 1);
    listCtrl.InsertColumn(2, _T("金额"), LVCFMT_LEFT, 65, 2);
    listCtrl.InsertColumn(3, _T("手数"), LVCFMT_LEFT, 65, 3);
    listCtrl.InsertColumn(4, _T("类型"), LVCFMT_LEFT, 40, 4);
    windowClosed = false;
    setTargetCode("");
    auto t1 = std::thread(startRequestDealQueueTask, this);
    t1.detach();
    return TRUE;
}
BEGIN_MESSAGE_MAP(DealQueueDlg, CDialogEx)
    ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST_DEAL_QUEUE, &DealQueueDlg::OnItemchangedListDealQueue)
    ON_WM_CLOSE()
    ON_NOTIFY(NM_CUSTOMDRAW, IDC_LIST_DEAL_QUEUE, &DealQueueDlg::OnCustomdrawListDealQueue)
    ON_EN_CHANGE(IDC_EDIT_MIN_MONEY, &DealQueueDlg::OnChangeEditMinMoney)
END_MESSAGE_MAP()
// 设置滚动条始终在底部
void DealQueueDlg::OnItemchangedListDealQueue(NMHDR* pNMHDR, LRESULT* pResult)
{
    LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
    // 检查是否有新的项被添加
    //if (pNMLV->uNewState != 0 && (pNMLV->uNewState & LVIS_FOCUSED) == 0)
    {
        // 获取当前列表的项数
        int nItemCount = listCtrl.GetItemCount();
        // 滚动到最后一项
        if (nItemCount > 0)
        {
            listCtrl.EnsureVisible(nItemCount - 1, FALSE);
        }
    }
    *pResult = 0;
}
void DealQueueDlg::OnClose()
{
    windowClosed = TRUE;
    CDialogEx::OnClose();
}
void DealQueueDlg::OnCustomdrawListDealQueue(NMHDR* pNMHDR, LRESULT* pResult)
{
    LPNMLVCUSTOMDRAW pNMCD = reinterpret_cast<LPNMLVCUSTOMDRAW>(pNMHDR);
    switch (pNMCD->nmcd.dwDrawStage)
    {
    case CDDS_PREPAINT:
        *pResult = CDRF_NOTIFYITEMDRAW;
        return;
    case CDDS_ITEMPREPAINT:
        *pResult = CDRF_NOTIFYSUBITEMDRAW;
        return;
    case CDDS_SUBITEM | CDDS_ITEMPREPAINT:
        if (pNMCD->iSubItem == 3)  // 假设进度条在第2列(索引为1)
        {
            CDC* pDC = CDC::FromHandle(pNMCD->nmcd.hdc);
            CRect rect;
            listCtrl.GetSubItemRect(pNMCD->nmcd.dwItemSpec, pNMCD->iSubItem, LVIR_BOUNDS, rect);
            int padding = 1;
            int height = rect.Height() - padding * 2;
            if (height % 2 != 0) {
                height -= 1;
            }
            if (m_CornerRadius < 0) {
                m_CornerRadius = height / 2;
            }
            int index = pNMCD->nmcd.dwItemSpec;
            list<DealQueueInfo>::iterator e = dealQueueList.begin();
            advance(e, index);
            // 获取进度值
            int nProgress = (*e).percent;
            // 计算进度条的宽度
            int nWidth = rect.Width();
            int nProgressWidth = nWidth * nProgress / 100;
            Graphics* pGraphics = Gdiplus::Graphics::FromHDC(pDC->GetSafeHdc());
            pGraphics->SetSmoothingMode(SmoothingModeAntiAlias);
            pGraphics->SetTextRenderingHint(TextRenderingHintAntiAlias);
            m_Pen.SetColor(0xFF2A1D);
            // 绘制背景
            GraphicsPath path;
            AddRoundRect(path,
                (Gdiplus::REAL)rect.left,
                (Gdiplus::REAL)rect.top + padding,
                (Gdiplus::REAL)rect.Width(),
                (Gdiplus::REAL)height,
                m_CornerRadius
            );
            pGraphics->FillPath(m_BackBrush, &path);
            pGraphics->DrawPath(&m_Pen, &path);
            GraphicsPath progressPath;
            AddRoundRect(progressPath,
                (Gdiplus::REAL)rect.left,
                (Gdiplus::REAL)rect.top + padding,
                (Gdiplus::REAL)nProgressWidth,
                (Gdiplus::REAL)height,
                m_CornerRadius
            );
            pGraphics->FillPath(m_ProgressBrush, &progressPath);
            pGraphics->DrawPath(&m_Pen, &progressPath);
            CString st = L"";
            st.Append(to_wstring(nProgress).c_str());
            st.Append(L"%");
            PointF point(rect.left + 5, rect.top + padding);  // 调整文本位置
            Gdiplus::Font font(L"Arial", 10);
            SolidBrush textBrush(Color::White);
            pGraphics->DrawString(st, -1, &font, point, &textBrush);
            *pResult = CDRF_SKIPDEFAULT;
        }
        else
        {
            *pResult = CDRF_DODEFAULT;
        }
        return;
    }
    *pResult = CDRF_DODEFAULT;
}
void DealQueueDlg::InitializeGDIPlus()
{
    m_pGraphics = Gdiplus::Graphics::FromHDC(nullptr);
    m_Pen.SetColor(0xFF00FF00);
    m_BackBrush = new Gdiplus::LinearGradientBrush(
        PointF(0, 0),
        PointF(0, 20),
        0xFF000000,
        0xFF000000
    );
    m_ProgressBrush = new Gdiplus::LinearGradientBrush(
        PointF(0, 0),
        PointF(0, 20),
        0xFFFF2A1D,
        0xFFFF2A1D
    );
}
void DealQueueDlg::CleanupGDIPlus()
{
    delete m_pGraphics;
}
BOOL DealQueueDlg::PreTranslateMessage(MSG* pMsg)
{
    // 检测是否是键盘消息
    if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_RETURN)
    {
        // 处理回车键事件
        if (CWnd::GetFocus() == GetDlgItem(IDC_EDIT_MIN_MONEY)) {
            CString money;
            editMinMoney.GetWindowTextW(money);
            if (money.IsEmpty()) {
                minMoney = 0;
            }
            else {
                minMoney = stoi(StringUtil::cstring2String(money));
            }
            auto t1 = std::thread(requestDealQueue, this);
            t1.detach();
            return TRUE; // 返回 TRUE 表示已经处理了这个消息,不再传递给基类
        }
    }
    return CDialogEx::PreTranslateMessage(pMsg);
}
void DealQueueDlg::OnChangeEditMinMoney()
{
    // TODO:  如果该控件是 RICHEDIT 控件,它将不
    // 发送此通知,除非重写 CDialogEx::OnInitDialog()
    // 函数并调用 CRichEditCtrl().SetEventMask(),
    // 同时将 ENM_CHANGE 标志“或”运算到掩码中。
    // TODO:  在此添加控件通知处理程序代码
}
FloatTrade/DealQueueDlg.h
New file
@@ -0,0 +1,73 @@
#pragma once
#include<list>
#include<string>
#include <gdiplus.h>
using namespace Gdiplus;
using namespace std;
#include <mutex>
// DealQueueDlg 对话框
struct DealQueueInfo {
    int type;// 0-买入  1-卖出
    int orderNo; // 订单号
    string time_str;
    int volume;
    int money;
    string price;
    int percent;
};
class DealQueueDlg : public CDialogEx
{
    DECLARE_DYNAMIC(DealQueueDlg)
private:
    list<DealQueueInfo> dealQueueList;
    string code;
    bool windowClosed;
    Gdiplus::Graphics* m_pGraphics;
    Gdiplus::Pen m_Pen;
    Gdiplus::LinearGradientBrush *m_BackBrush;
    Gdiplus::LinearGradientBrush *m_ProgressBrush;
    Gdiplus::GraphicsPath m_Path;
    Gdiplus::GraphicsPath m_ProgressPath;
    Gdiplus::REAL m_CornerRadius;
    std::mutex mtx; // 互斥锁
    int minMoney;
    void AddRoundRect(Gdiplus::GraphicsPath& path, Gdiplus::REAL x, Gdiplus::REAL y, Gdiplus::REAL width, Gdiplus::REAL height, Gdiplus::REAL radius);
public:
    DealQueueDlg( CWnd* pParent = nullptr);   // 标准构造函数
    virtual ~DealQueueDlg();
    void setTargetCode(string code);
// 对话框数据
#ifdef AFX_DESIGN_TIME
    enum { IDD = IDD_DIALOG_DEAL_QUEUE };
#endif
private:
    static void startRequestDealQueueTask( DealQueueDlg *context);
    static void requestDealQueue(DealQueueDlg* context);
protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
    DECLARE_MESSAGE_MAP()
public:
    virtual BOOL OnInitDialog();
    CListCtrl listCtrl;
    afx_msg void OnItemchangedListDealQueue(NMHDR* pNMHDR, LRESULT* pResult);
    afx_msg void OnClose();
    afx_msg void OnCustomdrawListDealQueue(NMHDR* pNMHDR, LRESULT* pResult);
    void InitializeGDIPlus();
    void CleanupGDIPlus();
    CEdit editMinMoney;
    virtual BOOL PreTranslateMessage(MSG* pMsg);
    afx_msg void OnChangeEditMinMoney();
};
FloatTrade/FloatTrade.aps
Binary files differ
FloatTrade/FloatTrade.cpp
@@ -10,7 +10,8 @@
#include "SellDlg.h"
#include "CCodeNameDlg.h"
#include "CCBBuyDlg.h"
#include "PositionDlg.h"
#include "DealQueueDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
FloatTrade/FloatTrade.rc
Binary files differ
FloatTrade/FloatTrade.vcxproj
@@ -123,13 +123,13 @@
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <PrecompiledHeaderFile>common/pch.h</PrecompiledHeaderFile>
      <AdditionalIncludeDirectories>D:\workspace\GP\trade_desk_cplus\TradeDesk\FloatTrade\lib_json\include;D:\workspace\GP\trade_desk_cplus\TradeDesk\FloatTrade\lib_config\include</AdditionalIncludeDirectories>
      <AdditionalIncludeDirectories>D:\workspace\GP\trade_desk_cplus\TradeDesk\FloatTrade\lib_json\include;D:\workspace\GP\trade_desk_cplus\TradeDesk\FloatTrade\lib_config\include;D:\opencv\build\include;D:\opencv\build\include\opencv2;D:\vcpkg\packages\tesseract_x64-windows\include</AdditionalIncludeDirectories>
      <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <AdditionalDependencies>libconfig++.lib;dbghelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
      <AdditionalLibraryDirectories>D:\workspace\GP\trade_desk_cplus\TradeDesk\FloatTrade\lib_config\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
      <AdditionalDependencies>libconfig++.lib;opencv_world455d.lib;dbghelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
      <AdditionalLibraryDirectories>D:\workspace\GP\trade_desk_cplus\TradeDesk\FloatTrade\lib_config\x64;D:\opencv\build\x64\vc15\lib;D:\vcpkg\packages\tesseract_x64-windows\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Link>
    <Midl>
      <MkTypLibCompatible>false</MkTypLibCompatible>
@@ -234,17 +234,23 @@
    <ClInclude Include="Constant.h" />
    <ClInclude Include="CSettingDlg.h" />
    <ClInclude Include="DataStruct.h" />
    <ClInclude Include="DealQueueDlg.h" />
    <ClInclude Include="FloatTrade.h" />
    <ClInclude Include="FloatTradeDlg.h" />
    <ClInclude Include="ImgDivider.h" />
    <ClInclude Include="MyApi.h" />
    <ClInclude Include="MyButton.h" />
    <ClInclude Include="PositionDlg.h" />
    <ClInclude Include="QueueListCtrl.h" />
    <ClInclude Include="Resource.h" />
    <ClInclude Include="SellDlg.h" />
    <ClInclude Include="SellManager.h" />
    <ClInclude Include="SellRuleDlg.h" />
    <ClInclude Include="SellStruct.h" />
    <ClInclude Include="ThsCodeOCR.h" />
    <ClInclude Include="ThsUtil.h" />
    <ClInclude Include="TipDlg.h" />
    <ClInclude Include="win32_screen_shots.h" />
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="..\common\CMyListCtrl.cpp" />
@@ -263,17 +269,23 @@
    <ClCompile Include="ConfigUtil.cpp" />
    <ClCompile Include="Constant.cpp" />
    <ClCompile Include="CSettingDlg.cpp" />
    <ClCompile Include="DealQueueDlg.cpp" />
    <ClCompile Include="FloatTrade.cpp" />
    <ClCompile Include="FloatTradeDlg.cpp" />
    <ClCompile Include="ImgDivider.cpp" />
    <ClCompile Include="json_reader.cpp" />
    <ClCompile Include="json_value.cpp" />
    <ClCompile Include="json_writer.cpp" />
    <ClCompile Include="MyButton.cpp" />
    <ClCompile Include="PositionDlg.cpp" />
    <ClCompile Include="QueueListCtrl.cpp" />
    <ClCompile Include="SellDlg.cpp" />
    <ClCompile Include="SellManager.cpp" />
    <ClCompile Include="SellRuleDlg.cpp" />
    <ClCompile Include="ThsCodeOCR.cpp" />
    <ClCompile Include="ThsUtil.cpp" />
    <ClCompile Include="TipDlg.cpp" />
    <ClCompile Include="win32_screen_shots.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ResourceCompile Include="FloatTrade.rc" />
FloatTrade/FloatTrade.vcxproj.filters
@@ -120,6 +120,24 @@
    <ClInclude Include="CCBBuyDlg.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="PositionDlg.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="ThsCodeOCR.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="win32_screen_shots.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="ImgDivider.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="QueueListCtrl.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="DealQueueDlg.h">
      <Filter>头文件</Filter>
    </ClInclude>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="FloatTrade.cpp">
@@ -203,6 +221,24 @@
    <ClCompile Include="CCBBuyDlg.cpp">
      <Filter>源文件</Filter>
    </ClCompile>
    <ClCompile Include="PositionDlg.cpp">
      <Filter>源文件</Filter>
    </ClCompile>
    <ClCompile Include="ThsCodeOCR.cpp">
      <Filter>源文件</Filter>
    </ClCompile>
    <ClCompile Include="win32_screen_shots.cpp">
      <Filter>源文件</Filter>
    </ClCompile>
    <ClCompile Include="ImgDivider.cpp">
      <Filter>源文件</Filter>
    </ClCompile>
    <ClCompile Include="QueueListCtrl.cpp">
      <Filter>源文件</Filter>
    </ClCompile>
    <ClCompile Include="DealQueueDlg.cpp">
      <Filter>源文件</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ResourceCompile Include="FloatTrade.rc">
FloatTrade/FloatTrade.vcxproj.user
@@ -3,4 +3,11 @@
  <PropertyGroup>
    <RESOURCE_FILE>FloatTrade.rc</RESOURCE_FILE>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <RemoteDebuggerCommand>\\192.168.3.245\FXDMounter\Debug\FloatTrade.exe</RemoteDebuggerCommand>
    <RemoteDebuggerWorkingDirectory>\\192.168.3.245\FXDMounter</RemoteDebuggerWorkingDirectory>
    <RemoteDebuggerServerName>192.168.3.245</RemoteDebuggerServerName>
    <RemoteDebuggerConnection>RemoteWithoutAuthentication</RemoteDebuggerConnection>
    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
  </PropertyGroup>
</Project>
FloatTrade/FloatTradeDlg.cpp
@@ -11,6 +11,7 @@
#include "../common/StringUtil.h"
#include "ConfigUtil.h"
#include "../common/NetworkApi.h"
#include "../common/TimeUtil.h"
#ifdef _DEBUG
#define new DEBUG_NEW
@@ -28,6 +29,9 @@
#include "MyApi.h"
#include "CCBBuyDlg.h"
#include "Constant.h"
#include "PositionDlg.h"
#include "DealQueueDlg.h"
#include <regex>
// CFloatTradeDlg 对话框
@@ -36,12 +40,17 @@
const int HOT_KEY_SELL_ALL = 1;
const int HOT_KEY_CANCEL = 2;
const int HOT_KEY_BUY = 3;
const int HOT_KEY_UPDATE_BSD = 4;// 更新板上盯
const int HOT_KEY_OPEN_DEAL_QUEUE = 5;// 打开成交队列
// 可转债消息
#define WM_CB_WINDOW (WM_APP + 1000)
bool CFloatTradeDlg::breakCancelMsg;
HHOOK CFloatTradeDlg::hMouseHook;
long  CFloatTradeDlg::ocrCodeExpireTimestamp;
string CFloatTradeDlg::getCode()
@@ -126,10 +135,10 @@
    }
}
void CFloatTradeDlg::getAutoCancelSellMode(CFloatTradeDlg* context)
void CFloatTradeDlg::getAutoCancelSellMode(CFloatTradeDlg* context, string code)
{
    try {
        int mode = NetworkApi::get_auto_cancel_sell_mode();
        int mode = NetworkApi::get_auto_cancel_sell_mode(code);
        if (mode == 0) {
            context->checkAutoCancelSell.SetCheck(TRUE);
        }
@@ -223,7 +232,6 @@
            context->setMsg(resultC, MSG_TYPE_INFO, FALSE);
            std::thread t1(updateCodePosition, code, context);
            t1.detach();
        }
        else {
            string result = NetworkApi::get_code_position_info(code);
@@ -321,12 +329,12 @@
    SellSetting* sellSetting = context->sellManager->getSellSetting(code);
    //if (sellSetting->lockBuyMoney > 0) {
    context->editBuyMoney.SetWindowTextW(to_wstring(ConfigUtil::getBuyMoney()).c_str());
    //}
    /*else {
        context->editBuyMoney.SetWindowTextW(L"");
    }*/
    if (sellSetting->lockBuyMoney > 0) {
        context->editBuyMoney.SetWindowTextW(to_wstring(sellSetting->lockBuyMoney).c_str());
    }
    else {
        context->editBuyMoney.SetWindowTextW(to_wstring(ConfigUtil::getBuyMoney()).c_str());
    }
    if (sellSetting->lock) {
        context->checkLockVolume.SetCheck(TRUE);
@@ -407,7 +415,9 @@
    }
    // 更新持仓
    requestAllPositions(context);
    if (context->positionDialog != nullptr) {
        context->positionDialog->updatePositions();
    }
}
void CFloatTradeDlg::regularUpdatePositionInfo(CFloatTradeDlg* context)
@@ -674,8 +684,6 @@
    ON_WM_HOTKEY()
    ON_BN_CLICKED(btn_already_canceled, &CFloatTradeDlg::OnClickedBtnAlreadyCanceled)
    ON_BN_CLICKED(btn_black, &CFloatTradeDlg::OnClickedBtnBlack)
    ON_BN_CLICKED(btn_buy_mode_all, &CFloatTradeDlg::OnClickedBtnBuyModeAll)
    ON_BN_CLICKED(btn_buy_mode_want, &CFloatTradeDlg::OnClickedBtnBuyModeWant)
    ON_BN_CLICKED(btn_close_buy, &CFloatTradeDlg::OnClickedBtnCloseBuy)
    ON_BN_CLICKED(btn_open_buy, &CFloatTradeDlg::OnClickedBtnOpenBuy)
    //ON_BN_CLICKED(btn_pause_buy, &CFloatTradeDlg::OnClickedBtnPauseBuy)
@@ -725,11 +733,14 @@
    ON_BN_CLICKED(IDC_CHECK_LOCK_BUY_VOLUME, &CFloatTradeDlg::OnBnClickedCheckLockBuyVolume)
    ON_WM_KEYDOWN()
    ON_BN_CLICKED(btn_code_trade_update_watch_buy1, &CFloatTradeDlg::OnBnClickedcodetradeupdatewatchbuy1)
    ON_BN_CLICKED(IDC_BUTTON_BUY_CB, &CFloatTradeDlg::OnBnClickedButtonBuyCb)
    ON_BN_CLICKED(IDC_BUTTON_ADD_GREEN, &CFloatTradeDlg::OnBnClickedButtonAddGreen)
    ON_BN_CLICKED(IDC_BUTTON_REMOVE_GREEN, &CFloatTradeDlg::OnBnClickedButtonRemoveGreen)
    ON_BN_CLICKED(IDC_BUTTON_GREEN_LIST, &CFloatTradeDlg::OnBnClickedButtonGreenList)
    ON_BN_CLICKED(btn_add_watch_limit_up_for_sell, &CFloatTradeDlg::OnBnClickedaddwatchlimitupforsell)
    ON_WM_LBUTTONDOWN()
    ON_BN_CLICKED(check_ocr_code, &CFloatTradeDlg::OnClickedCheckOcrCode)
    ON_WM_DESTROY()
    ON_STN_CLICKED(IDC_STATIC_TOTAL_POSITION, &CFloatTradeDlg::OnStnClickedStaticTotalPosition)
END_MESSAGE_MAP()
// CFloatTradeDlg 消息处理程序
@@ -753,6 +764,10 @@
    mfcBtnFlashInfo.SetTextColor(RGB(255, 0, 0));
    if (dealQueueDlg == nullptr) {
        dealQueueDlg = new DealQueueDlg();
        dealQueueDlg->Create(IDD_DIALOG_DEAL_QUEUE, this);
    }
}
void CFloatTradeDlg::initData()
@@ -778,10 +793,12 @@
    HWND hWnd = CWnd::GetSafeHwnd();
    //设置热键
    //设置热键/快捷键
    RegisterHotKey(hWnd, HOT_KEY_SELL_ALL, MOD_SHIFT, VK_F10);
    RegisterHotKey(hWnd, HOT_KEY_CANCEL, MOD_SHIFT, VK_F5);
    RegisterHotKey(hWnd, HOT_KEY_CANCEL, MOD_SHIFT, VK_F1);
    RegisterHotKey(hWnd, HOT_KEY_BUY, MOD_SHIFT, VK_F9);
    RegisterHotKey(hWnd, HOT_KEY_UPDATE_BSD, MOD_SHIFT, VK_F8); // 板上盯
    RegisterHotKey(hWnd, HOT_KEY_OPEN_DEAL_QUEUE, MOD_SHIFT, VK_F7); // 成交队列
    //置顶
    SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
    //请求网络数据
@@ -792,13 +809,13 @@
    std::thread t2(getTradeMode, this);
    t2.detach();
    std::thread t22(getAutoCancelSellMode, this);
    t22.detach();
    //启动交易刷新
    std::thread t3(ThsUtil::run_trade_refresh);
    t3.detach();
    // 启动代码识别
    std::thread t4(runTHSCodeOCR, this);
    t4.detach();
    // 设置位置
    MyPoint p = ConfigUtil::getWindowPos();
@@ -854,6 +871,12 @@
    editBuyMoney.SetWindowTextW(to_wstring(ConfigUtil::getBuyMoney()).c_str());
    fillMoneys();
    lastBuyClickTime = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
    canOCRCode = ConfigUtil::getEnableOCRCode();
    if (canOCRCode) {
        this->hMouseHook = SetWindowsHookEx(WH_MOUSE_LL, MouseProc, 0, 0);
    }
    ((CButton*)GetDlgItem(check_ocr_code))->SetCheck(canOCRCode);
}
@@ -882,8 +905,29 @@
    initData();
    // 测试
    return TRUE;
}
// 鼠标钩子过程函数示例
LRESULT CALLBACK CFloatTradeDlg::MouseProc(int nCode, WPARAM wParam, LPARAM lParam) {
    if (nCode >= 0) {
        MSLLHOOKSTRUCT* pMouseStruct = reinterpret_cast<MSLLHOOKSTRUCT*>(lParam);
        switch (wParam) {
        case WM_LBUTTONDOWN:
            CFloatTradeDlg::ocrCodeExpireTimestamp = TimeUtil::getNowTimestamp() + 1000;
            break;
        }
    }
    return CallNextHookEx(hMouseHook, nCode, wParam, lParam);
}
@@ -932,6 +976,18 @@
        cout << "买入" << endl;
        buy();
    }
    else if (nHotKeyId == HOT_KEY_UPDATE_BSD) {
        cout << "更板上盯" << endl;
        OnBnClickedcodetradeupdatewatchbuy1();
    }
    else if (nHotKeyId == HOT_KEY_OPEN_DEAL_QUEUE) {
        cout << "打开成交队列" << endl;
        if (dealQueueDlg != nullptr && !dealQueueDlg->IsWindowVisible()) {
            dealQueueDlg->ShowWindow(SW_SHOW);
        }
    }
}
@@ -1029,39 +1085,6 @@
    }
}
void CFloatTradeDlg::OnClickedBtnBuyModeAll()
{
    //全部都买
    try {
        NetworkApi::set_buy_mode(0);
        CString msg;
        msg.Append(_T("设置全部都买成功"));
        setMsg(msg, MSG_TYPE_SUCCESS);
        getTradeMode(this);
    }
    catch (wstring st) {
        CString msg(st.c_str());
        setMsg(msg, MSG_TYPE_FAIL);
    }
}
void CFloatTradeDlg::OnClickedBtnBuyModeWant()
{
    // 只买想买
    try {
        NetworkApi::set_buy_mode(1);
        CString msg;
        msg.Append(_T("设置只买想买成功"));
        setMsg(msg, MSG_TYPE_SUCCESS);
        getTradeMode(this);
    }
    catch (wstring st) {
        CString msg(st.c_str());
        setMsg(msg, MSG_TYPE_FAIL);
    }
}
void CFloatTradeDlg::OnClickedBtnCloseBuy()
@@ -1321,11 +1344,21 @@
void CFloatTradeDlg::OnClickedCheckAutoClick()
{
    // 分组刷新
    // 判断是否选中了代码
    string code = "";
    try {
        code = this->getInputCode();
    }
    catch (wstring msg) {
        checkAutoCancelSell.SetCheck(!checkAutoCancelSell.GetCheck());
        AfxMessageBox(msg.c_str());
        return;
    }
    if (checkAutoCancelSell.GetCheck()) {
        // 撤所有
        try {
            NetworkApi::set_auto_cancel_sell_mode(0);
            NetworkApi::set_auto_cancel_sell_mode(code, 0);
        }
        catch (wstring msg) {
            checkAutoCancelSell.SetCheck(FALSE);
@@ -1335,7 +1368,7 @@
    else {
        // 撤机器
        try {
            NetworkApi::set_auto_cancel_sell_mode(1);
            NetworkApi::set_auto_cancel_sell_mode(code, 1);
        }
        catch (wstring msg) {
            checkAutoCancelSell.SetCheck(TRUE);
@@ -1516,7 +1549,15 @@
void CFloatTradeDlg::buy()
{
    try {
        auto now = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
        // 买入频率限制
        if (now - lastBuyClickTime < 1000) {
            throw wstring(L"买入时间小于1000ms");
        }
        lastBuyClickTime = now;
        string code = getInputCode();
        CString buyMoneyw;
        editBuyMoney.GetWindowTextW(buyMoneyw);
@@ -1613,6 +1654,74 @@
    }
}
void CFloatTradeDlg::runTHSCodeOCR(CFloatTradeDlg* context)
{
    if (context->thsCodeOCR == nullptr) {
        context->thsCodeOCR = new ThsCodeOCR();
    }
    while (TRUE)
    {
        try {
            if (context->canOCRCode) {
                if (TimeUtil::getNowTimestamp() < context->ocrCodeExpireTimestamp) {
                    string code = context->thsCodeOCR->ocrCode();
                    // 设置目标代码
                    if (!code._Equal(context->lastOCRCode)) {
                        context->lastOCRCode = code;
                        context->setTargetCode(code);
                    }
                }
            }
        }
        catch (...) {
        }
        Sleep(50);
    }
}
void CFloatTradeDlg::setTargetCode(string code)
{
    editCode.SetWindowTextW(CString(code.c_str()));
    requestingCode = code;
    //请求网络获取消息
    std::thread t1(getCodeDesc, code, this);
    t1.detach();
    std::thread t2(requestCodePosition, code, this, TRUE, 0);
    t2.detach();
    std::thread t3(getAutoCancelSellMode, this, code);
    t3.detach();
    if (dealQueueDlg != nullptr && dealQueueDlg->IsWindowVisible()) {
        dealQueueDlg->setTargetCode(code);
    }
}
void CFloatTradeDlg::setLockInfo(string code, bool lock, int lockMoney)
{
    string nowTimeStr = TimeUtil::getNowTime("%H%M%S");
    SellSetting* sellSetting = sellManager->getSellSetting(code);
    sellSetting->lock = TRUE;
    sellSetting->lockMoney = lockMoney;
    sellSetting->lockTime = stoi(nowTimeStr.c_str());
    sellManager->syncSettingToFile(code);
}
void CFloatTradeDlg::setLockBuyInfo(string code, bool lock, int lockMoney)
{
    string nowTimeStr = TimeUtil::getNowTime("%H%M%S");
    SellSetting* sellSetting = sellManager->getSellSetting(code);
    sellSetting->lockBuy = TRUE;
    sellSetting->lockBuyMoney = lockMoney;
    sellSetting->lockTime = stoi(nowTimeStr.c_str());
    sellManager->syncSettingToFile(code);
}
void CFloatTradeDlg::OnBnClickedwantlist()
{
@@ -1702,17 +1811,10 @@
            //this->SetForegroundWindow();
            //this->SetFocus();
            wstring codew = root[_T("data")][_T("code")].GetString();
            editCode.SetWindowTextW(codew.c_str());
            string code = StringUtil::wstringToString(codew);
            // 设置正在请求的代码
            requestingCode = code;
            //请求网络获取消息
            std::thread t1(getCodeDesc, code, this);
            t1.detach();
            std::thread t2(requestCodePosition, code, this, TRUE, 0);
            t2.detach();
            setTargetCode(code);
            // 判断是否有下单窗口
@@ -1747,7 +1849,12 @@
    // 获取对话框位置
    RECT rect;
    Win32Util::getWindowRect(GetSafeHwnd(), &rect);
    ConfigUtil::setWindowPos(rect.left, rect.top);
    if (rect.left < -3000 || rect.top < -3000) {
        // 错误的坐标
    }
    else {
        ConfigUtil::setWindowPos(rect.left, rect.top);
    }
    CDialogEx::OnClose();
}
@@ -1806,9 +1913,7 @@
    try {
        string code = getInputCode();
        int sellMoney_int = stoi(StringUtil::cstring2String(num_str).c_str());
        SellSetting* sellSetting = sellManager->getSellSetting(code);
        sellSetting->lockMoney = sellMoney_int;
        sellManager->syncSettingToFile(code);
        setLockInfo(code, true, sellMoney_int);
    }
    catch (wstring msg) {
        AfxMessageBox(msg.c_str());
@@ -1823,6 +1928,9 @@
    catch (wstring msg) {
        AfxMessageBox(msg.c_str());
    }
    std::thread t3(getAutoCancelSellMode, this, getInputCode());
    t3.detach();
}
@@ -1836,10 +1944,7 @@
        string code = getInputCode();
        sellManager->init(code);
        if (!checkLockVolume.GetCheck()) {
            SellSetting* sellSetting = sellManager->getSellSetting(code);
            sellSetting->lock = FALSE;
            sellSetting->lockMoney = 0;
            sellManager->syncSettingToFile(code);
            setLockInfo(code, false, 0);
            return;
        }
        // 判断量是否输入
@@ -1850,10 +1955,7 @@
            throw wstring(L"请输入正确的金额");
        }
        int sellMoney_int = stoi(sellMoney);
        SellSetting* sellSetting = sellManager->getSellSetting(code);
        sellSetting->lock = TRUE;
        sellSetting->lockMoney = sellMoney_int;
        sellManager->syncSettingToFile(code);
        setLockInfo(code, true, sellMoney_int);
    }
    catch (wstring msg) {
        AfxMessageBox(msg.c_str());
@@ -1997,9 +2099,7 @@
                        throw wstring(L"请输入正确的金额");
                    }
                    int sellMoney_int = stoi(sellMoney);
                    SellSetting* sellSetting = sellManager->getSellSetting(code);
                    sellSetting->lockMoney = sellMoney_int;
                    sellManager->syncSettingToFile(code);
                    setLockInfo(code, true, sellMoney_int);
                }
                catch (wstring msg) {
                    AfxMessageBox(msg.c_str());
@@ -2010,6 +2110,7 @@
        {
            // 保存锁定的金额
            try {
                string code = getInputCode();
                CString buyMoneyw;
                editBuyMoney.GetWindowTextW(buyMoneyw);
                string buyMoney = StringUtil::cstring2String(buyMoneyw);
@@ -2017,7 +2118,7 @@
                    throw wstring(L"请输入正确的金额");
                }
                int buyMoney_int = stoi(buyMoney);
                ConfigUtil::setBuyMoney(buyMoney_int);
                setLockBuyInfo(code, true, buyMoney_int);
            }
            catch (wstring msg) {
                AfxMessageBox(msg.c_str());
@@ -2096,13 +2197,6 @@
}
void CFloatTradeDlg::OnBnClickedButtonBuyCb()
{
    // 打开可转债买入
    CCBBuyDlg dlg;
    INT_PTR nResponse = dlg.DoModal();
}
void CFloatTradeDlg::OnBnClickedButtonAddGreen()
@@ -2227,3 +2321,55 @@
        setMsg(msg.c_str(), MSG_TYPE_FAIL);
    }
}
void CFloatTradeDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
    // TODO: 在此添加消息处理程序代码和/或调用默认值
    RECT rect;
    labelTotalPosition.GetWindowRect(&rect);
    ScreenToClient(&rect);
    if (point.x > rect.left && point.x < rect.right && point.y > rect.top && point.y < rect.bottom) {
        if (positionDialog == nullptr) {
            positionDialog = new PositionDlg;
            positionDialog->Create(IDD_DIALOG_POSITION, this);
        }
        positionDialog->ShowWindow(SW_SHOW);
    }
    CDialogEx::OnLButtonDown(nFlags, point);
}
void CFloatTradeDlg::OnClickedCheckOcrCode()
{
    if (((CButton*)GetDlgItem(check_ocr_code))->GetCheck()) {
        canOCRCode = true;
        this->hMouseHook = SetWindowsHookEx(WH_MOUSE_LL, MouseProc, 0, 0);
    }
    else {
        canOCRCode = false;
        UnhookWindowsHookEx(this->hMouseHook);
    }
    ConfigUtil::setEnableOCRCode(canOCRCode);
}
void CFloatTradeDlg::OnDestroy()
{
    CDialogEx::OnDestroy();
    if (thsCodeOCR != nullptr) {
        delete thsCodeOCR;
    }
}
void CFloatTradeDlg::OnStnClickedStaticTotalPosition()
{
}
FloatTrade/FloatTradeDlg.h
@@ -13,6 +13,10 @@
#include "SellStruct.h"
#include "SellManager.h"
#include "TipDlg.h"
#include "PositionDlg.h"
#include <ctime>
#include "ThsCodeOCR.h"
#include "DealQueueDlg.h"
#define WM_FLOAT_MSG (WM_USER + 100)
@@ -59,10 +63,33 @@
    // 持仓map
    map<string, CodePosition> positionMap;
    // 上次点击买的时间戳
    std::time_t lastBuyClickTime;
    SellManager* sellManager;
    map<string, SellDlg*> sellDlgMap;
    // 持仓
    PositionDlg* positionDialog;
    // 鼠标钩子
    static HHOOK hMouseHook;
    ThsCodeOCR* thsCodeOCR;
    // 最近一次识别的代码
    string lastOCRCode;
    // 代码识别的截止时间
    static long ocrCodeExpireTimestamp;
    // 是否可以识别
    bool canOCRCode;
    // 成交队列
    DealQueueDlg* dealQueueDlg;
    void initView();
@@ -77,7 +104,7 @@
    // 获取交易状态
    static void getTradeState(CFloatTradeDlg* context);
    static void getAutoCancelSellMode(CFloatTradeDlg* context);
    static void getAutoCancelSellMode(CFloatTradeDlg* context,string code);
    //获取交易模式
    static void getTradeMode(CFloatTradeDlg* context);
@@ -147,6 +174,18 @@
    // 填充预设金额
    void fillMoneys();
    static void runTHSCodeOCR(CFloatTradeDlg* context);
    // 设置目标代码
    void setTargetCode(string code);
    // 设置锁定信息
    void setLockInfo(string code, bool lock, int lockMoney);
    // 设置锁定买入金额
    void setLockBuyInfo(string code, bool lock, int lockMoney);
// 构造
public:
@@ -171,12 +210,12 @@
    afx_msg void OnPaint();
    afx_msg HCURSOR OnQueryDragIcon();
    DECLARE_MESSAGE_MAP()
    static LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lParam);
    
public:
    afx_msg void OnClickedBtnAlreadyCanceled();
    afx_msg void OnClickedBtnBlack();
    afx_msg void OnClickedBtnBuyModeAll();
    afx_msg void OnClickedBtnBuyModeWant();
    afx_msg void OnClickedBtnCloseBuy();
    afx_msg void OnClickedBtnOpenBuy();
    afx_msg void OnClickedBtnPauseBuy();
@@ -240,7 +279,6 @@
    afx_msg void OnBnClickedCheckLockBuyVolume();
    virtual BOOL PreTranslateMessage(MSG* pMsg);
    afx_msg void OnBnClickedcodetradeupdatewatchbuy1();
    afx_msg void OnBnClickedButtonBuyCb();
    afx_msg void OnBnClickedButtonAddGreen();
    afx_msg void OnBnClickedButtonRemoveGreen();
    afx_msg void OnBnClickedButtonGreenList();
@@ -248,4 +286,8 @@
    CButton btnBuy;
    CComboBox comboBuyPriceType;
    afx_msg void OnBnClickedaddwatchlimitupforsell();
    afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
    afx_msg void OnClickedCheckOcrCode();
    afx_msg void OnDestroy();
    afx_msg void OnStnClickedStaticTotalPosition();
};
FloatTrade/ImgDivider.cpp
New file
@@ -0,0 +1,211 @@
#include "common/pch.h"
#include "ImgDivider.h"
bool ImgDivider::isRowFull(cv::Mat img, int row) {
    int  cols = img.cols;
    int rows = img.rows;
    int emptyCount = 0;
    for (int i = 0;i < cols;i += SIMPLE_SPACE) {
        uchar data = img.ptr<uchar>(row)[i];
        if (data < BLANK_COLOR_VALUE) {
            //允许最大有10个空数据
            if (emptyCount < 10) {
                emptyCount++;
                continue;
            }
            return false;
        }
    }
    return true;
}
bool ImgDivider::isRowFull(cv::Mat img, int row, int startCol, int endCol, int simple) {
    int emptyCount = 0;
    for (int i = startCol;i <= endCol;i += simple) {
        uchar data = img.ptr<uchar>(row)[i];
        if (data < BLANK_COLOR_VALUE) {
            //允许最大有10个空数据
            if (emptyCount < 10) {
                emptyCount++;
                continue;
            }
            return false;
        }
    }
    return true;
}
bool ImgDivider::isRowFull(cv::Mat img, int row, int startCol, int endCol, int simple,int splitColorFrom, int splitColorTo) {
    int emptyCount = 0;
    for (int i = startCol;i <= endCol;i += simple) {
        uchar data = img.ptr<uchar>(row)[i];
        if (data > splitColorTo|| data< splitColorFrom) {
            //允许最大有10个空数据
            if (emptyCount < 10) {
                emptyCount++;
                continue;
            }
            return false;
        }
    }
    return true;
}
bool ImgDivider::isRowEmpty(cv::Mat img, int row) {
    int  cols = img.cols;
    for (int i = 0;i < cols;i += 1) {
        uchar data = img.ptr<uchar>(row)[i];
        if (data >= BLANK_COLOR_VALUE) {
            return false;
        }
    }
    return true;
}
bool ImgDivider::isRowEmpty(cv::Mat img, int row, int startCol, int endCol) {
    int  cols = img.cols;
    int rows = img.rows;
    for (int i = startCol;i < endCol;i += SIMPLE_SPACE) {
        uchar data = img.ptr<uchar>(row)[i];
        if (data >= BLANK_COLOR_VALUE) {
            return false;
        }
    }
    return true;
}
bool ImgDivider::isRowEmpty(cv::Mat img, int row, int startCol, int endCol,int simple) {
    int  cols = img.cols;
    int rows = img.rows;
    for (int i = startCol;i < endCol;i += simple) {
        uchar data = img.ptr<uchar>(row)[i];
        if (data >= BLANK_COLOR_VALUE) {
            return false;
        }
    }
    return true;
}
bool ImgDivider::isRowEmpty(cv::Mat img, int row, int startCol, int endCol, int simple, int blankColorValue) {
    int  cols = img.cols;
    int rows = img.rows;
    for (int i = startCol;i < endCol;i += simple) {
        uchar data = img.ptr<uchar>(row)[i];
        if (data >= blankColorValue) {
            return false;
        }
    }
    return true;
}
bool ImgDivider::rowHasData(cv::Mat img, int row) {
    int  cols = img.cols;
    int rows = img.rows;
    for (int i = 0;i < cols;i += SIMPLE_SPACE) {
        uchar data = img.ptr<uchar>(row)[i];
        if (data >= BLANK_COLOR_VALUE) {
            return true;
        }
    }
    return false;
}
bool ImgDivider::isColFull(cv::Mat img, int col, int startRow) {
    int  cols = img.cols;
    int rows = img.rows;
    for (int i = startRow;i < rows;i += SIMPLE_SPACE) {
        uchar data = img.ptr<uchar>(i)[col];
        if (data < BLANK_COLOR_VALUE) {
            return false;
        }
    }
    return true;
}
bool ImgDivider::isColFull(cv::Mat img, int col, int startRow,int endRow,int simple) {
    for (int i = startRow;i <= endRow;i += simple) {
        uchar data = img.ptr<uchar>(i)[col];
        if (data < BLANK_COLOR_VALUE) {
            return false;
        }
    }
    return true;
}
 bool ImgDivider::isColFull(cv::Mat img, int col, int startRow, int endRow, int simple, int splitColorFrom, int splitColorTo) {
     for (int i = startRow; i <= endRow; i += simple) {
         uchar data = img.ptr<uchar>(i)[col];
         if (data < splitColorFrom || data > splitColorTo) {
             return false;
         }
     }
     return true;
}
bool ImgDivider::isColEmpty(cv::Mat img, int col) {
    int  cols = img.cols;
    int rows = img.rows;
    for (int i = 0;i < rows;i += SIMPLE_SPACE) {
        uchar data = img.ptr<uchar>(i)[col];
        if (data >= BLANK_COLOR_VALUE) {
            return false;
        }
    }
    return true;
}
bool ImgDivider::isColEmpty(cv::Mat img, int col, int simple) {
    int  cols = img.cols;
    int rows = img.rows;
    for (int i = 0;i < rows;i += simple) {
        uchar data = img.ptr<uchar>(i)[col];
        if (data >= BLANK_COLOR_VALUE) {
            return false;
        }
    }
    return true;
}
bool ImgDivider::isColEmpty(cv::Mat img, int col, int fromRow, int endRow) {
    int  cols = img.cols;
    int rows = img.rows;
    for (int i = fromRow;i <= endRow;i += 1) {
        uchar data = img.ptr<uchar>(i)[col];
        if (data >= BLANK_COLOR_VALUE) {
            return false;
        }
    }
    return true;
}
 bool ImgDivider::isColEmpty(cv::Mat img, int col, int fromRow, int endRow, int blankColorValue) {
     int  cols = img.cols;
     int rows = img.rows;
     for (int i = fromRow;i <= endRow;i += 1) {
         uchar data = img.ptr<uchar>(i)[col];
         if (data >= blankColorValue) {
             return false;
         }
     }
     return true;
}
bool ImgDivider::colHasData(cv::Mat img, int col) {
    int  cols = img.cols;
    int rows = img.rows;
    for (int i = 0;i < rows;i += SIMPLE_SPACE) {
        uchar data = img.ptr<uchar>(i)[col];
        if (data >= BLANK_COLOR_VALUE) {
            return true;
        }
    }
    return false;
}
FloatTrade/ImgDivider.h
New file
@@ -0,0 +1,57 @@
#pragma once
#ifndef  _IMGDIVIDE_DEFINED_
#define  _IMGDIVIDE_DEFINED_
#include <string>
#include<opencv2\opencv.hpp>
#define SIMPLE_SPACE 3
#define BLANK_COLOR_VALUE 10
class ImgDivider
{
public:
    //满数据行
    static    bool isRowFull(cv::Mat img,int row);
    static    bool isRowFull(cv::Mat img, int row,int startCol,int endCol, int simple);
    static bool isRowFull(cv::Mat img, int row, int startCol, int endCol, int simple, int splitColorFrom, int splitColorTo);
    //空数据行
    static    bool isRowEmpty(cv::Mat img, int row, int startCol, int endCol);
    static bool isRowEmpty(cv::Mat img, int row, int startCol, int endCol, int simple);
    static bool isRowEmpty(cv::Mat img, int row, int startCol, int endCol, int simple,int blankColorValue);
    static bool isRowEmpty(cv::Mat img, int row);
    //有数据行
    static bool rowHasData(cv::Mat img, int row);
    //满数据列
    static bool isColFull(cv::Mat img, int col, int startRow = 0);
    static bool isColFull(cv::Mat img, int col, int startRow, int endRow, int simple);
    static bool isColFull(cv::Mat img, int col, int startRow, int endRow, int simple, int splitColorFrom, int splitColorTo);
    //空数据列
    static bool isColEmpty(cv::Mat img, int row);
    static bool isColEmpty(cv::Mat img, int col, int fromRow, int endRow);
    static bool isColEmpty(cv::Mat img, int col, int simple);
    static bool isColEmpty(cv::Mat img, int col, int fromRow, int endRow,int blankColorValue);
    //有数据列
    static bool colHasData(cv::Mat img, int row);
};
#endif
FloatTrade/PositionDlg.cpp
New file
@@ -0,0 +1,229 @@
// PositionDlg.cpp: 实现文件
//
#include "common/pch.h"
#include "PositionDlg.h"
#include "afxdialogex.h"
#include "resource.h"
#include "../common/NetworkApi.h"
#include "../common/JsonUtil.h"
#include "../common/StringUtil.h"
#include <thread>
#include <map>
// PositionDlg 对话框
IMPLEMENT_DYNAMIC(PositionDlg, CDialogEx)
PositionDlg::PositionDlg(CWnd* pParent /*=nullptr*/)
    : CDialogEx(IDD_DIALOG_POSITION, pParent)
{
}
PositionDlg::~PositionDlg()
{
}
void PositionDlg::updatePositions()
{
    std::thread t1(requestAllPositions, this);
    t1.detach();
}
void PositionDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialogEx::DoDataExchange(pDX);
    DDX_Control(pDX, IDC_LIST_POSITION, listPositionCtrl);
}
void PositionDlg::requestAllPositions(PositionDlg* context)
{
    try {
        string result = NetworkApi::get_all_positions();
        auto doc = JsonUtil::parseUTF16(result);
        list<string> codes;
        if (doc[L"code"].GetInt() == 0) {
            auto data = doc[L"data"].GetArray();
            context->positionList.clear();
            for (int i = 0; i < data.Size(); i++) {
                auto item = data[i].GetObjectW();
                string code = StringUtil::cstring2String(item[L"code"].GetString());
                codes.push_back(code);
                CodePosition codePosition;
                codePosition.total = item[L"total"].GetInt();
                codePosition.available = item[L"available"].GetInt();
                codePosition.code = code;
                codePosition.name = item[L"code_name"].GetString();
                codePosition.costPrice = item[L"cost_price"].GetFloat();
                if (item.HasMember(L"volume_rate")) {
                    codePosition.volumeRate = item[L"volume_rate"].GetFloat();
                }
                else {
                    codePosition.volumeRate = 0;
                }
                codePosition.sell_rules_count = 0;
                context->positionList.push_back(codePosition);
            }
            // 获取代码同板块的涨停数量
             result = NetworkApi::get_same_block_limit_up_codes_count(codes);
             doc = JsonUtil::parseUTF16(result);
            if (doc.IsObject()) {
                if (doc[L"code"].GetInt() == 0) {
                    auto data = doc[L"data"].GetObjectW();
                    for (auto it = data.MemberBegin(); it != data.MemberEnd(); ++it) {
                        auto code = it->name.GetString();
                        auto blocks = it->value.GetObjectW();
                        int codeCount = 0;
                        for (auto bit = blocks.MemberBegin(); bit != blocks.MemberEnd(); ++bit) {
                            auto count = bit->value.GetInt();
                            if (count > codeCount) {
                                codeCount = count;
                            }
                        }
                        context->limitUpCodeCountMap[StringUtil::cstring2String(code)] = codeCount;
                    }
                }
                cout << result << endl;
            }
            context->listPositionCtrl.SetRedraw(false);
            context->listPositionCtrl.DeleteAllItems();
            int index = 0;
            for (list<CodePosition>::iterator e = context->positionList.begin(); e != context->positionList.end(); e++) {
                CodePosition position = *e;
                context->listPositionCtrl.InsertItem(index, CString(position.code.c_str()));
                context->listPositionCtrl.SetItemText(index, 0, position.name );
                CString volumeRate = CString(StringUtil::toString(position.volumeRate * 100, 0).c_str());
                volumeRate.Append(L"%");
                context->listPositionCtrl.SetItemText(index, 1, volumeRate);
                /*CString total=L"¥";
                total.Append(CString(StringUtil::toString(position.total * position.costPrice, 1).c_str()));
                context->listPositionCtrl.SetItemText(index, 3, total);*/
                if (context->limitUpCodeCountMap.find(position.code) != context->limitUpCodeCountMap.end()) {
                    context->listPositionCtrl.SetItemText(index, 3, to_wstring(context->limitUpCodeCountMap[position.code]).c_str());
                }
                else {
                    context->listPositionCtrl.SetItemText(index, 3, L"0");
                }
                CString available = L"¥";
                available.Append(CString(StringUtil::toString(position.available * position.costPrice, 1).c_str()));
    /*            available.Append(L" / ");
                available.Append(to_wstring(position.available).c_str());*/
                context->listPositionCtrl.SetItemText(index, 2, available);
                if (position.available==0) {
                    context->listPositionCtrl.SetItemData(index, 0);
                }
                else {
                    context->listPositionCtrl.SetItemData(index, 1);
                }
                index++;
            }
            context->listPositionCtrl.SetRedraw(true);
        }
    }
    catch (...) {
    }
}
BEGIN_MESSAGE_MAP(PositionDlg, CDialogEx)
    ON_NOTIFY(NM_CUSTOMDRAW, IDC_LIST_POSITION, &PositionDlg::OnNMCustomdrawListRules)
    ON_BN_CLICKED(IDC_BUTTON1, &PositionDlg::OnBnClickedButton1)
END_MESSAGE_MAP()
// PositionDlg 消息处理程序
BOOL PositionDlg::OnInitDialog()
{
    CDialogEx::OnInitDialog();
    // 初始化列表
    listPositionCtrl.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | WS_HSCROLL);
    listPositionCtrl.ModifyStyle(LVS_SINGLESEL, LVS_REPORT);
    //listPositionCtrl.SetRowHeigt(30);
    CRect rect;
    listPositionCtrl.GetClientRect(&rect);
    int unitSize = (rect.Width() - 5) / 3.5f;
    listPositionCtrl.InsertColumn(0, _T("名称"), LVCFMT_LEFT, unitSize * 0.9, 0);
    listPositionCtrl.InsertColumn(1, _T("量比"), LVCFMT_LEFT, unitSize * 0.6, 1);
    listPositionCtrl.InsertColumn(2, _T("剩余持仓"), LVCFMT_LEFT, unitSize * 1, 2);
    listPositionCtrl.InsertColumn(3, _T("同板块涨停"), LVCFMT_LEFT, unitSize * 1, 3);
    listPositionCtrl.AutoColumn();
    std::thread t1(requestAllPositions, this);
    t1.detach();
    return TRUE;  // return TRUE unless you set the focus to a control
                  // 异常: OCX 属性页应返回 FALSE
}
void PositionDlg::OnNMCustomdrawListRules(NMHDR* pNMHDR, LRESULT* pResult)
{
    LPNMCUSTOMDRAW pNMCD = reinterpret_cast<LPNMCUSTOMDRAW>(pNMHDR);
    NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>(pNMHDR);
    // TODO: 在此添加控件通知处理程序代码
    NMCUSTOMDRAW nmCustomDraw = pLVCD->nmcd;
    if (CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage)
    {
        *pResult = CDRF_NOTIFYITEMDRAW;
    }
    else if (CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage)
    {
        //整行处理
        if (0 == nmCustomDraw.lItemlParam)
        {
            pLVCD->clrText = RGB(144, 144, 144);
        }
        else if (1 == nmCustomDraw.lItemlParam)
        {
            pLVCD->clrText = RGB(0, 0, 0);
        }
        *pResult = CDRF_NOTIFYSUBITEMDRAW;
    }//这上面的都是默认的不用理
    else if ((CDDS_ITEMPREPAINT | CDDS_SUBITEM) == pLVCD->nmcd.dwDrawStage)
    {
        *pResult = 0;
        // 暂时不处理每一列
        return;
    }
}
void PositionDlg::OnBnClickedButton1()
{
    updatePositions();
}
FloatTrade/PositionDlg.h
New file
@@ -0,0 +1,45 @@
#pragma once
#include "SellStruct.h"
#include "../common/CMyListCtrl.h"
#include <map>
// PositionDlg 对话框
class PositionDlg : public CDialogEx
{
    DECLARE_DYNAMIC(PositionDlg)
private:
    std::list<CodePosition> positionList;
    std::map<string, int> limitUpCodeCountMap;
public:
    PositionDlg(CWnd* pParent = nullptr);   // 标准构造函数
    virtual ~PositionDlg();
    // 更新持仓
    void updatePositions();
// 对话框数据
#ifdef AFX_DESIGN_TIME
    enum { IDD = IDD_DIALOG_POSITION };
#endif
private:
    static void requestAllPositions(PositionDlg* context);
protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
    DECLARE_MESSAGE_MAP()
public:
    virtual BOOL OnInitDialog();
    CMyListCtrl listPositionCtrl;
    afx_msg void OnNMCustomdrawListRules(NMHDR* pNMHDR, LRESULT* pResult);
    afx_msg void OnBnClickedButton1();
};
FloatTrade/QueueListCtrl.cpp
New file
@@ -0,0 +1,37 @@
#include "common/pch.h"
#include "QueueListCtrl.h"
void QueueListCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
    CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC);
    CRect rcItem(lpDrawItemStruct->rcItem);
    int nItem = lpDrawItemStruct->itemID;
    LVITEM lvItem;
    lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE;
    lvItem.iItem = nItem;
    lvItem.iSubItem = 0;
    lvItem.stateMask = 0xFFFF; // Get all state flags
    GetItem(&lvItem);
    // 绘制背景
    pDC->FillSolidRect(rcItem, RGB(255, 255, 255)); // 设置背景颜色
    // 绘制文本
    CString strText = GetItemText(nItem, 0);
    pDC->SetTextColor(RGB(0, 0, 0)); // 设置文本颜色
    pDC->DrawText(strText, rcItem, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
    // 绘制图标(如果需要)
    if (lvItem.iImage != -1)
    {
        CImageList* pImageList = GetImageList(LVSIL_SMALL);
        if (pImageList)
        {
            IMAGEINFO imageInfo;
            pImageList->GetImageInfo(lvItem.iImage, &imageInfo);
            CRect rcImage = imageInfo.rcImage;
            pImageList->Draw(pDC, lvItem.iImage, CPoint(rcItem.left, rcItem.top), ILD_NORMAL);
        }
    }
}
FloatTrade/QueueListCtrl.h
New file
@@ -0,0 +1,8 @@
#pragma once
#include "common/pch.h"
class QueueListCtrl :CListCtrl{
public:
    virtual void DrawItem(_In_ LPDRAWITEMSTRUCT lpDrawItemStruct);
};
FloatTrade/SellManager.cpp
@@ -4,6 +4,7 @@
#include "../common/JsonUtil.h"
#include "ConfigUtil.h"
#include "../common/JsonUtil.h"
#include "../common/TimeUtil.h"
#include <iostream>
#include <ctime>
@@ -142,6 +143,11 @@
            msg.Append(to_wstring(sellSetting->lockMoney).c_str());
            throw wstring(msg);
        }
        // 当前时间在09:30之后,锁定时间在09:30之前的就返回默认值
        /*auto nowTime = stoi(TimeUtil::getNowTime("%H%M%S").c_str());
        if (nowTime >= 93000 && sellSetting->lockTime < 93000) {
            return    ConfigUtil::getSellMoney();
        }*/
        return sellSetting->lockMoney;
    }
@@ -293,8 +299,9 @@
        if (setting == nullptr) {
            setting = new SellSetting();
            setting->lock = true;
            setting->lockMoney = 5000;
            setting->lockMoney = ConfigUtil::getSellMoney();
            setting->lockBuy = true;
            setting->lockTime = stoi(TimeUtil::getNowTime("%H%M%S").c_str());
            setting->lockBuyMoney = 0;
            setting->setting_mode = SETTING_MODE_RATE;
            setting->mode1_rate_index = 4;
FloatTrade/SellStruct.h
@@ -14,6 +14,7 @@
    // 设置模式  1-分数  2-百分数
    SELL_SETTING_MODE setting_mode;
    int lockMoney;// 锁定的金额
    int lockTime;// 锁定时间
    bool lock;//是否锁定
    int lockBuyMoney;// 锁定的金额
    bool lockBuy;//是否锁定
@@ -38,4 +39,5 @@
    int sell_rules_count;//卖出规则数量
    list<int> sell_orders;// 已卖的订单数量
    float costPrice; // 成本价格
    float volumeRate;// 量比
};
FloatTrade/ThsCodeOCR.cpp
New file
@@ -0,0 +1,206 @@
#include "common/pch.h"
#include "ThsCodeOCR.h"
#include "win32_screen_shots.h"
#include "ImgDivider.h"
//
using namespace tesseract;
cv::Mat ThsCodeOCR::grayImage(cv::Mat src) {
    cv::Mat grayImage;
    if (src.channels() == 3)
    {
        cvtColor(src, grayImage, cv::COLOR_RGB2GRAY);
    }
    else if (src.channels() == 4) {
        cvtColor(src, grayImage, cv::COLOR_RGBA2GRAY);
    }
    else if (src.channels() == 1) {
        return src;
    }
    return grayImage;
}
ThsCodeOCR::ThsCodeOCR()
{
    tessApi = new tesseract::TessBaseAPI();
    // 设置语言
    if (tessApi->Init("tessdata", "eng")) {
        std::cerr << "Could not initialize tesseract.\n";
        exit(1);
    }
}
ThsCodeOCR::~ThsCodeOCR()
{
    if (tessApi != nullptr) {
        // 清理
        tessApi->End();
        delete tessApi;
    }
}
cv::Mat ThsCodeOCR::splitForCodeImg(cv::Mat src)
{
    int rows = src.rows;
    int cols = src.cols;
    int full_row = -1;
    int start_row = -1;
    int  end_row = -1;
    for (int r = 0; r < rows; r++) {
        if (ImgDivider::isRowFull(src, r, 0, cols / 2, 1, 14, 17)) {
            full_row = r;
            if (start_row >= 0 && r - start_row > 10) {
                end_row = r - 1;
                break;
            }
        }
        else {
            if (full_row > -1) {
                full_row = -1;
                if (start_row < 0) {
                    start_row = r;
                }
            }
        }
    }
    if (end_row < 0)
        end_row = rows - 1;
    if (start_row < 0)
        throw string("没找到上分割线");
    int  start_col = cols - 1;
    for (int c = cols*3/4; c >= 0; c--) {
        if (ImgDivider::isColFull(src, c, (start_row+ end_row)/2, end_row, 2, 14, 17)) {
            start_col = c + 1;
            break;
        }
    }
    int start_index = -1;
    int end_index = -1;
    list<POINT> codes_pos;
    int max_color = 0;
    // 计算右边后三分之一的最大像素
    for (int r = start_row; r < end_row; r++) {
        for (int c = cols - 1; c > start_col + (cols - start_col) / 3; c--) {
            if (src.ptr<uchar>(r)[c] > max_color)
                max_color = src.ptr<uchar>(r)[c];
        }
    }
    int thresh_hold_color = max_color * 2 / 3;
    for (int col = cols - 1; col > start_col; col--) {
        if (!ImgDivider::isColEmpty(src, col, start_row, end_row, thresh_hold_color)) {
            if (start_index < 0)
            {
                start_index = col;
            }
            end_index = col;
        }
        else {
            if (end_index >= 0 && start_index >= 0) {
                codes_pos.push_back(POINT({ end_index - 1, start_index + 1 }));
                end_index = -1;
                start_index = -1;
                if (codes_pos.size() >= 6) {
                    break;
                }
            }
        }
    }
    if (codes_pos.size() < 6) {
        throw string("没有找到6个数字");
    }
    codes_pos.sort([](POINT p1, POINT p2) {
        return p1.x < p2.x;
        });
    start_col = codes_pos.begin()->x;
    int end_col = codes_pos.back().y;
    return cv::Mat(src, cv::Rect(start_col, start_row, end_col - start_col + 1, end_row - start_row + 1));
}
string ThsCodeOCR::ocrCode(cv::Mat src)
{
    Pix* pix = pixCreate(src.cols, src.rows, 8);
    for (int y = 0; y < src.rows; ++y) {
        for (int x = 0; x < src.cols; ++x) {
            pixSetPixel(pix, x, y, src.ptr<uchar>(y)[x]);
        }
    }
    // 设置图像
    tessApi->SetImage(pix);
    // 获取文本
    char* outText = tessApi->GetUTF8Text();
    string text = string(outText);
    std::cout << "OCR output:\n" << outText << "\n";
    pixDestroy(&pix);
    delete[] outText;
    text = StringUtil::trim(text);
    // 取最后6位
    if (text.length() > 6) {
      text = text.substr(text.length()-6, 6);
    }
    return text;
}
string ThsCodeOCR::ocrCode()
{
    RECT rect;
    cv::Mat mat = ThsCodeOCR::capture(ConfigUtil::getOCRWindowParams());
    mat = ThsCodeOCR::splitForCodeImg(mat);
    string code = ocrCode(mat);
    return code;
}
HWND ThsCodeOCR::getTHSWindow()
{
    list<HWND> hwnds = Win32Util::searchWindow("同花顺");
    for (list<HWND>::iterator e = hwnds.begin(); e != hwnds.end(); ++e) {
        HWND hwnd = *e;
        HWND child = NULL;
        for (int i = 0; i < 20; i++) {
            child = FindWindowExA(hwnd, child, NULL, NULL);
            if (child > 0) {
                RECT rect;
                GetWindowRect(child, &rect);
                if (rect.right - rect.left > 1000 && rect.bottom - rect.top > 800) {
                    return child;
                }
            }
        }
    }
    return HWND();
}
cv::Mat ThsCodeOCR::capture(OCRWindowParams params)
{
    HWND hwnd = getTHSWindow();
    if (hwnd <= 0) {
        throw string("没有获取到同花顺窗口");
    }
    RECT rect;
    Win32Util::getWindowRect(hwnd, &rect);
    //[上边距, 宽度, 高度, 缩放倍数]
    int owidth = rect.right - rect.left + 1;
    RECT area;
    area.top = params.top;
    area.left = owidth - params.width;
    area.bottom = area.top + params.height - 1;
    area.right = owidth - 2;
    cv::Mat mat = _wss::get_window_bits(hwnd, &area);
    // 灰度转换
    mat = grayImage(mat);
    return mat;
}
FloatTrade/ThsCodeOCR.h
New file
@@ -0,0 +1,64 @@
#pragma once
#include "../common/StringUtil.h"
#include "../common/Win32Util.h"
#include "ConfigUtil.h"
#include <opencv2/opencv.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <tesseract/baseapi.h>
#include <leptonica/allheaders.h>
class ThsCodeOCR
{
private:
    tesseract::TessBaseAPI* tessApi;
private:
    /// <summary>
    /// 获取同花顺的句柄
    /// </summary>
    /// <returns></returns>
    static    HWND getTHSWindow();
    /// <summary>
    /// 灰度画图像
    /// </summary>
    /// <param name="src"></param>
    /// <returns></returns>
    static    cv::Mat grayImage(cv::Mat src);
public:
    ThsCodeOCR();
    ~ThsCodeOCR();
    /// <summary>
    /// 截图
    /// </summary>
    /// <returns></returns>
    static cv::Mat capture(OCRWindowParams params);
    /// <summary>
    /// 将获取到的灰度图切割出代码视图
    /// </summary>
    /// <param name="src"></param>
    /// <returns></returns>
    static    cv::Mat splitForCodeImg(cv::Mat src);
    /// <summary>
    /// 代码识别
    /// </summary>
    /// <param name="src"></param>
    /// <returns></returns>
    string ocrCode(cv::Mat src);
    /// <summary>
    /// 代码识别(包含截图/分隔)
    /// </summary>
    /// <returns></returns>
    string ocrCode();
};
FloatTrade/archive.dll
Binary files differ
FloatTrade/bz2.dll
Binary files differ
FloatTrade/concrt140d.dll
Binary files differ
FloatTrade/gif.dll
Binary files differ
FloatTrade/jpeg62.dll
Binary files differ
FloatTrade/leptonica-1.84.1d.dll
Binary files differ
FloatTrade/libcrypto-3-x64.dll
Binary files differ
FloatTrade/libcurl-d.dll
Binary files differ
FloatTrade/liblzma.dll
Binary files differ
FloatTrade/libpng16d.dll
Binary files differ
FloatTrade/libsharpyuv.dll
Binary files differ
FloatTrade/libwebp.dll
Binary files differ
FloatTrade/libwebpmux.dll
Binary files differ
FloatTrade/lz4.dll
Binary files differ
FloatTrade/opencv_world455d.dll
Binary files differ
FloatTrade/openjp2.dll
Binary files differ
FloatTrade/resource.h
@@ -15,6 +15,8 @@
#define IDB_PNG_CLOSE                   153
#define IDD_DIALOG_CODE_NAME            156
#define IDD_DIALOG_CB_TRADE             158
#define IDD_DIALOG_POSITION             160
#define IDD_DIALOG_DEAL_QUEUE           162
#define btn_already_canceled            1000
#define btn_sell                        1001
#define btn_white                       1002
@@ -34,6 +36,7 @@
#define check_trade_quick_key           1018
#define btn_close_buy                   1019
#define btn_buy_mode_want               1020
#define check_ocr_code                  1020
#define btn_open_buy                    1021
#define btn_buy_mode_all                1022
#define btn_buy                         1023
@@ -68,16 +71,26 @@
#define btn_sure3                       1045
#define btn_radical_buy_block_count_sure 1045
#define btn_sure_trade_params_setting   1046
#define edit_radical_buy_default_count_1 1047
#define IDC_EDIT_CODE                   1048
#define edit_radical_buy_default_count_2 1048
#define IDC_EDIT_BUY1_VOLUME            1049
#define edit_radical_buy_default_count_3 1049
#define IDC_EDIT_SELL_VOLUME            1050
#define edit_normal_buy_default_count_1 1050
#define IDC_EDIT_END_TIME               1051
#define IDC_EDIT_BUY_VOLUME             1051
#define edit_normal_buy_default_count_2 1051
#define IDC_EDIT_BUY1_PRICE             1052
#define IDC_EDIT_CODE3                  1052
#define edit_normal_buy_default_count_3 1052
#define IDC_BUTTON_CLEAR                1053
#define edit_tesseract_ocr_local_path   1053
#define IDC_BUTTON_DELETE               1054
#define btn_sure_ocr                    1054
#define IDC_STATIC_ID                   1055
#define btn_sure_ocr2                   1055
#define btn_sure_ocr_test               1055
#define IDC_BUTTON_ADD                  1056
#define IDC_LIST_RULES                  1057
#define IDC_EDIT_CODE2                  1058
@@ -186,9 +199,20 @@
#define IDC_EDIT_NAME_8                 1112
#define IDC_COMBO_TRADE_MODE            1112
#define IDC_STATIC_CODE_9               1113
#define combo_default_buy_money         1113
#define IDC_EDIT_NAME_9                 1114
#define IDC_LIST_POSITION               1114
#define IDC_STATIC_CODE_10              1115
#define IDC_BUTTON1                     1115
#define IDC_EDIT_NAME_10                1116
#define IDC_EDIT_OCR_WINDOW_PARAMS_TOP  1116
#define IDC_EDIT_OCR_WINDOW_PARAMS_WIDTH 1117
#define IDC_LIST1                       1117
#define IDC_LIST_DEAL_QUEUE             1117
#define IDC_EDIT_OCR_WINDOW_PARAMS_HEIGHT 1118
#define IDC_EDIT1                       1118
#define IDC_EDIT_MIN_MONEY              1118
#define IDC_EDIT_OCR_WINDOW_PARAMS_SCALE 1119
#define IDC_EDIT_VOLUME_5               1120
#define IDC_EDIT_VOLUME_6               1121
#define IDC_EDIT_VOLUME_7               1122
@@ -205,14 +229,50 @@
#define IDC_EDIT_RADICAL_BUY_COUNT_3    1133
#define IDC_EDIT_RADICAL_BUY_BLOCK_4    1134
#define IDC_EDIT_RADICAL_BUY_COUNT_4    1135
#define IDC_EDIT_RADICAL_BUY_PRICE_MIN  1136
#define IDC_EDIT_RADICAL_BUY_PRICE_MAX  1137
#define IDC_EDIT_RADICAL_BUY_ZYLTGB_MIN 1138
#define IDC_EDIT_RADICAL_BUY_ZYLTGB_MAX 1139
#define IDC_EDIT_RADICAL_BUY_ZYLTGB_MIN2 1140
#define IDC_EDIT_RADICAL_BUY_ZYLTGB_MAX2 1141
#define IDC_EDIT_RADICAL_BUY_PRICE_MAX2 1142
#define IDC_EDIT_BUY_OPEN_LIMIT_UP_CODES 1142
#define IDC_EDIT_RADICAL_BUY_PRICE_MIN_1 1143
#define IDC_EDIT_RADICAL_BUY_PRICE_MAX_1 1144
#define IDC_EDIT_RADICAL_BUY_PRICE_MIN_2 1145
#define IDC_EDIT_RADICAL_BUY_PRICE_MAX_2 1146
#define IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_1 1147
#define IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_1 1148
#define IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_1 1149
#define IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_2 1150
#define IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_2 1151
#define IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_2 1152
#define IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_3 1153
#define IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_3 1154
#define IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_3 1155
#define IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_4 1156
#define IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_4 1157
#define IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_4 1158
#define IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MIN_5 1159
#define IDC_EDIT_RADICAL_BUY_MARKET_STRONG_MAX_5 1160
#define IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_5 1161
#define IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_6 1162
#define IDC_EDIT_RADICAL_BUY_SPECIAL_BLOCK_IN_RANK 1162
#define IDC_EDIT_DEFAULT_BUY_MONEY      1163
#define IDC_EDIT_DEFAULT_BUY_MONEY2     1164
#define IDC_EDIT_DEFAULT_SELL_MONEY     1164
#define IDC_EDIT_RADICAL_BUY_BLOCK_IN_RANK_7 1165
#define IDC_EDIT_IGNORE_BLOCK_IN_MARKET_STRONG 1165
#define IDC_CHECK_BUY_FIRST             1167
#define IDC_CHECK_BUY_FIRST_LIMIT_UP    1167
// Next default values for new objects
// 
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE        160
#define _APS_NEXT_RESOURCE_VALUE        164
#define _APS_NEXT_COMMAND_VALUE         32771
#define _APS_NEXT_CONTROL_VALUE         1113
#define _APS_NEXT_CONTROL_VALUE         1168
#define _APS_NEXT_SYMED_VALUE           101
#endif
#endif
FloatTrade/tessdata/ScrollView.jar
Binary files differ
FloatTrade/tessdata/configs/alto
New file
@@ -0,0 +1 @@
tessedit_create_alto 1
FloatTrade/tessdata/configs/ambigs.train
New file
@@ -0,0 +1,7 @@
tessedit_ambigs_training    1
load_freq_dawg    0
load_punc_dawg    0
load_system_dawg    0
load_number_dawg    0
ambigs_debug_level    3
load_fixed_length_dawgs    0
FloatTrade/tessdata/configs/api_config
New file
@@ -0,0 +1 @@
tessedit_zero_rejection T
FloatTrade/tessdata/configs/bigram
New file
@@ -0,0 +1,5 @@
load_bigram_dawg    True
tessedit_enable_bigram_correction    True
tessedit_bigram_debug    3
save_raw_choices    True
save_alt_choices    True
FloatTrade/tessdata/configs/box.train
New file
@@ -0,0 +1,12 @@
disable_character_fragments T
file_type                   .bl
textord_fast_pitch_test    T
tessedit_zero_rejection T
tessedit_minimal_rejection F
tessedit_write_rep_codes F
edges_children_fix F
edges_childarea 0.65
edges_boxarea 0.9
tessedit_resegment_from_boxes T
tessedit_train_from_boxes T
textord_no_rejects T
FloatTrade/tessdata/configs/box.train.stderr
New file
@@ -0,0 +1,13 @@
file_type .bl
#tessedit_use_nn F
textord_fast_pitch_test T
tessedit_zero_rejection T
tessedit_minimal_rejection F
tessedit_write_rep_codes F
edges_children_fix F
edges_childarea 0.65
edges_boxarea 0.9
tessedit_resegment_from_boxes T
tessedit_train_from_boxes T
#textord_repeat_extraction F
textord_no_rejects T
FloatTrade/tessdata/configs/digits
New file
@@ -0,0 +1 @@
tessedit_char_whitelist 0123456789-.
FloatTrade/tessdata/configs/get.images
New file
@@ -0,0 +1 @@
tessedit_write_images T
FloatTrade/tessdata/configs/hocr
New file
@@ -0,0 +1,2 @@
tessedit_create_hocr 1
hocr_font_info 0
FloatTrade/tessdata/configs/inter
New file
@@ -0,0 +1,2 @@
interactive_display_mode                T
tessedit_display_outwords        T
FloatTrade/tessdata/configs/kannada
New file
@@ -0,0 +1,4 @@
textord_skewsmooth_offset 8
textord_skewsmooth_offset2 8
textord_merge_desc 0.5
textord_no_rejects 1
FloatTrade/tessdata/configs/linebox
New file
@@ -0,0 +1,2 @@
tessedit_resegment_from_line_boxes 1
tessedit_make_boxes_from_boxes 1
FloatTrade/tessdata/configs/logfile
New file
@@ -0,0 +1 @@
debug_file tesseract.log
FloatTrade/tessdata/configs/lstm.train
New file
@@ -0,0 +1,11 @@
file_type                   .bl
textord_fast_pitch_test    T
tessedit_zero_rejection T
tessedit_minimal_rejection F
tessedit_write_rep_codes F
edges_children_fix F
edges_childarea 0.65
edges_boxarea 0.9
tessedit_train_line_recognizer T
textord_no_rejects T
tessedit_init_config_only T
FloatTrade/tessdata/configs/lstmbox
New file
@@ -0,0 +1 @@
tessedit_create_lstmbox 1
FloatTrade/tessdata/configs/lstmdebug
New file
@@ -0,0 +1,4 @@
stopper_debug_level 1
classify_debug_level 1
segsearch_debug_level 1
language_model_debug_level 3
FloatTrade/tessdata/configs/makebox
New file
@@ -0,0 +1 @@
tessedit_create_boxfile 1
FloatTrade/tessdata/configs/page
New file
@@ -0,0 +1,3 @@
tessedit_create_page_xml 1
# page_xml_polygon 1
# page_xml_level 0
FloatTrade/tessdata/configs/pdf
New file
@@ -0,0 +1 @@
tessedit_create_pdf 1
FloatTrade/tessdata/configs/quiet
New file
@@ -0,0 +1 @@
debug_file /dev/null
FloatTrade/tessdata/configs/rebox
New file
@@ -0,0 +1,2 @@
tessedit_resegment_from_boxes 1
tessedit_make_boxes_from_boxes 1
FloatTrade/tessdata/configs/strokewidth
New file
@@ -0,0 +1,12 @@
textord_show_blobs 0
textord_debug_tabfind 3
textord_tabfind_show_partitions 1
textord_tabfind_show_initial_partitions 1
textord_tabfind_show_columns 1
textord_tabfind_show_blocks 1
textord_tabfind_show_initialtabs 1
textord_tabfind_show_finaltabs 1
textord_tabfind_show_strokewidths 1
textord_tabfind_show_vlines 0
textord_tabfind_show_images 1
tessedit_dump_pageseg_images 0
FloatTrade/tessdata/configs/tsv
New file
@@ -0,0 +1 @@
tessedit_create_tsv 1
FloatTrade/tessdata/configs/txt
New file
@@ -0,0 +1,3 @@
# This config file should be used with other config files which create renderers.
# usage example: tesseract eurotext.tif eurotext txt hocr pdf
tessedit_create_txt 1
FloatTrade/tessdata/configs/unlv
New file
@@ -0,0 +1,2 @@
tessedit_write_unlv 1
unlv_tilde_crunching T
FloatTrade/tessdata/configs/wordstrbox
New file
@@ -0,0 +1 @@
tessedit_create_wordstrbox 1
FloatTrade/tessdata/eng.traineddata
Binary files differ
FloatTrade/tessdata/jaxb-api-2.3.1.jar
Binary files differ
FloatTrade/tessdata/osd.traineddata
Binary files differ
FloatTrade/tessdata/pdf.ttf
Binary files differ
FloatTrade/tessdata/piccolo2d-core-3.0.1.jar
Binary files differ
FloatTrade/tessdata/piccolo2d-extras-3.0.1.jar
Binary files differ
FloatTrade/tessdata/tessconfigs/batch
New file
@@ -0,0 +1 @@
# No content needed as all defaults are correct.
FloatTrade/tessdata/tessconfigs/batch.nochop
New file
@@ -0,0 +1,2 @@
chop_enable 0
wordrec_enable_assoc 0
FloatTrade/tessdata/tessconfigs/matdemo
New file
@@ -0,0 +1,7 @@
#################################################
# Adaptive Matcher Using PreAdapted Templates
#################################################
classify_enable_adaptive_debugger   1
matcher_debug_flags         6
matcher_debug_level       1
FloatTrade/tessdata/tessconfigs/msdemo
New file
@@ -0,0 +1,12 @@
#################################################
# Adaptive Matcher Using PreAdapted Templates
#################################################
classify_enable_adaptive_debugger    1
matcher_debug_flags         6
matcher_debug_level       1
wordrec_display_splits          0
wordrec_display_all_blobs       1
wordrec_display_segmentations   2
classify_debug_level        1
FloatTrade/tessdata/tessconfigs/nobatch
New file
@@ -0,0 +1 @@
FloatTrade/tessdata/tessconfigs/segdemo
New file
@@ -0,0 +1,9 @@
#################################################
# Adaptive Matcher Using PreAdapted Templates
#################################################
wordrec_display_splits          0
wordrec_display_all_blobs       1
wordrec_display_segmentations   2
classify_debug_level        1
stopper_debug_level 1
FloatTrade/tesseract55.lib
Binary files differ
FloatTrade/tesseract55d.dll
Binary files differ
FloatTrade/tiffd.dll
Binary files differ
FloatTrade/win32_screen_shots.cpp
New file
@@ -0,0 +1,133 @@
#include "common/pch.h"
#include "win32_screen_shots.h"
namespace _wss
{
    cv::Mat get_window_bits(HWND h, RECT* area)
    {
        //printf("窗体:%d \n",h==NULL?0: 1);
        cv::Mat result;
        HBITMAP bit = nullptr;
        RECT rect{ 0 };
        int width = 0, height = 0;
        HDC hdc = nullptr, hdc_compatible = nullptr;
        BITMAP info{ 0 };
        int channels = 0;
        if (h == nullptr)
            return result;
        do
        {
            if (GetWindowRect(h, &rect) == FALSE)
                break;
            int owidth = abs( rect.right - rect.left);
            int oheight =abs( rect.bottom - rect.top);
            // 截图的区域
            width = owidth;
            height = oheight;
            int startx = 0;
            int starty = 0;
            if (area != nullptr) {
                width = area->right - area->left + 1;
                height = area->bottom - area->top + 1;
                startx = area->left;
                starty = area->top;
            }
            hdc = GetWindowDC(h);
            if (hdc == nullptr)
                break;
            hdc_compatible = CreateCompatibleDC(hdc);
            if (hdc_compatible == nullptr)
                break;
            bit = CreateCompatibleBitmap(hdc, width, height);
            if (bit == nullptr)
                break;
            SelectObject(hdc_compatible, bit);
            if (BitBlt(hdc_compatible, 0, 0, width, height, hdc, startx, starty, SRCCOPY) == FALSE)
                break;
            if (GetObjectA(bit, sizeof(BITMAP), &info) == 0)
                break;
            channels = info.bmBitsPixel == 1 ? 1 : info.bmBitsPixel / 8;
            result.create(cv::Size(info.bmWidth, info.bmHeight), CV_MAKETYPE(CV_8U, channels));
            if (GetBitmapBits(bit, info.bmHeight * info.bmWidth * channels, result.data) == 0)
              break;
            //单通道图
            //result.create(cv::Size(info.bmWidth, info.bmHeight), CV_8UC1);
            //if (GetBitmapBits(bit, info.bmHeight * info.bmWidth * channels, result.data) == 0)
            //    break;
        } while (false);
        if (hdc)
            ReleaseDC(h, hdc);
        if (hdc_compatible)
            DeleteDC(hdc_compatible);
        if (bit)
            DeleteObject(bit);
        return result;
    }
    cv::Mat screen_shot_by_window(HWND h)
    {
        return get_window_bits(h);
    }
    cv::Mat screen_shot_by_window(std::string name)
    {
        return get_window_bits(FindWindowA(0, name.c_str()));
    }
    cv::Mat screen_shot_by_full_screen(HWND h)
    {
        cv::Mat desktop;
        if (h == nullptr)
            return desktop;
        desktop = get_window_bits(GetDesktopWindow());
        if (desktop.empty())
            return desktop;
        RECT rect{ 0 };
        if (GetWindowRect(h, &rect) == FALSE)
            return desktop;
        if (rect.left < 0)
            rect.left = 0;
        if (rect.top < 0)
            rect.top = 0;
        int width = rect.right - rect.left;
        int height = rect.bottom - rect.top;
        cv::Mat result = desktop(cv::Rect(rect.left, rect.top, width, height));
        return result;
    }
    cv::Mat screen_shot_by_full_screen(std::string name)
    {
        return screen_shot_by_full_screen(FindWindowA(0, name.c_str()));
    }
}
FloatTrade/win32_screen_shots.h
New file
@@ -0,0 +1,38 @@
#pragma once
#include <Windows.h>
#include <string>
// 记住包含opencv目录
#include<opencv2\opencv.hpp>
#pragma comment(lib, "user32.lib")
namespace _wss
{
    /**
     * 获取指定窗口句柄的mat
     * @Param : h
     */
    cv::Mat get_window_bits(HWND h,RECT *rect=nullptr);
    /**
    * 直接根据窗口进行截图
    * @Param : name
    * @Param : h
    */
    cv::Mat screen_shot_by_window(std::string name);
    cv::Mat screen_shot_by_window(HWND h);
    /**
     * 先截取全屏后根据窗口位置进行截图
     * @Param : name
     * @Param : h
     */
    cv::Mat screen_shot_by_full_screen(std::string name);
    cv::Mat screen_shot_by_full_screen(HWND h);
}
FloatTrade/zlib1.dll
Binary files differ
FloatTrade/zlibd1.dll
Binary files differ
FloatTrade/zstd.dll
Binary files differ
Monitor/Monitor.aps
Binary files differ
Monitor/Monitor.rc
Binary files differ
Monitor/MonitorDlg.cpp
@@ -66,6 +66,8 @@
        if (kill) {
            break;
        }
        dlg->taskUpdateTimeMap[REQUEST_TASK_L2_SUBSCRIPT] = TimeUtil::getNowTime();
        try {
            SubscriptCodesResult result = NetworkApi::get_huaxin_subscript_codes();
            if (result.codeInfos.size() > 0) {
@@ -485,6 +487,7 @@
        }
        try {
            dlg->taskUpdateTimeMap[REQUEST_TASK_ENV] = TimeUtil::getNowTime();
            string result = NetworkApi::get_env_status();
            CString st = L"";
@@ -492,7 +495,7 @@
            if (doc.IsObject()) {
                if (doc[L"code"] == 0) {
                    auto  data = doc[L"data"].GetObjectW();
                    if (data[L"juejin"].GetInt() == 1) {
                    if (data.HasMember(L"juejin")&&data[L"juejin"].GetInt() == 1) {
                        dlg->labelColors[IDC_STATIC_JUEJIN_STATE] = RGB(0, 0, 0);
                        dlg->labelJueJinState.SetWindowTextW(L"正常");
                    }
@@ -661,75 +664,77 @@
        if (kill) {
            break;
        }
        try {
            string result = NetworkApi::list_system_log(dlg->logStartIndex, 20);
            cout << result << endl;
            rapidjson::GenericDocument<rapidjson::UTF16<>>  doc = JsonUtil::parseUTF16(result);
        if (dlg->checkAutoPullLogs.GetCheck()) {
            try {
                string result = NetworkApi::list_system_log(dlg->logStartIndex, 20);
                cout << result << endl;
                rapidjson::GenericDocument<rapidjson::UTF16<>>  doc = JsonUtil::parseUTF16(result);
            if (doc.IsObject() && doc[L"code"].GetInt() == 0) {
                list<TradeDealRecord> tempRecordList;
                //解析结果
                auto dataList = doc[L"data"][L"list"].GetArray();
                if (dataList.Size() > 0) {
                    dlg->logStartIndex += dataList.Size();
                    std::list<CString> tempList;
                    for (int i = 0; i < dataList.Size(); i++) {
                        auto item = dataList[i].GetArray();
                        CString time = item[0].GetString();
                        CString level = item[1].GetString();
                        CString content = item[2].GetString();
                        CString contentStr = L"";
                        contentStr.Append(time.Mid(11));
                        contentStr.Append(L" - ");
                        contentStr.Append(L"[");
                        contentStr.Append(level);
                        contentStr.Append(L"] ");
                        contentStr.Append(content);
                        tempList.push_back(contentStr);
                    }
                    CString content;
                    for (std::list<CString>::iterator el = tempList.begin(); el != tempList.end(); ++el) {
                        content.Append(*el);
                        content.Append(L"\r\n");
                        dlg->logList.push_back(*el);
                    }
                    tempList.clear();
                    //追加文本
                    int nLength = dlg->editLog.GetWindowTextLength();
                    dlg->editLog.SetSel(nLength, nLength);//定位到文本末尾
                    dlg->editLog.ReplaceSel(content);//在文本末尾追加
                    if (dlg->logList.size() > dlg->MAX_LOG_LINES) {
                        //删除前几行
                        int delLength = 0;
                        int delCount = 0;
                        int delLine = dlg->logList.size() - dlg->MAX_LOG_LINES;
                        for (int i = 0; i < delLine; i++) {
                            delCount += 1;
                            list<CString>::iterator its = (dlg->logList).begin();
                            advance(its, i);
                            CString content = *its;
                if (doc.IsObject() && doc[L"code"].GetInt() == 0) {
                    list<TradeDealRecord> tempRecordList;
                    //解析结果
                    auto dataList = doc[L"data"][L"list"].GetArray();
                    if (dataList.Size() > 0) {
                        dlg->logStartIndex += dataList.Size();
                        std::list<CString> tempList;
                        for (int i = 0; i < dataList.Size(); i++) {
                            auto item = dataList[i].GetArray();
                            CString time = item[0].GetString();
                            CString level = item[1].GetString();
                            CString content = item[2].GetString();
                            CString contentStr = L"";
                            contentStr.Append(time.Mid(11));
                            contentStr.Append(L" - ");
                            contentStr.Append(L"[");
                            contentStr.Append(level);
                            contentStr.Append(L"] ");
                            contentStr.Append(content);
                            tempList.push_back(contentStr);
                        }
                        CString content;
                        for (std::list<CString>::iterator el = tempList.begin(); el != tempList.end(); ++el) {
                            content.Append(*el);
                            content.Append(L"\r\n");
                            delLength += content.GetLength();
                            dlg->logList.push_back(*el);
                        }
                        for (int i = 0; i < delCount; i++) {
                            (dlg->logList).pop_front();
                        }
                        //删除前面的文本
                        dlg->editLog.SetSel(0, delLength);
                        dlg->editLog.ReplaceSel(_T(""));
                        tempList.clear();
                        //追加文本
                        int nLength = dlg->editLog.GetWindowTextLength();
                        dlg->editLog.SetSel(nLength, nLength);//定位到文本末尾
                        dlg->editLog.ReplaceSel(content);//在文本末尾追加
                        if (dlg->logList.size() > dlg->MAX_LOG_LINES) {
                            //删除前几行
                            int delLength = 0;
                            int delCount = 0;
                            int delLine = dlg->logList.size() - dlg->MAX_LOG_LINES;
                            for (int i = 0; i < delLine; i++) {
                                delCount += 1;
                                list<CString>::iterator its = (dlg->logList).begin();
                                advance(its, i);
                                CString content = *its;
                                content.Append(L"\r\n");
                                delLength += content.GetLength();
                            }
                            for (int i = 0; i < delCount; i++) {
                                (dlg->logList).pop_front();
                            }
                            //删除前面的文本
                            dlg->editLog.SetSel(0, delLength);
                            dlg->editLog.ReplaceSel(_T(""));
                            int nLength = dlg->editLog.GetWindowTextLength();
                            dlg->editLog.SetSel(nLength, nLength);//定位到文本末尾
                        }
                    }
                }
            }
        }
        catch (...) {
            catch (...) {
            }
        }
        // 每1s请求一次
        Sleep(2000);
@@ -847,6 +852,7 @@
    DDX_Control(pDX, IDC_BUTTON_SEARCH, btnSearch);
    DDX_Control(pDX, IDC_STATIC_TODAY_K_BARS_COUNT, labelTodayKBarsCount);
    DDX_Control(pDX, IDC_STATIC_DATA_SERVER_STATE, labelDataServerState);
    DDX_Control(pDX, IDC_CHECK_READ_LOGS, checkAutoPullLogs);
}
@@ -1071,19 +1077,27 @@
void MonitorDlg::OnBnClickedButtonSyncShszCodes()
{
    CString msg = L"";
    string result = NetworkApi::sync_l1_subscript_codes();
    auto resultDoc = JsonUtil::parseUTF8(result);
    if (resultDoc.IsObject() && resultDoc["code"].GetInt() == 0) {
        int count = resultDoc["data"]["codes_sh"].GetInt() + resultDoc["data"]["codes_sz"].GetInt();
        CString msg;
        msg.Append(L"更新成功,代码总数:");
        msg.Append(L"L1代码更新:成功,代码总数:");
        msg.Append(std::to_wstring(count).c_str());
        MessageBox(msg, L"提示");
    }
    else {
        AfxMessageBox(L"更新失败");
        msg.Append(L"L1代码更新:失败\n");
    }
    result = NetworkApi::sync_radical_buy_special_codes();
    auto doc = JsonUtil::parseUTF16(result);
    if (doc.IsObject() && doc[L"code"].GetInt() == 0) {
        msg.Append(L"扫入辨识度代码更新:成功,");
        msg.Append(doc[L"msg"].GetString());
    }
    else {
        msg.Append(L"扫入辨识度代码更新:失败\n");
    }
    MessageBox(msg, L"提示");
}
Monitor/MonitorDlg.h
@@ -35,6 +35,11 @@
};
enum TaskType {
    REQUEST_TASK_ENV, // 环境更新
    REQUEST_TASK_L2_SUBSCRIPT,//L2订阅更新
};
class MonitorDlg : public CDialogEx
{
    DECLARE_DYNAMIC(MonitorDlg)
@@ -44,6 +49,9 @@
    bool kplDataWarning;
    CString searchCode;
    // 任务更新时间
    map<TaskType, string> taskUpdateTimeMap;
    
    const int MAX_LOG_LINES = 100;
    map<int,COLORREF> labelColors;
@@ -135,4 +143,5 @@
    CStatic labelTodayKBarsCount;
    afx_msg void OnBnClickedButtonSyncKBars();
    CStatic labelDataServerState;
    CButton checkAutoPullLogs;
};
Monitor/resource.h
@@ -26,8 +26,9 @@
#define IDC_STATIC_L2_POSITION_SUBSCRIPT_CODES_UPDATE_TIME2 1018
#define IDC_EDIT_CODE_FOR_SEARCH        1019
#define IDC_STATIC_TODAY_K_BARS_COUNT   1020
#define IDC_STATIC_L2_LISTEN_ACTIVE2    1021
#define IDC_STATIC_DATA_SERVER_STATE    1021
#define IDC_CHECK3                      1023
#define IDC_CHECK_READ_LOGS             1023
#define IDC_BUTTON_REFRESH_DELEGATE     1038
#define IDC_BUTTON_REFRESH_DEAL         1039
#define IDC_BUTTON_REFRESH_POSITION     1040
@@ -50,7 +51,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE        129
#define _APS_NEXT_COMMAND_VALUE         32771
#define _APS_NEXT_CONTROL_VALUE         1015
#define _APS_NEXT_CONTROL_VALUE         1024
#define _APS_NEXT_SYMED_VALUE           101
#endif
#endif
Setup/Setup.vdproj
@@ -15,7 +15,91 @@
    {
        "Entry"
        {
        "MsmKey" = "8:_032AA12CF1B84BCD941C04C6C4728B6D"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_08D200E6FD7D4191AF6B9C2A1E9A57D0"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_17D1CBD9403F4F619D0B103A9F1101B2"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_1BA2AB0D98BA48CEB1FDD1630B52DDAB"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_1E137A1EFC6641D5B95AD59098B73B4E"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_1EE1B8DD950A455BBB1A5C2B763F62E8"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_25F733C0A7C849CBAD58845A8B630C84"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_2628975DC2C8464AB500D94F377F169A"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_27787C8224C249D58DC9211BBA529DE0"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_27FFCDC075FB4C40B6295023500E3F40"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_2FA21654CBD744A5B6885F3C79C64877"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_345D87802E8C4B57A7139634B9B5F74C"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_34DC3D597B5749E68B8883579F603EC2"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_35373509491D43D69B4981CCA71AE0B0"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_3EAF41D6A99D4287AE4ED4AEFC0AE5EE"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
@@ -27,7 +111,49 @@
        }
        "Entry"
        {
        "MsmKey" = "8:_4173C6C9F3FE4F919D62F1AC5EEE375B"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_4558D2F5AF144692B9A3EA61944170AB"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_5188FE73D36D45AB9571781D46327527"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_5649A9E875A940B0815095884710288D"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_5784406758024724B29ACD7889EDCE9A"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_57E3221BBD164BA499040C201AEEAA37"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_592A5139F33A4A9FAF005DEFF78E7C7C"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_5969A29EAA2549EB93C63C7AD513319D"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
@@ -39,7 +165,103 @@
        }
        "Entry"
        {
        "MsmKey" = "8:_683FD450CC48498A85CAC67106ADCE98"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_6A8845E415074D4C9695821DEC708BCE"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_71FEDFDC284C4A71BDD5881AF8C45791"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_73CD94E14BFE42F5906C222E5FC22253"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_74F71FDAD1BA4787A7CDEC3CA2362EC3"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_7EA47563BF9D465E86879D8C061E8C51"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_86EB12744E3546AC85F181FF8B805D62"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_8C8068464FF945BF88C60D5C68734749"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_8F04270E975D4A1688F2192E7123991F"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_90337F65A31F462A84ED9ACEFAF706C6"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_96A335EC33B84B8F9A4BA4F29CA2A450"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_9BF0CF188BB841A4B38D854C7740D54E"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_9F0FC13279AA48DB8902195749D50834"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_A08951260C454477BCD7733CF53000F3"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_A5AC00A7964F45E98EF12B0FEE0E0600"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_A844BEB662C44F46BDBB3B5CA78C0C75"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_AC5A8626ADDA4186AE593C67DC81C7F2"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
@@ -51,13 +273,133 @@
        }
        "Entry"
        {
        "MsmKey" = "8:_B08BAEB307E04078A356720EB9A28017"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_B389AD0C9FA049E4A9A1977D868F076C"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_B5B642D48C3546CE926EB13BAF2E5177"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_B7246D58B84043D39062039AD41F9F21"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_BB4DF96C41F541019C326B176C236D1B"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_BDAF6B9D2DCB4482B189A9E5D34B5152"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_BF420EB70674460FA11D398B519696FD"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_BFF973E52B9249F2AD0D7C96CA1357F6"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_C7F083BC8A6145639C9C3AD1F55DD07F"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_C83DDC2918704C53B094A095BB277015"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_CB9C810D84B34D16932CF0DDD151FC5D"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_CDFB2099896840BEA00588CF17330D7A"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_CEDFBA9B49594344AA9D01E410F7E740"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_D16DE00BFFD44FA7A9B57ECDA836BE94"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_D4C10FE640DD46A8A76CD951E0AB3895"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_D6E4C1B5D888478C905850E370C37B68"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_D7A787C658EE45FC94888D03CCBFB0D1"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_D8EB1699257348E890D401AD946F5572"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_DA5D463A5E274903A20CC00C60825689"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_DE7622DC4C6F404F9B6D3B6920FA81B5"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_DF3FA200D364407C877B6B8AF680E966"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_E26497A2A36F4D49A5ED95E83663C282"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
@@ -70,6 +412,24 @@
        "Entry"
        {
        "MsmKey" = "8:_E9DFEEFEA0BB48CEAE99B76404DEB89D"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_EEF0F374FCEB491E9F70D751303BA4B6"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_FDA089A09482488EBB46946874EC12CF"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
        "Entry"
        {
        "MsmKey" = "8:_FF26460B61724A69BCCBE71636123FB8"
        "OwnerKey" = "8:_UNDEFINED"
        "MsmSig" = "8:_UNDEFINED"
        }
@@ -160,6 +520,226 @@
        }
        "File"
        {
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_032AA12CF1B84BCD941C04C6C4728B6D"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\hocr"
            "TargetName" = "8:hocr"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_08D200E6FD7D4191AF6B9C2A1E9A57D0"
            {
            "SourcePath" = "8:..\\FloatTrade\\opencv_world455d.dll"
            "TargetName" = "8:opencv_world455d.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_17D1CBD9403F4F619D0B103A9F1101B2"
            {
            "SourcePath" = "8:..\\FloatTrade\\tiffd.dll"
            "TargetName" = "8:tiffd.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1BA2AB0D98BA48CEB1FDD1630B52DDAB"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\tessconfigs\\batch.nochop"
            "TargetName" = "8:batch.nochop"
            "Tag" = "8:"
            "Folder" = "8:_77921A2FD41F4D3D875390CC7D83A5F6"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1E137A1EFC6641D5B95AD59098B73B4E"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\digits"
            "TargetName" = "8:digits"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_1EE1B8DD950A455BBB1A5C2B763F62E8"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\jaxb-api-2.3.1.jar"
            "TargetName" = "8:jaxb-api-2.3.1.jar"
            "Tag" = "8:"
            "Folder" = "8:_7BFD0D489F3F40748071F26982BA0CF1"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_25F733C0A7C849CBAD58845A8B630C84"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\ScrollView.jar"
            "TargetName" = "8:ScrollView.jar"
            "Tag" = "8:"
            "Folder" = "8:_7BFD0D489F3F40748071F26982BA0CF1"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_2628975DC2C8464AB500D94F377F169A"
            {
            "SourcePath" = "8:..\\FloatTrade\\zstd.dll"
            "TargetName" = "8:zstd.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_27787C8224C249D58DC9211BBA529DE0"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\alto"
            "TargetName" = "8:alto"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_27FFCDC075FB4C40B6295023500E3F40"
            {
            "SourcePath" = "8:..\\FloatTrade\\libcrypto-3-x64.dll"
            "TargetName" = "8:libcrypto-3-x64.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_2FA21654CBD744A5B6885F3C79C64877"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\page"
            "TargetName" = "8:page"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_345D87802E8C4B57A7139634B9B5F74C"
            {
            "SourcePath" = "8:dependency\\ucrtbased.dll"
@@ -180,10 +760,110 @@
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_34DC3D597B5749E68B8883579F603EC2"
            {
            "SourcePath" = "8:..\\FloatTrade\\libsharpyuv.dll"
            "TargetName" = "8:libsharpyuv.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_35373509491D43D69B4981CCA71AE0B0"
            {
            "SourcePath" = "8:..\\FloatTrade\\leptonica-1.84.1d.dll"
            "TargetName" = "8:leptonica-1.84.1d.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_3EAF41D6A99D4287AE4ED4AEFC0AE5EE"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\piccolo2d-extras-3.0.1.jar"
            "TargetName" = "8:piccolo2d-extras-3.0.1.jar"
            "Tag" = "8:"
            "Folder" = "8:_7BFD0D489F3F40748071F26982BA0CF1"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_3EE6DCCB8F6E4393B41052ED30C64FFD"
            {
            "SourcePath" = "8:dependency\\mfc140ud.dll"
            "TargetName" = "8:mfc140ud.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_4173C6C9F3FE4F919D62F1AC5EEE375B"
            {
            "SourcePath" = "8:..\\FloatTrade\\openjp2.dll"
            "TargetName" = "8:openjp2.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_4558D2F5AF144692B9A3EA61944170AB"
            {
            "SourcePath" = "8:..\\FloatTrade\\libcurl-d.dll"
            "TargetName" = "8:libcurl-d.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
@@ -220,10 +900,330 @@
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_5649A9E875A940B0815095884710288D"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\kannada"
            "TargetName" = "8:kannada"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_5784406758024724B29ACD7889EDCE9A"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\eng.traineddata"
            "TargetName" = "8:eng.traineddata"
            "Tag" = "8:"
            "Folder" = "8:_7BFD0D489F3F40748071F26982BA0CF1"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_57E3221BBD164BA499040C201AEEAA37"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\lstm.train"
            "TargetName" = "8:lstm.train"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_592A5139F33A4A9FAF005DEFF78E7C7C"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\logfile"
            "TargetName" = "8:logfile"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_5969A29EAA2549EB93C63C7AD513319D"
            {
            "SourcePath" = "8:..\\FloatTrade\\liblzma.dll"
            "TargetName" = "8:liblzma.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_5D20E2B370B74A46A8BBCD55ADCBB861"
            {
            "SourcePath" = "8:dependency\\vcruntime140d.dll"
            "TargetName" = "8:vcruntime140d.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_683FD450CC48498A85CAC67106ADCE98"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\rebox"
            "TargetName" = "8:rebox"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_6A8845E415074D4C9695821DEC708BCE"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\wordstrbox"
            "TargetName" = "8:wordstrbox"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_71FEDFDC284C4A71BDD5881AF8C45791"
            {
            "SourcePath" = "8:..\\FloatTrade\\archive.dll"
            "TargetName" = "8:archive.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_73CD94E14BFE42F5906C222E5FC22253"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\pdf.ttf"
            "TargetName" = "8:pdf.ttf"
            "Tag" = "8:"
            "Folder" = "8:_7BFD0D489F3F40748071F26982BA0CF1"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_74F71FDAD1BA4787A7CDEC3CA2362EC3"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\strokewidth"
            "TargetName" = "8:strokewidth"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_7EA47563BF9D465E86879D8C061E8C51"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\lstmdebug"
            "TargetName" = "8:lstmdebug"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_86EB12744E3546AC85F181FF8B805D62"
            {
            "SourcePath" = "8:..\\FloatTrade\\jpeg62.dll"
            "TargetName" = "8:jpeg62.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_8C8068464FF945BF88C60D5C68734749"
            {
            "SourcePath" = "8:..\\FloatTrade\\libwebp.dll"
            "TargetName" = "8:libwebp.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_8F04270E975D4A1688F2192E7123991F"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\tessconfigs\\nobatch"
            "TargetName" = "8:nobatch"
            "Tag" = "8:"
            "Folder" = "8:_77921A2FD41F4D3D875390CC7D83A5F6"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_90337F65A31F462A84ED9ACEFAF706C6"
            {
            "SourcePath" = "8:..\\FloatTrade\\libpng16d.dll"
            "TargetName" = "8:libpng16d.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_96A335EC33B84B8F9A4BA4F29CA2A450"
            {
            "SourcePath" = "8:..\\FloatTrade\\zlib1.dll"
            "TargetName" = "8:zlib1.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
@@ -260,12 +1260,152 @@
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_9F0FC13279AA48DB8902195749D50834"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\box.train"
            "TargetName" = "8:box.train"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A08951260C454477BCD7733CF53000F3"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\box.train.stderr"
            "TargetName" = "8:box.train.stderr"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A5AC00A7964F45E98EF12B0FEE0E0600"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\ambigs.train"
            "TargetName" = "8:ambigs.train"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A844BEB662C44F46BDBB3B5CA78C0C75"
            {
            "SourcePath" = "8:..\\FloatTrade\\gif.dll"
            "TargetName" = "8:gif.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_AC5A8626ADDA4186AE593C67DC81C7F2"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\tsv"
            "TargetName" = "8:tsv"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_AD24C74D06F04B638351ECD368F545A0"
            {
            "SourcePath" = "8:..\\FloatTrade\\config.cfg"
            "TargetName" = "8:config.cfg"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B08BAEB307E04078A356720EB9A28017"
            {
            "SourcePath" = "8:..\\FloatTrade\\bz2.dll"
            "TargetName" = "8:bz2.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B389AD0C9FA049E4A9A1977D868F076C"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\linebox"
            "TargetName" = "8:linebox"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
@@ -300,6 +1440,146 @@
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B7246D58B84043D39062039AD41F9F21"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\tessconfigs\\batch"
            "TargetName" = "8:batch"
            "Tag" = "8:"
            "Folder" = "8:_77921A2FD41F4D3D875390CC7D83A5F6"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_BB4DF96C41F541019C326B176C236D1B"
            {
            "SourcePath" = "8:..\\FloatTrade\\lz4.dll"
            "TargetName" = "8:lz4.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_BDAF6B9D2DCB4482B189A9E5D34B5152"
            {
            "SourcePath" = "8:..\\FloatTrade\\libwebpmux.dll"
            "TargetName" = "8:libwebpmux.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_BF420EB70674460FA11D398B519696FD"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\get.images"
            "TargetName" = "8:get.images"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_BFF973E52B9249F2AD0D7C96CA1357F6"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\pdf"
            "TargetName" = "8:pdf"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C7F083BC8A6145639C9C3AD1F55DD07F"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\api_config"
            "TargetName" = "8:api_config"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C83DDC2918704C53B094A095BB277015"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\unlv"
            "TargetName" = "8:unlv"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_CB9C810D84B34D16932CF0DDD151FC5D"
            {
            "SourcePath" = "8:dependency\\GdiPlus.dll"
@@ -320,10 +1600,290 @@
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_CDFB2099896840BEA00588CF17330D7A"
            {
            "SourcePath" = "8:..\\FloatTrade\\tesseract55d.dll"
            "TargetName" = "8:tesseract55d.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_CEDFBA9B49594344AA9D01E410F7E740"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\osd.traineddata"
            "TargetName" = "8:osd.traineddata"
            "Tag" = "8:"
            "Folder" = "8:_7BFD0D489F3F40748071F26982BA0CF1"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_D16DE00BFFD44FA7A9B57ECDA836BE94"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\tessconfigs\\segdemo"
            "TargetName" = "8:segdemo"
            "Tag" = "8:"
            "Folder" = "8:_77921A2FD41F4D3D875390CC7D83A5F6"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_D4C10FE640DD46A8A76CD951E0AB3895"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\makebox"
            "TargetName" = "8:makebox"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_D6E4C1B5D888478C905850E370C37B68"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\tessconfigs\\msdemo"
            "TargetName" = "8:msdemo"
            "Tag" = "8:"
            "Folder" = "8:_77921A2FD41F4D3D875390CC7D83A5F6"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_D7A787C658EE45FC94888D03CCBFB0D1"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\txt"
            "TargetName" = "8:txt"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_D8EB1699257348E890D401AD946F5572"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\bigram"
            "TargetName" = "8:bigram"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_DA5D463A5E274903A20CC00C60825689"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\lstmbox"
            "TargetName" = "8:lstmbox"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_DE7622DC4C6F404F9B6D3B6920FA81B5"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\piccolo2d-core-3.0.1.jar"
            "TargetName" = "8:piccolo2d-core-3.0.1.jar"
            "Tag" = "8:"
            "Folder" = "8:_7BFD0D489F3F40748071F26982BA0CF1"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_DF3FA200D364407C877B6B8AF680E966"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\tessconfigs\\matdemo"
            "TargetName" = "8:matdemo"
            "Tag" = "8:"
            "Folder" = "8:_77921A2FD41F4D3D875390CC7D83A5F6"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_E26497A2A36F4D49A5ED95E83663C282"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\inter"
            "TargetName" = "8:inter"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_E446538738814DD582724A12A205D4F2"
            {
            "SourcePath" = "8:dependency\\msvcp140d.dll"
            "TargetName" = "8:msvcp140d.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_EEF0F374FCEB491E9F70D751303BA4B6"
            {
            "SourcePath" = "8:..\\FloatTrade\\concrt140d.dll"
            "TargetName" = "8:concrt140d.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_FDA089A09482488EBB46946874EC12CF"
            {
            "SourcePath" = "8:..\\FloatTrade\\tessdata\\configs\\quiet"
            "TargetName" = "8:quiet"
            "Tag" = "8:"
            "Folder" = "8:_485638CAE59F4984ADEA6E62B4E00644"
            "Condition" = "8:"
            "Transitive" = "11:FALSE"
            "Vital" = "11:TRUE"
            "ReadOnly" = "11:FALSE"
            "Hidden" = "11:FALSE"
            "System" = "11:FALSE"
            "Permanent" = "11:FALSE"
            "SharedLegacy" = "11:FALSE"
            "PackageAs" = "3:1"
            "Register" = "3:1"
            "Exclude" = "11:FALSE"
            "IsDependency" = "11:FALSE"
            "IsolateTo" = "8:"
            }
            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_FF26460B61724A69BCCBE71636123FB8"
            {
            "SourcePath" = "8:..\\FloatTrade\\zlibd1.dll"
            "TargetName" = "8:zlibd1.dll"
            "Tag" = "8:"
            "Folder" = "8:_E4711B38A1AA44659A28C6E3B77D3008"
            "Condition" = "8:"
@@ -378,6 +1938,50 @@
            "Property" = "8:TARGETDIR"
                "Folders"
                {
                    "{9EF0B969-E518-4E46-987F-47570745A589}:_7BFD0D489F3F40748071F26982BA0CF1"
                    {
                    "Name" = "8:tessdata"
                    "AlwaysCreate" = "11:FALSE"
                    "Condition" = "8:"
                    "Transitive" = "11:FALSE"
                    "Property" = "8:_992BA49EA0AD403A95206EB878131C52"
                        "Folders"
                        {
                            "{9EF0B969-E518-4E46-987F-47570745A589}:_0F01D0ABEE514B32845E132D79A3C2AC"
                            {
                            "Name" = "8:script"
                            "AlwaysCreate" = "11:FALSE"
                            "Condition" = "8:"
                            "Transitive" = "11:FALSE"
                            "Property" = "8:_608F9D741DF247FEA808A7858088068B"
                                "Folders"
                                {
                                }
                            }
                            "{9EF0B969-E518-4E46-987F-47570745A589}:_485638CAE59F4984ADEA6E62B4E00644"
                            {
                            "Name" = "8:configs"
                            "AlwaysCreate" = "11:FALSE"
                            "Condition" = "8:"
                            "Transitive" = "11:FALSE"
                            "Property" = "8:_7054D9E53FBC40FE9EF2AA628D6B7162"
                                "Folders"
                                {
                                }
                            }
                            "{9EF0B969-E518-4E46-987F-47570745A589}:_77921A2FD41F4D3D875390CC7D83A5F6"
                            {
                            "Name" = "8:tessconfigs"
                            "AlwaysCreate" = "11:FALSE"
                            "Condition" = "8:"
                            "Transitive" = "11:FALSE"
                            "Property" = "8:_07FE32EFD26544D5B8020D8BBFCE12D3"
                                "Folders"
                                {
                                }
                            }
                        }
                    }
                }
            }
        }
@@ -396,15 +2000,15 @@
        {
        "Name" = "8:Microsoft Visual Studio"
        "ProductName" = "8:悬浮盯盘"
        "ProductCode" = "8:{BCCBDACE-2D8B-4501-832D-B6805BB2D7F8}"
        "PackageCode" = "8:{26963CD1-B597-4E93-A97E-1671CD3B93E2}"
        "ProductCode" = "8:{D887D2F3-D7F4-409C-A6D5-7F875DDCE1C5}"
        "PackageCode" = "8:{D0485206-C9D6-4144-A060-7AD3B6C3CA3C}"
        "UpgradeCode" = "8:{DEEAA9A2-A9D8-45B3-8DCF-A22B320A8E25}"
        "AspNetVersion" = "8:4.0.30319.0"
        "RestartWWWService" = "11:FALSE"
        "RemovePreviousVersions" = "11:TRUE"
        "DetectNewerInstalledVersion" = "11:TRUE"
        "InstallAllUsers" = "11:FALSE"
        "ProductVersion" = "8:1.0.6"
        "ProductVersion" = "8:1.0.7"
        "Manufacturer" = "8:yeshi"
        "ARPHELPTELEPHONE" = "8:"
        "ARPHELPLINK" = "8:"
TradeDesk.sln
@@ -3,25 +3,27 @@
# Visual Studio Version 16
VisualStudioVersion = 16.0.30128.74
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FloatTrade", "FloatTrade\FloatTrade.vcxproj", "{2A6CD50F-70A5-4BBA-84E1-759FC9DABE21}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "悬浮盯盘", "FloatTrade\FloatTrade.vcxproj", "{2A6CD50F-70A5-4BBA-84E1-759FC9DABE21}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Setup", "Setup\Setup.vdproj", "{E9E77986-8109-4F29-B1C3-C1038AE797DC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TradeRecord", "TradeRecord\TradeRecord.vcxproj", "{847D5B65-E92B-47B7-8296-0606787E720B}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "快速交易", "TradeRecord\TradeRecord.vcxproj", "{847D5B65-E92B-47B7-8296-0606787E720B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Monitor", "Monitor\Monitor.vcxproj", "{A3A34788-0AB8-4F0C-8C1A-D3847FDD66B1}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "驾驶舱", "Monitor\Monitor.vcxproj", "{A3A34788-0AB8-4F0C-8C1A-D3847FDD66B1}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "MonitorSetup", "MonitorSetup\MonitorSetup.vdproj", "{67F5DF2E-41ED-4055-9F43-398025FDCCFD}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "TradeRecordSetup", "TradeRecordSetup\TradeRecordSetup.vdproj", "{CD4A5127-4BD2-451A-970E-21A107083079}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CBTrade", "CBTrade\CBTrade.vcxproj", "{8BFF1459-65B0-4A91-B278-D1EF8FA3E031}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "可转债交易", "CBTrade\CBTrade.vcxproj", "{8BFF1459-65B0-4A91-B278-D1EF8FA3E031}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "SetupCBTrade", "SetupCBTrade\SetupCBTrade.vdproj", "{8251B028-53A6-4DC7-97DB-067F036883D5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DelegateQueue", "DelegateQueue\DelegateQueue.vcxproj", "{E145394E-FF3E-4C4A-B76E-19C4E70153AF}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "加贝控制中心", "DelegateQueue\DelegateQueue.vcxproj", "{E145394E-FF3E-4C4A-B76E-19C4E70153AF}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "SetupDelegateQueue", "SetupDelegateQueue\SetupDelegateQueue.vdproj", "{20F1D622-53F8-4BC8-855E-468DFA7D7FFD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WechatHelper", "WechatHelper\WechatHelper.vcxproj", "{5F5D008A-965E-4FDD-BCA6-7D9D817C4A18}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -91,6 +93,14 @@
        {20F1D622-53F8-4BC8-855E-468DFA7D7FFD}.Debug|x86.ActiveCfg = Debug
        {20F1D622-53F8-4BC8-855E-468DFA7D7FFD}.Release|x64.ActiveCfg = Release
        {20F1D622-53F8-4BC8-855E-468DFA7D7FFD}.Release|x86.ActiveCfg = Release
        {5F5D008A-965E-4FDD-BCA6-7D9D817C4A18}.Debug|x64.ActiveCfg = Debug|x64
        {5F5D008A-965E-4FDD-BCA6-7D9D817C4A18}.Debug|x64.Build.0 = Debug|x64
        {5F5D008A-965E-4FDD-BCA6-7D9D817C4A18}.Debug|x86.ActiveCfg = Debug|Win32
        {5F5D008A-965E-4FDD-BCA6-7D9D817C4A18}.Debug|x86.Build.0 = Debug|Win32
        {5F5D008A-965E-4FDD-BCA6-7D9D817C4A18}.Release|x64.ActiveCfg = Release|x64
        {5F5D008A-965E-4FDD-BCA6-7D9D817C4A18}.Release|x64.Build.0 = Release|x64
        {5F5D008A-965E-4FDD-BCA6-7D9D817C4A18}.Release|x86.ActiveCfg = Release|Win32
        {5F5D008A-965E-4FDD-BCA6-7D9D817C4A18}.Release|x86.Build.0 = Release|Win32
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
TradeRecord/ConfigUtil.cpp
@@ -93,7 +93,7 @@
}
MyPoint ConfigUtil::getWindowPos()
POINT ConfigUtil::getWindowPos()
{
    // 页码位置
TradeRecord/TradeRecord.vcxproj
@@ -94,11 +94,11 @@
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <PrecompiledHeaderFile>common/pch.h</PrecompiledHeaderFile>
      <AdditionalIncludeDirectories>D:\workspace\GP\trade_desk_cplus\TradeDesk\TradeRecord\lib_config\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <AdditionalIncludeDirectories>D:\workspace\GP\trade_desk_cplus\TradeDesk\FloatTrade\lib_config\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <AdditionalLibraryDirectories>D:\workspace\GP\trade_desk_cplus\TradeDesk\TradeRecord\lib_config\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
      <AdditionalLibraryDirectories>D:\workspace\GP\trade_desk_cplus\TradeDesk\FloatTrade\lib_config\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
      <AdditionalDependencies>libconfig++.lib;</AdditionalDependencies>
    </Link>
    <Midl>
TradeRecord/TradeRecordDlg.cpp
@@ -237,10 +237,13 @@
            cout << result << endl;
            rapidjson::Document doc1 = JsonUtil::parseUTF8(result);
            if (doc1.IsObject() && doc1["code"].GetInt() == 0) {
                dlg->labelUseful.SetWindowTextW(CString( StringUtil::to_string( doc1["data"][0]["usefulMoney"].GetDouble()).c_str()));
                dlg->labelTotal.SetWindowTextW(CString(StringUtil::to_string(doc1["data"][0]["usefulMoney"].GetDouble()+ doc1["data"][0]["frozenCash"].GetDouble()).c_str()));
                dlg->labelFetchLimit.SetWindowTextW(CString(StringUtil::to_string(doc1["data"][0]["fetchLimit"].GetDouble()).c_str()));
                dlg->labelFrozen.SetWindowTextW(CString(StringUtil::to_string(doc1["data"][0]["frozenCash"].GetDouble()).c_str()));
                if (doc1.HasMember("data")&& doc1["data"].IsArray())
                {
                    dlg->labelUseful.SetWindowTextW(CString(StringUtil::to_string(doc1["data"][0]["usefulMoney"].GetDouble()).c_str()));
                    dlg->labelTotal.SetWindowTextW(CString(StringUtil::to_string(doc1["data"][0]["usefulMoney"].GetDouble() + doc1["data"][0]["frozenCash"].GetDouble()).c_str()));
                    dlg->labelFetchLimit.SetWindowTextW(CString(StringUtil::to_string(doc1["data"][0]["fetchLimit"].GetDouble()).c_str()));
                    dlg->labelFrozen.SetWindowTextW(CString(StringUtil::to_string(doc1["data"][0]["frozenCash"].GetDouble()).c_str()));
                }
            }
TradeRecord/config.cfg
@@ -1 +1 @@
window_pos = "[-725,118]";
window_pos = "[-32000,-32000]";
TradeRecordSetup/TradeRecordSetup.vdproj
@@ -118,6 +118,14 @@
            "PrerequisitesLocation" = "2:1"
            "Url" = "8:"
            "ComponentsUrl" = "8:"
                "Items"
                {
                    "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.7.2"
                    {
                    "Name" = "8:Microsoft .NET Framework 4.7.2 (x86 and x64)"
                    "ProductCode" = "8:.NETFramework,Version=v4.7.2"
                    }
                }
            }
        }
    }
@@ -299,7 +307,7 @@
            }
            "{3C67513D-01DD-4637-8A68-80971EB9504F}:_C878F4C043484E8F96972549E3434C5B"
            {
            "DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]"
            "DefaultLocation" = "8:[ProgramFiles64Folder][Manufacturer]\\[ProductName]"
            "Name" = "8:#1925"
            "AlwaysCreate" = "11:FALSE"
            "Condition" = "8:"
@@ -336,15 +344,15 @@
        {
        "Name" = "8:Microsoft Visual Studio"
        "ProductName" = "8:交易列表"
        "ProductCode" = "8:{D1C9675C-AB49-451C-9DFB-4C9FC5231596}"
        "PackageCode" = "8:{D1863254-B1FD-4CA8-84B9-507517B20695}"
        "ProductCode" = "8:{1EAB25DF-2890-42BE-8F5C-E9FE50AE8C70}"
        "PackageCode" = "8:{18A91881-DA2C-4DAD-9938-CFB7ECB668F4}"
        "UpgradeCode" = "8:{5668777F-B420-45DA-83DA-42ED0DFE8782}"
        "AspNetVersion" = "8:4.0.30319.0"
        "RestartWWWService" = "11:FALSE"
        "RemovePreviousVersions" = "11:TRUE"
        "DetectNewerInstalledVersion" = "11:TRUE"
        "InstallAllUsers" = "11:FALSE"
        "ProductVersion" = "8:1.0.0"
        "ProductVersion" = "8:1.0.1"
        "Manufacturer" = "8:yeshi"
        "ARPHELPTELEPHONE" = "8:"
        "ARPHELPLINK" = "8:"
@@ -358,7 +366,7 @@
        "ARPIconIndex" = "3:0"
        "SearchPath" = "8:"
        "UseSystemSearchPath" = "11:TRUE"
        "TargetPlatform" = "3:0"
        "TargetPlatform" = "3:1"
        "PreBuildEvent" = "8:"
        "PostBuildEvent" = "8:"
        "RunPostBuildEvent" = "3:0"
@@ -872,7 +880,7 @@
        {
            "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_64C18390F6C048CBB05AB5D5510459D8"
            {
            "SourcePath" = "8:..\\x64\\Debug\\TradeRecord.exe"
            "SourcePath" = "8:..\\x64\\Debug\\快速交易.exe"
            "TargetName" = "8:"
            "Tag" = "8:"
            "Folder" = "8:_C878F4C043484E8F96972549E3434C5B"
WechatHelper/StringUtil.h
New file
@@ -0,0 +1,155 @@
#pragma once
#include <afx.h>
#include <string>
#include <locale>
#include <codecvt>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <vector>
using namespace std;
const std::string base64_chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789+/";
class StringUtil {
public:
    static string wstringToString(wstring wt) {
        wstring_convert<codecvt_utf8<wchar_t>> conv;
        string result = conv.to_bytes(wt);
        return result;
    }
    static std::wstring Unescape(const std::string& input) {
        std::wstring wresult;
        for (size_t i = 0; i < input.length(); ) {
            if (input[i] == '\\' && input[i + 1] == 'u') {
                std::string code = input.substr(i + 2, 4);
                wchar_t unicode = stoi(code, nullptr, 16);
                wresult += unicode;
                i += 6;
            }
            else {
                wresult += input[i++];
            }
        }
        return wresult;
    }
    static std::string cstring2String(CString getbuf) {
        int iLen = WideCharToMultiByte(0, 0, getbuf, -1, NULL, 0, NULL, NULL);   //首先计算TCHAR 长度。
        char* chRtn = new char[iLen * sizeof(char)];  //定义一个 TCHAR 长度大小的 CHAR 类型。
        WideCharToMultiByte(0, 0, getbuf, -1, chRtn, iLen, NULL, NULL);  //将TCHAR 类型的数据转换为 CHAR 类型。
        std::string str(chRtn);
        return str;
    }
    static  std::string cstring2StringV2(CString getbuf) {
        std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
        std::string utf8String = converter.to_bytes(getbuf);
        return utf8String;
    }
    static string to_string(double val) {
        std::stringstream stream;
        stream << std::fixed << std::setprecision(2) << val;
        return stream.str();
    }
    static string to_string(float val) {
        std::stringstream stream;
        stream << std::fixed << std::setprecision(2) << val;
        return stream.str();
    }
    static bool isNumber(const std::string& str) {
        if (str.empty()) {
            return false;
        }
        for (char c : str) {
            if (!isdigit(c)) {
                return false;
            }
        }
        return true;
    }
    // double转为字符串
    static string toString(double value, int precision) {
        std::ostringstream oss;
        oss << std::fixed << std::setprecision(precision) << value;
        return oss.str();
    }
    static std::vector<std::string> split(std::string str, std::string pattern) {
        std::string::size_type pos;
        std::vector<std::string> result;
        str += pattern;//扩展字符串以方便操作
        int size = str.size();
        for (int i = 0; i < size; i++)
        {
            pos = str.find(pattern, i);
            if (pos < size)
            {
                std::string s = str.substr(i, pos - i);
                result.push_back(s);
                i = pos + pattern.size() - 1;
            }
        }
        return result;
    }
    static std::string base64_encode(const std::string& input) {
        std::string encoded;
        int val = 0, valb = -6;
        for (unsigned char c : input) {
            val = (val << 8) + c;
            valb += 8;
            while (valb >= 0) {
                encoded.push_back(base64_chars[(val >> valb) & 0x3F]);
                valb -= 6;
            }
        }
        if (valb > -6) encoded.push_back(base64_chars[((val << 8) >> (valb + 8)) & 0x3F]);
        while (encoded.size() % 4) encoded.push_back('=');
        return encoded;
    }
    static std::string base64_decode(const std::string& input) {
        std::string decoded;
        std::vector<int> T(256, -1);
        for (int i = 0; i < 64; i++) T[base64_chars[i]] = i;
        int val = 0, valb = -8;
        for (unsigned char c : input) {
            if (T[c] == -1) break;
            val = (val << 6) + T[c];
            valb += 6;
            if (valb >= 0) {
                decoded.push_back(char((val >> valb) & 0xFF));
                valb -= 8;
            }
        }
        return decoded;
    }
    static std::string trim(const std::string& str) {
        if (str.empty()) {
            return str;
        }
        // 去除前空格
        size_t start = str.find_first_not_of(" \t\n\r");
        if (start == std::string::npos) {
            return ""; // 如果全是空格,返回空字符串
        }
        // 去除后空格
        size_t end = str.find_last_not_of(" \t\n\r");
        return str.substr(start, end - start + 1);
    }
};
WechatHelper/TimeUtil.h
New file
@@ -0,0 +1,99 @@
#pragma once
#include <iostream>
#include <ctime>
#include <string>
#include <sstream>
#include <vector>
class TimeUtil {
public:
    static std::string getNowTime() {
        std::time_t now = std::time(nullptr);
        // 将时间戳转换为本地时间
        std::tm local_time;
        localtime_s(&local_time , &now);
        // 格式化时间为字符串
        char time_str[20];
        //%Y-%m-%d %H:%M:%S
        std::strftime(time_str, sizeof(time_str), "%H:%M:%S", &local_time);
        // 输出当前时间
        return std::string(time_str);
    }
    /// <summary>
    /// 获取当前时间戳(毫秒)
    /// </summary>
    /// <returns></returns>
    static long getNowTimestamp() {
        return GetTickCount64();
    }
    static std::string getNowTime(std::string format) {
        std::time_t now = std::time(nullptr);
        // 将时间戳转换为本地时间
        std::tm local_time;
        localtime_s(&local_time, &now);
        // 格式化时间为字符串
        char time_str[20];
        //%Y-%m-%d %H:%M:%S
        std::strftime(time_str, sizeof(time_str), format.c_str(), &local_time);
        // 输出当前时间
        return std::string(time_str);
    }
    static std::string toFormatString(time_t timestamp ,std::string format) {
        // 将时间戳转换为本地时间
        std::tm local_time;
        localtime_s(&local_time, &timestamp);
        // 格式化时间为字符串
        char time_str[20];
        //%Y-%m-%d %H:%M:%S
        std::strftime(time_str, sizeof(time_str), format.c_str(), &local_time);
        // 输出当前时间
        return std::string(time_str);
    }
    static time_t toTimestamp(string str_time, std::string format) {
        std::tm timeinfo = {};
        std::istringstream ss(str_time);
        ss >> std::get_time(&timeinfo, format.c_str());
        time_t timestamp = mktime(&timeinfo);
        return timestamp;
    }
    // 时间相减,返回相差的s
    static int trade_time_sub(string time_str_1, string time_str_2) {
        int time_1[3], time_2[3];
        // 切割时间
        std::string token;
        std::vector<std::string> results = StringUtil::split(time_str_1,":");
        int index = 0;
        for (std::vector<std::string>::iterator e = results.begin(); e != results.end(); e++) {
            time_1[index] = stoi(*e);
            index++;
        }
        results = StringUtil::split(time_str_2, ":");
        index = 0;
        for (std::vector<std::string>::iterator e = results.begin(); e != results.end(); e++) {
            time_2[index] = stoi(*e);
            index++;
        }
        int split_time = 11 * 3600 + 30 * 60 + 0;
        int time_1_int = time_1[0] * 3600 + time_1[1] * 60 + time_1[2];
        int time_2_int = time_2[0] * 3600 + time_2[1] * 60 + time_2[2];
        if (split_time > time_1_int && split_time < time_2_int) {
            time_2_int = time_2_int - 90 * 60;
        }
        else if (split_time > time_2_int && split_time < time_1_int) {
            time_2_int = time_2_int + 90 * 60;
        }
        return time_1_int - time_2_int;
    }
};
WechatHelper/WechatHelper.aps
Binary files differ
WechatHelper/WechatHelper.cpp
New file
@@ -0,0 +1,107 @@

// WechatHelper.cpp: 定义应用程序的类行为。
//
#include "pch.h"
#include "framework.h"
#include "WechatHelper.h"
#include "WechatHelperDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CWechatHelperApp
BEGIN_MESSAGE_MAP(CWechatHelperApp, CWinApp)
    ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
END_MESSAGE_MAP()
// CWechatHelperApp 构造
CWechatHelperApp::CWechatHelperApp()
{
    // 支持重新启动管理器
    m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
    // TODO: 在此处添加构造代码,
    // 将所有重要的初始化放置在 InitInstance 中
}
// 唯一的 CWechatHelperApp 对象
CWechatHelperApp theApp;
// CWechatHelperApp 初始化
BOOL CWechatHelperApp::InitInstance()
{
    // 如果一个运行在 Windows XP 上的应用程序清单指定要
    // 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
    //则需要 InitCommonControlsEx()。  否则,将无法创建窗口。
    INITCOMMONCONTROLSEX InitCtrls;
    InitCtrls.dwSize = sizeof(InitCtrls);
    // 将它设置为包括所有要在应用程序中使用的
    // 公共控件类。
    InitCtrls.dwICC = ICC_WIN95_CLASSES;
    InitCommonControlsEx(&InitCtrls);
    CWinApp::InitInstance();
    AfxEnableControlContainer();
    // 创建 shell 管理器,以防对话框包含
    // 任何 shell 树视图控件或 shell 列表视图控件。
    CShellManager *pShellManager = new CShellManager;
    // 激活“Windows Native”视觉管理器,以便在 MFC 控件中启用主题
    CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
    // 标准初始化
    // 如果未使用这些功能并希望减小
    // 最终可执行文件的大小,则应移除下列
    // 不需要的特定初始化例程
    // 更改用于存储设置的注册表项
    // TODO: 应适当修改该字符串,
    // 例如修改为公司或组织名
    SetRegistryKey(_T("应用程序向导生成的本地应用程序"));
    CWechatHelperDlg dlg;
    m_pMainWnd = &dlg;
    INT_PTR nResponse = dlg.DoModal();
    if (nResponse == IDOK)
    {
        // TODO: 在此放置处理何时用
        //  “确定”来关闭对话框的代码
    }
    else if (nResponse == IDCANCEL)
    {
        // TODO: 在此放置处理何时用
        //  “取消”来关闭对话框的代码
    }
    else if (nResponse == -1)
    {
        TRACE(traceAppMsg, 0, "警告: 对话框创建失败,应用程序将意外终止。\n");
        TRACE(traceAppMsg, 0, "警告: 如果您在对话框上使用 MFC 控件,则无法 #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS。\n");
    }
    // 删除上面创建的 shell 管理器。
    if (pShellManager != nullptr)
    {
        delete pShellManager;
    }
#if !defined(_AFXDLL) && !defined(_AFX_NO_MFC_CONTROLS_IN_DIALOGS)
    ControlBarCleanUp();
#endif
    // 由于对话框已关闭,所以将返回 FALSE 以便退出应用程序,
    //  而不是启动应用程序的消息泵。
    return FALSE;
}
WechatHelper/WechatHelper.h
New file
@@ -0,0 +1,32 @@

// WechatHelper.h: PROJECT_NAME 应用程序的主头文件
//
#pragma once
#ifndef __AFXWIN_H__
    #error "在包含此文件之前包含 'pch.h' 以生成 PCH"
#endif
#include "resource.h"        // 主符号
// CWechatHelperApp:
// 有关此类的实现,请参阅 WechatHelper.cpp
//
class CWechatHelperApp : public CWinApp
{
public:
    CWechatHelperApp();
// 重写
public:
    virtual BOOL InitInstance();
// 实现
    DECLARE_MESSAGE_MAP()
};
extern CWechatHelperApp theApp;
WechatHelper/WechatHelper.rc
Binary files differ
WechatHelper/WechatHelper.vcxproj
New file
@@ -0,0 +1,229 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <VCProjectVersion>16.0</VCProjectVersion>
    <ProjectGuid>{5F5D008A-965E-4FDD-BCA6-7D9D817C4A18}</ProjectGuid>
    <Keyword>MFCProj</Keyword>
    <RootNamespace>WechatHelper</RootNamespace>
    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v142</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
    <UseOfMfc>Dynamic</UseOfMfc>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v142</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
    <UseOfMfc>Dynamic</UseOfMfc>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v142</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
    <UseOfMfc>Dynamic</UseOfMfc>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v142</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
    <UseOfMfc>Dynamic</UseOfMfc>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="Shared">
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <LinkIncremental>false</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LinkIncremental>true</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <LinkIncremental>true</LinkIncremental>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <LinkIncremental>false</LinkIncremental>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
      <AdditionalIncludeDirectories>D:\opencv\build\include;D:\opencv\build\include\opencv2;D:\vcpkg\packages\tesseract_x64-windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <AdditionalLibraryDirectories>D:\opencv\build\x64\vc15\lib;D:\vcpkg\packages\tesseract_x64-windows\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
      <AdditionalDependencies>opencv_world455.lib</AdditionalDependencies>
    </Link>
    <Midl>
      <MkTypLibCompatible>false</MkTypLibCompatible>
      <ValidateAllParameters>true</ValidateAllParameters>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </Midl>
    <ResourceCompile>
      <Culture>0x0804</Culture>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ResourceCompile>
    <PostBuildEvent>
      <Command>editbin /SUBSYSTEM:CONSOLE $(OutDir)\$(ProjectName).exe</Command>
    </PostBuildEvent>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
    </Link>
    <Midl>
      <MkTypLibCompatible>false</MkTypLibCompatible>
      <ValidateAllParameters>true</ValidateAllParameters>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </Midl>
    <ResourceCompile>
      <Culture>0x0804</Culture>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ResourceCompile>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
    </Link>
    <Midl>
      <MkTypLibCompatible>false</MkTypLibCompatible>
      <ValidateAllParameters>true</ValidateAllParameters>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </Midl>
    <ResourceCompile>
      <Culture>0x0804</Culture>
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ResourceCompile>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <WarningLevel>Level3</WarningLevel>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
    <Midl>
      <MkTypLibCompatible>false</MkTypLibCompatible>
      <ValidateAllParameters>true</ValidateAllParameters>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </Midl>
    <ResourceCompile>
      <Culture>0x0804</Culture>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ResourceCompile>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClInclude Include="framework.h" />
    <ClInclude Include="pch.h" />
    <ClInclude Include="Resource.h" />
    <ClInclude Include="StringUtil.h" />
    <ClInclude Include="targetver.h" />
    <ClInclude Include="TimeUtil.h" />
    <ClInclude Include="WechatHelper.h" />
    <ClInclude Include="WechatHelperDlg.h" />
    <ClInclude Include="WechatOCR.h" />
    <ClInclude Include="Win32Util.h" />
    <ClInclude Include="win32_screen_shots.h" />
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="pch.cpp">
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
    </ClCompile>
    <ClCompile Include="WechatHelper.cpp" />
    <ClCompile Include="WechatHelperDlg.cpp" />
    <ClCompile Include="WechatOCR.cpp" />
    <ClCompile Include="Win32Util.cpp" />
    <ClCompile Include="win32_screen_shots.cpp" />
  </ItemGroup>
  <ItemGroup>
    <ResourceCompile Include="WechatHelper.rc" />
  </ItemGroup>
  <ItemGroup>
    <None Include="res\WechatHelper.rc2" />
  </ItemGroup>
  <ItemGroup>
    <Image Include="res\WechatHelper.ico" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>
WechatHelper/WechatHelper.vcxproj.filters
New file
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <Filter Include="源文件">
      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
      <Extensions>cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx</Extensions>
    </Filter>
    <Filter Include="头文件">
      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
      <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
    </Filter>
    <Filter Include="资源文件">
      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
    </Filter>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="WechatHelper.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="WechatHelperDlg.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="framework.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="targetver.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="Resource.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="pch.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="StringUtil.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="TimeUtil.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="Win32Util.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="WechatOCR.h">
      <Filter>头文件</Filter>
    </ClInclude>
    <ClInclude Include="win32_screen_shots.h">
      <Filter>头文件</Filter>
    </ClInclude>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="WechatHelper.cpp">
      <Filter>源文件</Filter>
    </ClCompile>
    <ClCompile Include="WechatHelperDlg.cpp">
      <Filter>源文件</Filter>
    </ClCompile>
    <ClCompile Include="pch.cpp">
      <Filter>源文件</Filter>
    </ClCompile>
    <ClCompile Include="Win32Util.cpp">
      <Filter>源文件</Filter>
    </ClCompile>
    <ClCompile Include="WechatOCR.cpp">
      <Filter>源文件</Filter>
    </ClCompile>
    <ClCompile Include="win32_screen_shots.cpp">
      <Filter>源文件</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ResourceCompile Include="WechatHelper.rc">
      <Filter>资源文件</Filter>
    </ResourceCompile>
  </ItemGroup>
  <ItemGroup>
    <None Include="res\WechatHelper.rc2">
      <Filter>资源文件</Filter>
    </None>
  </ItemGroup>
  <ItemGroup>
    <Image Include="res\WechatHelper.ico">
      <Filter>资源文件</Filter>
    </Image>
  </ItemGroup>
</Project>
WechatHelper/WechatHelper.vcxproj.user
New file
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <RESOURCE_FILE>WechatHelper.rc</RESOURCE_FILE>
  </PropertyGroup>
</Project>
WechatHelper/WechatHelperDlg.cpp
New file
@@ -0,0 +1,178 @@

// WechatHelperDlg.cpp: 实现文件
//
#include "pch.h"
#include "framework.h"
#include "WechatHelper.h"
#include "WechatHelperDlg.h"
#include "afxdialogex.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#include <tesseract\baseapi.h>
#include <iostream>
#include "WechatOCR.h"
#include "win32_screen_shots.h"
// 用于应用程序“关于”菜单项的 CAboutDlg 对话框
class CAboutDlg : public CDialogEx
{
public:
    CAboutDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
    enum { IDD = IDD_ABOUTBOX };
#endif
    protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
// 实现
protected:
    DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialogEx(IDD_ABOUTBOX)
{
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)
END_MESSAGE_MAP()
// CWechatHelperDlg 对话框
CWechatHelperDlg::CWechatHelperDlg(CWnd* pParent /*=nullptr*/)
    : CDialogEx(IDD_WECHATHELPER_DIALOG, pParent)
{
    m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CWechatHelperDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CWechatHelperDlg, CDialogEx)
    ON_WM_SYSCOMMAND()
    ON_WM_PAINT()
    ON_WM_QUERYDRAGICON()
    ON_BN_CLICKED(IDC_BUTTON_START, &CWechatHelperDlg::OnBnClickedButtonStart)
END_MESSAGE_MAP()
// CWechatHelperDlg 消息处理程序
BOOL CWechatHelperDlg::OnInitDialog()
{
    CDialogEx::OnInitDialog();
    // 将“关于...”菜单项添加到系统菜单中。
    // IDM_ABOUTBOX 必须在系统命令范围内。
    ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
    ASSERT(IDM_ABOUTBOX < 0xF000);
    CMenu* pSysMenu = GetSystemMenu(FALSE);
    if (pSysMenu != nullptr)
    {
        BOOL bNameValid;
        CString strAboutMenu;
        bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX);
        ASSERT(bNameValid);
        if (!strAboutMenu.IsEmpty())
        {
            pSysMenu->AppendMenu(MF_SEPARATOR);
            pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
        }
    }
    // 设置此对话框的图标。  当应用程序主窗口不是对话框时,框架将自动
    //  执行此操作
    SetIcon(m_hIcon, TRUE);            // 设置大图标
    SetIcon(m_hIcon, FALSE);        // 设置小图标
    // TODO: 在此添加额外的初始化代码
    return TRUE;  // 除非将焦点设置到控件,否则返回 TRUE
}
void CWechatHelperDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
    if ((nID & 0xFFF0) == IDM_ABOUTBOX)
    {
        CAboutDlg dlgAbout;
        dlgAbout.DoModal();
    }
    else
    {
        CDialogEx::OnSysCommand(nID, lParam);
    }
}
// 如果向对话框添加最小化按钮,则需要下面的代码
//  来绘制该图标。  对于使用文档/视图模型的 MFC 应用程序,
//  这将由框架自动完成。
void CWechatHelperDlg::OnPaint()
{
    if (IsIconic())
    {
        CPaintDC dc(this); // 用于绘制的设备上下文
        SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
        // 使图标在工作区矩形中居中
        int cxIcon = GetSystemMetrics(SM_CXICON);
        int cyIcon = GetSystemMetrics(SM_CYICON);
        CRect rect;
        GetClientRect(&rect);
        int x = (rect.Width() - cxIcon + 1) / 2;
        int y = (rect.Height() - cyIcon + 1) / 2;
        // 绘制图标
        dc.DrawIcon(x, y, m_hIcon);
    }
    else
    {
        CDialogEx::OnPaint();
    }
}
//当用户拖动最小化窗口时系统调用此函数取得光标
//显示。
HCURSOR CWechatHelperDlg::OnQueryDragIcon()
{
    return static_cast<HCURSOR>(m_hIcon);
}
void CWechatHelperDlg::OnBnClickedButtonStart()
{
    WechatOCR *ocr = new WechatOCR();
    list<HWND> hwnds = WechatOCR::getWechatSimulatorHwnds();
    if (hwnds.size() > 0) {
        // 句柄数量大于0
        for (list<HWND>::iterator e = hwnds.begin();e != hwnds.end();e++) {
            cv::Mat mat =    _wss::screen_shot_by_window(*e);
            // 截图
            cv::Mat grayImg = WechatOCR::grayImage(mat);
            cv::imwrite("D:/test.jpg", grayImg);
            ocr->ocr(mat);
        }
    }
}
WechatHelper/WechatHelperDlg.h
New file
@@ -0,0 +1,36 @@

// WechatHelperDlg.h: 头文件
//
#pragma once
// CWechatHelperDlg 对话框
class CWechatHelperDlg : public CDialogEx
{
// 构造
public:
    CWechatHelperDlg(CWnd* pParent = nullptr);    // 标准构造函数
// 对话框数据
#ifdef AFX_DESIGN_TIME
    enum { IDD = IDD_WECHATHELPER_DIALOG };
#endif
    protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
// 实现
protected:
    HICON m_hIcon;
    // 生成的消息映射函数
    virtual BOOL OnInitDialog();
    afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
    afx_msg void OnPaint();
    afx_msg HCURSOR OnQueryDragIcon();
    DECLARE_MESSAGE_MAP()
public:
    afx_msg void OnBnClickedButtonStart();
};
WechatHelper/WechatOCR.cpp
New file
@@ -0,0 +1,150 @@
#include "pch.h"
#include "WechatOCR.h"
#include "StringUtil.h"
HWND WechatOCR::getWechatWindow()
{
    return HWND();
}
cv::Mat WechatOCR::capture(HWND hwnd)
{
    return cv::Mat();
}
string WechatOCR::ocrCode(cv::Mat src)
{
    return string();
}
WechatOCR::WechatOCR()
{
    tessApi = new tesseract::TessBaseAPI();
    // 设置语言
    // eng+chi_sim
    if (tessApi->Init("tessdata", "eng+chi_sim")) {
        std::cerr << "Could not initialize tesseract.\n";
        exit(1);
    }
}
WechatOCR::~WechatOCR()
{
    if (tessApi != nullptr) {
        // 清理
        tessApi->End();
        delete tessApi;
    }
}
void WechatOCR::ocr(cv::Mat src)
{
    Pix* pix = pixCreate(src.cols, src.rows, 8);
    for (int y = 0; y < src.rows; ++y) {
        for (int x = 0; x < src.cols; ++x) {
            pixSetPixel(pix, x, y, src.ptr<uchar>(y)[x]);
        }
    }
    // 设置图像
    tessApi->SetImage(pix);
    //char *result = tessApi->GetUTF8Text();
    //cout << "识别的内容:"<< string(result) << endl;
    if (tessApi->Recognize(nullptr) != 0) {
        std::cerr << "Recognition failed." << std::endl;
        tessApi->End();
        pixDestroy(&pix);
        cout << "识别出错" << endl;
        return ;
    }
    // 获取文本
    tesseract::ResultIterator* ri  = tessApi->GetIterator();
    tesseract::PageIteratorLevel level = tesseract::RIL_WORD;
    if (ri != nullptr) {
        do {
            const char* word = ri->GetUTF8Text(level);
            if (word == nullptr) {
                continue;
            }
            float conf = ri->Confidence(level);
            int x1, y1, x2, y2;
            ri->BoundingBox(level, &x1, &y1, &x2, &y2);
            std::cout << "Word: " << word << ", Confidence: " << conf
                << ", Bounding box: (" << x1 << ", " << y1 << ") - (" << x2 << ", " << y2 << ")" << std::endl;
            delete[] word;
        } while (ri->Next(level));
        delete ri;
    }
    tessApi->End();
    pixDestroy(&pix);
}
void WechatOCR::test(Pix* src)
{
    // 设置图像
    tessApi->SetImage(src);
    // 获取文本
    tesseract::ResultIterator* ri = tessApi->GetIterator();
    tesseract::PageIteratorLevel level = tesseract::RIL_WORD;
    if (ri != nullptr) {
        do {
            const char* word = ri->GetUTF8Text(level);
            float conf = ri->Confidence(level);
            int x1, y1, x2, y2;
            ri->BoundingBox(level, &x1, &y1, &x2, &y2);
            std::cout << "Word: " << word << ", Confidence: " << conf
                << ", Bounding box: (" << x1 << ", " << y1 << ") - (" << x2 << ", " << y2 << ")" << std::endl;
            delete[] word;
        } while (ri->Next(level));
        delete ri;
    }
    tessApi->End();
    pixDestroy(&src);
}
list<HWND> WechatOCR::getWechatSimulatorHwnds()
{
    list<HWND>  hwnds = Win32Util::searchWindow("微信");
    list<HWND> wechatHWNDs;
    for (list<HWND>::iterator e = hwnds.begin();e != hwnds.end();++e) {
        HWND hwnd = *e;
        hwnd = FindWindowExA(hwnd, 0, "Qt5152QWindowIcon", "Androws");
        if (hwnd > 0) {
            for (int i = 0;i < 10;i++) {
                hwnd = FindWindowExA(hwnd, 0, "Qt5152QWindowIcon", "Androws");
                if (FindWindowExA(hwnd, 0, "subWin", "sub") > 0) {
                    hwnd = FindWindowExA(hwnd, 0, "subWin", "sub");
                    wechatHWNDs.push_back(hwnd);
                    break;
                }
            }
        }
    }
    return wechatHWNDs;
}
cv::Mat WechatOCR::grayImage(cv::Mat src)
{
    cv::Mat grayImage;
    if (src.channels() == 3)
    {
        cvtColor(src, grayImage, cv::COLOR_RGB2GRAY);
    }
    else if (src.channels() == 4) {
        cvtColor(src, grayImage, cv::COLOR_RGBA2GRAY);
    }
    else if (src.channels() == 1) {
        return src;
    }
    return grayImage;
}
WechatHelper/WechatOCR.h
New file
@@ -0,0 +1,35 @@
#pragma once
#include <opencv2/opencv.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <tesseract/baseapi.h>
#include <leptonica/allheaders.h>
#include "Win32Util.h"
class WechatOCR
{
private:
    tesseract::TessBaseAPI* tessApi;
private:
    static    HWND getWechatWindow();
    static cv::Mat capture(HWND hwnd);
    string ocrCode(cv::Mat src);
public:
    WechatOCR();
    ~WechatOCR();
    void ocr(cv::Mat src);
    void test(Pix* src);
    static list<HWND> getWechatSimulatorHwnds();
    static cv::Mat grayImage(cv::Mat src);
};
WechatHelper/Win32Util.cpp
New file
@@ -0,0 +1,249 @@
#include "pch.h"
#include <thread>
#include <vector>
#include "Win32Util.h"
void clickRunner(int delay) // 函数名字可随意
{
    Sleep(delay);
    mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
    Sleep(10);
    mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
    Sleep(10);
}
void moveRunner(int x, int y,int delay) // 函数名字可随意
{
    Sleep(delay);
    SetCursorPos(x, y);
    Sleep(20);
}
void kbNumRunner(string nums, int delay) // 函数名字可随意
{
    Sleep(delay);
    for (int i = 0;i < nums.length();i++)
    {
        int code = int(nums.c_str()[i]);
        if (code == '.')
        {
            code = 110;
        }
        keybd_event(code, 0, 0, 0);
        Sleep(5);
        keybd_event(code, 0, KEYEVENTF_KEYUP, 0);
        Sleep(20);
    }
}
void kbKeyRunner(int code, int delay) // 函数名字可随意
{
    Sleep(delay);
    keybd_event(code, 0, 0, 0);
    keybd_event(code, 0, KEYEVENTF_KEYUP, 0);
}
list<HWND> Win32Util::searchWindow(string name) {
    auto hwnd = GetDesktopWindow();
    HWND mainPage = HWND();
    //获取桌面子窗口句柄
    hwnd = GetWindow(hwnd, GW_CHILD);
    list<HWND> list;
    while (hwnd != NULL)
    {
        std::string str= getWindowName(hwnd);
        if (str.find(name) != string::npos)
        {
            list.push_back(hwnd);
        }
        hwnd = GetNextWindow(hwnd, GW_HWNDNEXT);
    }
    return list;
}
 string Win32Util::getWindowName(HWND hwnd) {
     int length = GetWindowTextLength(hwnd);
     TCHAR getbuf[10240];
     GetWindowText(hwnd, getbuf, length + 1);
     int iLen = WideCharToMultiByte(CP_ACP, 0, getbuf, -1, NULL, 0, NULL, NULL);   //首先计算TCHAR 长度。
     char* chRtn =(char*) alloca( iLen * sizeof(char));  //定义一个 TCHAR 长度大小的 CHAR 类型。
     WideCharToMultiByte(CP_ACP, 0, getbuf, -1, chRtn, iLen, NULL, NULL);  //将TCHAR 类型的数据转换为 CHAR 类型。
     std::string str(chRtn);
     return str;
}
 wstring Win32Util::getText(HWND hwnd)
 {
     int length = SendMessage(hwnd, WM_GETTEXTLENGTH, 0, 0);
     if (length == -1)
         return L"";
     wchar_t* buffer = new wchar_t[length + 1];
     SendMessage(hwnd, WM_GETTEXT, length + 1, (LPARAM)buffer);
     std::wstring str(buffer);
     delete[] buffer;
     return str;
 }
void Win32Util::click(int delay) {
    thread clickRunner(clickRunner,delay);
    clickRunner.join();
}
void Win32Util::click(int x, int y, int delay) {
    thread clickRunner(moveRunner, x, y,delay);
    clickRunner.join();
    click();
}
void Win32Util::mouseMove(int x, int y, int delay) {
    thread clickRunner(moveRunner, x, y, delay);
    clickRunner.join();
}
void Win32Util::focus(HWND hwnd) {
    SetForegroundWindow(hwnd);
    SetFocus(hwnd);
}
bool Win32Util::hasFocus(HWND hwnd)
{
    return GetFocus() ==hwnd;
}
//键盘输入数字
void Win32Util::keyboardNum(string num, int delay) {
    thread runner(kbNumRunner, num, delay);
    runner.join();
}
//键盘输入其他键
void Win32Util::keyboard(int code, int delay) {
    thread runner(kbKeyRunner, code, delay);
    runner.join();
}
void Win32Util::virtualKeyboard(HWND hwnd,int code)
{
    PostMessage(hwnd, WM_KEYDOWN, code, 0);
    PostMessage(hwnd, WM_KEYUP, code, 0);
}
void Win32Util::keyboardPaste()
{
    keybd_event(VK_CONTROL, 0, 0, 0);    // 按下CTRL键
    keybd_event('V', 0, 0, 0);    // 按下a键
    Sleep(50);
    keybd_event('V', 0, KEYEVENTF_KEYUP, 0);// 松开a键
    keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0);// 松开CTRL键
}
DEVMODE Win32Util::getL2ScreenInfo()
{
    //获取屏幕数量
    DEVMODE dm;
    int screenNUm = GetSystemMetrics(SM_CMONITORS);
    for (int i = 0;i < screenNUm;i++) {
        DISPLAY_DEVICE device;
        ZeroMemory(&device, sizeof(DISPLAY_DEVICE));
        device.cb = sizeof(DISPLAY_DEVICE);
        EnumDisplayDevices(NULL, i, &device, NULL);
        ZeroMemory(&dm, sizeof(dm));
        dm.dmSize = sizeof(dm);
        EnumDisplaySettings(device.DeviceName, ENUM_CURRENT_SETTINGS, &dm);
        if (dm.dmPelsWidth > 3000) {
            return dm;
        }
    }
    throw string("尚未找到适合L2的显示设备");
    return DEVMODE();
}
void Win32Util::moveWin(HWND win, int x, int y, int width, int height) {
    MoveWindow(win,x,y,width,height,TRUE);
}
bool Win32Util::isWindowShow(HWND win) {
 return    IsWindowVisible(win);
}
void Win32Util::showWindow(HWND hwnd) {
    ShowWindow(hwnd, SW_SHOWNORMAL);
}
void Win32Util::rollMouseWheel(bool back, HWND win,int x, int y)
{
    //back-是否往后滚
    PostMessage(win, WM_MOUSEWHEEL, back?0xFF880000:0x00780000, MAKEWORD(x, y));
}
void Win32Util::getWindowRect(HWND hwnd, RECT *rect)
{
    GetWindowRect(hwnd, rect);
}
void Win32Util::visualClick(HWND hwnd, LPARAM pos)
{
    PostMessage(hwnd, WM_LBUTTONDOWN, 0x00000001, pos);
    PostMessage(hwnd, WM_LBUTTONUP, 0x00000000, pos);
}
string Win32Util::getNowTime()
{
    // 获取系统时间
    SYSTEMTIME sys;
    GetLocalTime(&sys);
    int h = sys.wHour;
    int m = sys.wMinute;
    int s = sys.wSecond;
    string st = "";
    if (h < 10) {
        st.append("0");
    }
    st.append(to_string(h));
    st.append(":");
    if (m < 10) {
        st.append("0");
    }
    st.append(to_string(m));
    st.append(":");
    if (s < 10) {
        st.append("0");
    }
    st.append(to_string(s));
    return st;
}
void Win32Util::sendMessage(HWND hwnd, UINT  msg, LPARAM p0, LPARAM p1)
{
    SendMessage(hwnd, msg, p0, p1);
}
void Win32Util::postMessage(HWND hwnd, UINT msg, LPARAM p0, LPARAM p1)
{
    PostMessage(hwnd, msg, p0, p1);
}
void Win32Util::input_num(HWND hwnd, string num_str)
{
    for (int i = 0; i < num_str.size(); i++)
    {
        SendMessage(hwnd, WM_KEYDOWN, num_str.c_str()[i], 0);
        PostMessage(hwnd, WM_KEYUP, num_str.c_str()[i], 0);
    }
}
WechatHelper/Win32Util.h
New file
@@ -0,0 +1,73 @@
#pragma once
#include <list>
#include <string>
using namespace std;
class Win32Util
{
public:
    //按照名称搜索窗体
    static list<HWND> searchWindow(string name);
    //获取窗口名称
    static string getWindowName(HWND hwnd);
    //获取获取控件内容
    static wstring getText(HWND hwnd);
    //单击
    static void click(int delay=0);
    //单击指定位置
    static void click(int x,int y, int delay=0);
    //移动鼠标
    static void mouseMove(int x, int y,int delay=0);
    //获取焦点
    static void focus(HWND hwnd);
    // 是否有焦点
    static bool hasFocus(HWND hwnd);
    //键盘输入数字
    static void keyboardNum(string num, int delay=0);
    //键盘输入其他键
    static void keyboard(int code, int delay=0);
    //虚拟键入
    static void virtualKeyboard(HWND hwnd, int code);
    //键盘键入粘贴
    static void keyboardPaste();
    //获取L2屏幕数据
    static DEVMODE getL2ScreenInfo();
    //移动窗口
    static void moveWin(HWND win, int x,int y,int width,int height);
    //窗体是否显示
    static bool isWindowShow(HWND hwnd);
    //显示窗口
    static void showWindow(HWND hwnd);
    //鼠标滚动
    static void rollMouseWheel(bool back,HWND win,int x, int y);
    //获取位置
    static void getWindowRect(HWND hwnd,RECT *rect);
    //虚拟点击
    static void visualClick(HWND hwnd, LPARAM pos);
    //获取现在的时间
    static string getNowTime();
    static void sendMessage(HWND hwnd, UINT  msg, LPARAM p0, LPARAM p1);
    static void postMessage(HWND hwnd, UINT  msg, LPARAM p0, LPARAM p1);
    static void input_num(HWND hwnd,string content);
};
WechatHelper/framework.h
New file
@@ -0,0 +1,49 @@
#pragma once
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN            // 从 Windows 头中排除极少使用的资料
#endif
#include "targetver.h"
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // 某些 CString 构造函数将是显式的
// 关闭 MFC 的一些常见且经常可放心忽略的隐藏警告消息
#define _AFX_ALL_WARNINGS
#include <afxwin.h>         // MFC 核心组件和标准组件
#include <afxext.h>         // MFC 扩展
#include <afxdisp.h>        // MFC 自动化类
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h>           // MFC 对 Internet Explorer 4 公共控件的支持
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>             // MFC 对 Windows 公共控件的支持
#endif // _AFX_NO_AFXCMN_SUPPORT
#include <afxcontrolbars.h>     // MFC 支持功能区和控制条
#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif
WechatHelper/opencv_world455d.dll
Binary files differ
WechatHelper/pch.cpp
New file
@@ -0,0 +1,5 @@
// pch.cpp: 与预编译标头对应的源文件
#include "pch.h"
// 当使用预编译的头时,需要使用此源文件,编译才能成功。
WechatHelper/pch.h
New file
@@ -0,0 +1,13 @@
// pch.h: 这是预编译标头文件。
// 下方列出的文件仅编译一次,提高了将来生成的生成性能。
// 这还将影响 IntelliSense 性能,包括代码完成和许多代码浏览功能。
// 但是,如果此处列出的文件中的任何一个在生成之间有更新,它们全部都将被重新编译。
// 请勿在此处添加要频繁更新的文件,这将使得性能优势无效。
#ifndef PCH_H
#define PCH_H
// 添加要在此处预编译的标头
#include "framework.h"
#endif //PCH_H
WechatHelper/res/WechatHelper.ico
WechatHelper/res/WechatHelper.rc2
Binary files differ
WechatHelper/resource.h
New file
@@ -0,0 +1,21 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ 生成的包含文件。
// 供 WechatHelper.rc 使用
//
#define IDM_ABOUTBOX                    0x0010
#define IDD_ABOUTBOX                    100
#define IDS_ABOUTBOX                    101
#define IDD_WECHATHELPER_DIALOG         102
#define IDR_MAINFRAME                   128
#define IDC_BUTTON_START                1000
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE        130
#define _APS_NEXT_COMMAND_VALUE         32771
#define _APS_NEXT_CONTROL_VALUE         1002
#define _APS_NEXT_SYMED_VALUE           101
#endif
#endif
WechatHelper/targetver.h
New file
@@ -0,0 +1,8 @@
#pragma once
// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
// 将 _WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
#include <SDKDDKVer.h>
WechatHelper/tessdata/ScrollView.jar
Binary files differ
WechatHelper/tessdata/chi_sim.traineddata
Binary files differ
WechatHelper/tessdata/chi_sim_vert.traineddata
Binary files differ
WechatHelper/tessdata/chi_tra.traineddata
Binary files differ
WechatHelper/tessdata/chi_tra_vert.traineddata
Binary files differ
WechatHelper/tessdata/configs/alto
New file
@@ -0,0 +1 @@
tessedit_create_alto 1
WechatHelper/tessdata/configs/ambigs.train
New file
@@ -0,0 +1,7 @@
tessedit_ambigs_training    1
load_freq_dawg    0
load_punc_dawg    0
load_system_dawg    0
load_number_dawg    0
ambigs_debug_level    3
load_fixed_length_dawgs    0
WechatHelper/tessdata/configs/api_config
New file
@@ -0,0 +1 @@
tessedit_zero_rejection T
WechatHelper/tessdata/configs/bigram
New file
@@ -0,0 +1,5 @@
load_bigram_dawg    True
tessedit_enable_bigram_correction    True
tessedit_bigram_debug    3
save_raw_choices    True
save_alt_choices    True
WechatHelper/tessdata/configs/box.train
New file
@@ -0,0 +1,12 @@
disable_character_fragments T
file_type                   .bl
textord_fast_pitch_test    T
tessedit_zero_rejection T
tessedit_minimal_rejection F
tessedit_write_rep_codes F
edges_children_fix F
edges_childarea 0.65
edges_boxarea 0.9
tessedit_resegment_from_boxes T
tessedit_train_from_boxes T
textord_no_rejects T
WechatHelper/tessdata/configs/box.train.stderr
New file
@@ -0,0 +1,13 @@
file_type .bl
#tessedit_use_nn F
textord_fast_pitch_test T
tessedit_zero_rejection T
tessedit_minimal_rejection F
tessedit_write_rep_codes F
edges_children_fix F
edges_childarea 0.65
edges_boxarea 0.9
tessedit_resegment_from_boxes T
tessedit_train_from_boxes T
#textord_repeat_extraction F
textord_no_rejects T
WechatHelper/tessdata/configs/digits
New file
@@ -0,0 +1 @@
tessedit_char_whitelist 0123456789-.
WechatHelper/tessdata/configs/get.images
New file
@@ -0,0 +1 @@
tessedit_write_images T
WechatHelper/tessdata/configs/hocr
New file
@@ -0,0 +1,2 @@
tessedit_create_hocr 1
hocr_font_info 0
WechatHelper/tessdata/configs/inter
New file
@@ -0,0 +1,2 @@
interactive_display_mode                T
tessedit_display_outwords        T
WechatHelper/tessdata/configs/kannada
New file
@@ -0,0 +1,4 @@
textord_skewsmooth_offset 8
textord_skewsmooth_offset2 8
textord_merge_desc 0.5
textord_no_rejects 1
WechatHelper/tessdata/configs/linebox
New file
@@ -0,0 +1,2 @@
tessedit_resegment_from_line_boxes 1
tessedit_make_boxes_from_boxes 1
WechatHelper/tessdata/configs/logfile
New file
@@ -0,0 +1 @@
debug_file tesseract.log
WechatHelper/tessdata/configs/lstm.train
New file
@@ -0,0 +1,11 @@
file_type                   .bl
textord_fast_pitch_test    T
tessedit_zero_rejection T
tessedit_minimal_rejection F
tessedit_write_rep_codes F
edges_children_fix F
edges_childarea 0.65
edges_boxarea 0.9
tessedit_train_line_recognizer T
textord_no_rejects T
tessedit_init_config_only T
WechatHelper/tessdata/configs/lstmbox
New file
@@ -0,0 +1 @@
tessedit_create_lstmbox 1
WechatHelper/tessdata/configs/lstmdebug
New file
@@ -0,0 +1,4 @@
stopper_debug_level 1
classify_debug_level 1
segsearch_debug_level 1
language_model_debug_level 3
WechatHelper/tessdata/configs/makebox
New file
@@ -0,0 +1 @@
tessedit_create_boxfile 1
WechatHelper/tessdata/configs/page
New file
@@ -0,0 +1,3 @@
tessedit_create_page_xml 1
# page_xml_polygon 1
# page_xml_level 0
WechatHelper/tessdata/configs/pdf
New file
@@ -0,0 +1 @@
tessedit_create_pdf 1
WechatHelper/tessdata/configs/quiet
New file
@@ -0,0 +1 @@
debug_file /dev/null
WechatHelper/tessdata/configs/rebox
New file
@@ -0,0 +1,2 @@
tessedit_resegment_from_boxes 1
tessedit_make_boxes_from_boxes 1
WechatHelper/tessdata/configs/strokewidth
New file
@@ -0,0 +1,12 @@
textord_show_blobs 0
textord_debug_tabfind 3
textord_tabfind_show_partitions 1
textord_tabfind_show_initial_partitions 1
textord_tabfind_show_columns 1
textord_tabfind_show_blocks 1
textord_tabfind_show_initialtabs 1
textord_tabfind_show_finaltabs 1
textord_tabfind_show_strokewidths 1
textord_tabfind_show_vlines 0
textord_tabfind_show_images 1
tessedit_dump_pageseg_images 0
WechatHelper/tessdata/configs/tsv
New file
@@ -0,0 +1 @@
tessedit_create_tsv 1
WechatHelper/tessdata/configs/txt
New file
@@ -0,0 +1,3 @@
# This config file should be used with other config files which create renderers.
# usage example: tesseract eurotext.tif eurotext txt hocr pdf
tessedit_create_txt 1
WechatHelper/tessdata/configs/unlv
New file
@@ -0,0 +1,2 @@
tessedit_write_unlv 1
unlv_tilde_crunching T
WechatHelper/tessdata/configs/wordstrbox
New file
@@ -0,0 +1 @@
tessedit_create_wordstrbox 1
WechatHelper/tessdata/eng.traineddata
Binary files differ
WechatHelper/tessdata/jaxb-api-2.3.1.jar
Binary files differ
WechatHelper/tessdata/osd.traineddata
Binary files differ
WechatHelper/tessdata/pdf.ttf
Binary files differ
WechatHelper/tessdata/piccolo2d-core-3.0.1.jar
Binary files differ
WechatHelper/tessdata/piccolo2d-extras-3.0.1.jar
Binary files differ
WechatHelper/tessdata/tessconfigs/batch
New file
@@ -0,0 +1 @@
# No content needed as all defaults are correct.
WechatHelper/tessdata/tessconfigs/batch.nochop
New file
@@ -0,0 +1,2 @@
chop_enable 0
wordrec_enable_assoc 0
WechatHelper/tessdata/tessconfigs/matdemo
New file
@@ -0,0 +1,7 @@
#################################################
# Adaptive Matcher Using PreAdapted Templates
#################################################
classify_enable_adaptive_debugger   1
matcher_debug_flags         6
matcher_debug_level       1
WechatHelper/tessdata/tessconfigs/msdemo
New file
@@ -0,0 +1,12 @@
#################################################
# Adaptive Matcher Using PreAdapted Templates
#################################################
classify_enable_adaptive_debugger    1
matcher_debug_flags         6
matcher_debug_level       1
wordrec_display_splits          0
wordrec_display_all_blobs       1
wordrec_display_segmentations   2
classify_debug_level        1
WechatHelper/tessdata/tessconfigs/nobatch
New file
@@ -0,0 +1 @@
WechatHelper/tessdata/tessconfigs/segdemo
New file
@@ -0,0 +1,9 @@
#################################################
# Adaptive Matcher Using PreAdapted Templates
#################################################
wordrec_display_splits          0
wordrec_display_all_blobs       1
wordrec_display_segmentations   2
classify_debug_level        1
stopper_debug_level 1
WechatHelper/tesseract55.lib
Binary files differ
WechatHelper/tesseract55d.dll
Binary files differ
WechatHelper/win32_screen_shots.cpp
New file
@@ -0,0 +1,133 @@
#include "pch.h"
#include "win32_screen_shots.h"
namespace _wss
{
    cv::Mat get_window_bits(HWND h, RECT* area)
    {
        //printf("窗体:%d \n",h==NULL?0: 1);
        cv::Mat result;
        HBITMAP bit = nullptr;
        RECT rect{ 0 };
        int width = 0, height = 0;
        HDC hdc = nullptr, hdc_compatible = nullptr;
        BITMAP info{ 0 };
        int channels = 0;
        if (h == nullptr)
            return result;
        do
        {
            if (GetWindowRect(h, &rect) == FALSE)
                break;
            int owidth = abs( rect.right - rect.left);
            int oheight =abs( rect.bottom - rect.top);
            // 截图的区域
            width = owidth;
            height = oheight;
            int startx = 0;
            int starty = 0;
            if (area != nullptr) {
                width = area->right - area->left + 1;
                height = area->bottom - area->top + 1;
                startx = area->left;
                starty = area->top;
            }
            hdc = GetWindowDC(h);
            if (hdc == nullptr)
                break;
            hdc_compatible = CreateCompatibleDC(hdc);
            if (hdc_compatible == nullptr)
                break;
            bit = CreateCompatibleBitmap(hdc, width, height);
            if (bit == nullptr)
                break;
            SelectObject(hdc_compatible, bit);
            if (BitBlt(hdc_compatible, 0, 0, width, height, hdc, startx, starty, SRCCOPY) == FALSE)
                break;
            if (GetObjectA(bit, sizeof(BITMAP), &info) == 0)
                break;
            channels = info.bmBitsPixel == 1 ? 1 : info.bmBitsPixel / 8;
            result.create(cv::Size(info.bmWidth, info.bmHeight), CV_MAKETYPE(CV_8U, channels));
            if (GetBitmapBits(bit, info.bmHeight * info.bmWidth * channels, result.data) == 0)
              break;
            //单通道图
            //result.create(cv::Size(info.bmWidth, info.bmHeight), CV_8UC1);
            //if (GetBitmapBits(bit, info.bmHeight * info.bmWidth * channels, result.data) == 0)
            //    break;
        } while (false);
        if (hdc)
            ReleaseDC(h, hdc);
        if (hdc_compatible)
            DeleteDC(hdc_compatible);
        if (bit)
            DeleteObject(bit);
        return result;
    }
    cv::Mat screen_shot_by_window(HWND h)
    {
        return get_window_bits(h);
    }
    cv::Mat screen_shot_by_window(std::string name)
    {
        return get_window_bits(FindWindowA(0, name.c_str()));
    }
    cv::Mat screen_shot_by_full_screen(HWND h)
    {
        cv::Mat desktop;
        if (h == nullptr)
            return desktop;
        desktop = get_window_bits(GetDesktopWindow());
        if (desktop.empty())
            return desktop;
        RECT rect{ 0 };
        if (GetWindowRect(h, &rect) == FALSE)
            return desktop;
        if (rect.left < 0)
            rect.left = 0;
        if (rect.top < 0)
            rect.top = 0;
        int width = rect.right - rect.left;
        int height = rect.bottom - rect.top;
        cv::Mat result = desktop(cv::Rect(rect.left, rect.top, width, height));
        return result;
    }
    cv::Mat screen_shot_by_full_screen(std::string name)
    {
        return screen_shot_by_full_screen(FindWindowA(0, name.c_str()));
    }
}
WechatHelper/win32_screen_shots.h
New file
@@ -0,0 +1,38 @@
#pragma once
#include <Windows.h>
#include <string>
// 记住包含opencv目录
#include<opencv2\opencv.hpp>
#pragma comment(lib, "user32.lib")
namespace _wss
{
    /**
     * 获取指定窗口句柄的mat
     * @Param : h
     */
    cv::Mat get_window_bits(HWND h,RECT *rect=nullptr);
    /**
    * 直接根据窗口进行截图
    * @Param : name
    * @Param : h
    */
    cv::Mat screen_shot_by_window(std::string name);
    cv::Mat screen_shot_by_window(HWND h);
    /**
     * 先截取全屏后根据窗口位置进行截图
     * @Param : name
     * @Param : h
     */
    cv::Mat screen_shot_by_full_screen(std::string name);
    cv::Mat screen_shot_by_full_screen(HWND h);
}
common/NetworkApi.cpp
@@ -331,7 +331,7 @@
    }
}
int NetworkApi::get_auto_cancel_sell_mode()
int NetworkApi::get_auto_cancel_sell_mode(string code)
{
    rapidjson::StringBuffer buf;
    rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buf);
@@ -344,6 +344,8 @@
    writer.String("auto_cancel_sell_mode");
    writer.Key("operate");
    writer.Int(3);
    writer.Key("code");
    writer.String(code.c_str());
    writer.EndObject();
    writer.EndObject();
    const char* json_content = buf.GetString();
@@ -358,7 +360,7 @@
    }
}
void NetworkApi::set_auto_cancel_sell_mode(int mode)
void NetworkApi::set_auto_cancel_sell_mode(string code, int mode)
{
    rapidjson::StringBuffer buf;
    rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buf);
@@ -373,6 +375,8 @@
    writer.Int(1);
    writer.Key("mode");
    writer.Int(mode);
    writer.Key("code");
    writer.String(code.c_str());
    writer.EndObject();
    writer.EndObject();
    const char* json_content = buf.GetString();
@@ -790,7 +794,7 @@
            CString code = arr[0].GetString();
            CString codeName= arr[1].IsNull()?L"δ֪":arr[1].GetString() ;
            float rate = 0.0f;
            if (arr.Size() > 2) {
            if (arr.Size() > 2&& arr[2].IsFloat()) {
                rate = arr[2].GetFloat();
            }
            CodeInfo ci = CodeInfo({ code ,codeName, rate });
@@ -925,6 +929,24 @@
    writer.String("sync_l1_subscript_codes");
    writer.Key("data");
    writer.StartObject();
    writer.EndObject();
    writer.EndObject();
    const char* json_content = buf.GetString();
    string result = base_trade_request(std::string(json_content));
    return result;
}
string NetworkApi::sync_radical_buy_special_codes()
{
    rapidjson::StringBuffer buf;
    rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buf);
    writer.StartObject();
    writer.Key("type");
    writer.String("common");
    writer.Key("data");
    writer.StartObject();
    writer.Key("ctype");
    writer.String("async_radical_buy_special_codes");
    writer.EndObject();
    writer.EndObject();
    const char* json_content = buf.GetString();
@@ -1134,7 +1156,7 @@
    return result;
}
void NetworkApi::set_buy_money_and_count(int normalCount, string normalMoneyJson, int radicalCount, string radicalMoneyJson)
void NetworkApi::set_buy_money_and_count(int normalCount, string normalMoneyJson, int radicalCount, string radicalMoneyJson, int default_buy_money)
{
    rapidjson::StringBuffer buf;
    rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buf);
@@ -1145,6 +1167,8 @@
    writer.StartObject();
    writer.Key("ctype");
    writer.String("set_buy_money_count_setting");
    writer.Key("default_buy_money");
    writer.Int(default_buy_money);
    writer.Key("normal");
    writer.StartArray();
    writer.Int(normalCount);
@@ -1381,6 +1405,102 @@
    return result;
}
string NetworkApi::get_place_order_settings()
{
    rapidjson::StringBuffer buf;
    rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buf);
    writer.StartObject();
    writer.Key("type");
    writer.String("common");
    writer.Key("data");
    writer.StartObject();
    writer.Key("ctype");
    writer.String("get_place_order_settings");
    writer.EndObject();
    writer.EndObject();
    const char* json_content = buf.GetString();
    string result = base_request(std::string(json_content));
    return result;
}
string NetworkApi::set_place_order_settings(string radical_buy_data)
{
    rapidjson::StringBuffer buf;
    rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buf);
    writer.StartObject();
    writer.Key("type");
    writer.String("common");
    writer.Key("data");
    writer.StartObject();
    writer.Key("ctype");
    writer.String("set_place_order_settings");
    writer.Key("radical_buy");
    writer.String(radical_buy_data.c_str());
    writer.EndObject();
    writer.EndObject();
    const char* json_content = buf.GetString();
    string result = base_request(std::string(json_content));
    return result;
}
string NetworkApi::get_buy_open_limit_up_codes()
{
    rapidjson::StringBuffer buf;
    rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buf);
    writer.StartObject();
    writer.Key("type");
    writer.String("common");
    writer.Key("data");
    writer.StartObject();
    writer.Key("ctype");
    writer.String("get_buy_open_limit_up_codes");
    writer.EndObject();
    writer.EndObject();
    const char* json_content = buf.GetString();
    string result = base_request(std::string(json_content));
    return result;
}
string NetworkApi::set_buy_open_limit_up_codes(list<string> codes)
{
    rapidjson::StringBuffer codesbuf;
    rapidjson::PrettyWriter<rapidjson::StringBuffer> writercodes(codesbuf);
    writercodes.StartArray();
    for (list<string>::iterator e = codes.begin(); e != codes.end(); ++e) {
        writercodes.String((*e).c_str());
    }
    writercodes.EndArray();
    const char* codes_json_content = codesbuf.GetString();
    rapidjson::StringBuffer buf;
    rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buf);
    writer.StartObject();
    writer.Key("type");
    writer.String("common");
    writer.Key("data");
    writer.StartObject();
    writer.Key("ctype");
    writer.String("set_buy_open_limit_up_codes");
    writer.Key("codes");
    writer.String(codes_json_content);
    writer.EndObject();
    writer.EndObject();
    const char* json_content = buf.GetString();
    string result = base_request(std::string(json_content));
    return result;
}
string NetworkApi::list_delegate_records(CString updateTime,bool canCancel)
{
    rapidjson::StringBuffer buf;
@@ -1459,3 +1579,79 @@
    return cancel_order(code, L"",L"");
}
string NetworkApi::get_same_block_limit_up_codes_count(list<string> codes)
{
    rapidjson::StringBuffer codesbuf;
    rapidjson::PrettyWriter<rapidjson::StringBuffer> writercodes(codesbuf);
    writercodes.StartArray();
    for (list<string>::iterator e = codes.begin(); e != codes.end(); ++e) {
        writercodes.String((*e).c_str());
    }
    writercodes.EndArray();
    const char* codes_json_content = codesbuf.GetString();
    rapidjson::StringBuffer buf;
    rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buf);
    writer.StartObject();
    writer.Key("type");
    writer.String("common");
    writer.Key("data");
    writer.StartObject();
    writer.Key("ctype");
    writer.String("get_same_block_limit_up_codes_count");
    writer.Key("codes");
    writer.String(codes_json_content);
    writer.EndObject();
    writer.EndObject();
    const char* json_content = buf.GetString();
    string result = base_trade_request(std::string(json_content));
    //string result = StringUtil::cstring2String(L"{\"code\":0,\"data\":[{\"code\":\"002729\",\"code_name\":\"好利科技\"}, {\"code\":\"300564\",\"code_name\":\"筑博设计\"}]}");
    return result;
}
string NetworkApi::get_code_deal_queue(string code, int min_money)
{
    rapidjson::StringBuffer buf;
    rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buf);
    writer.StartObject();
    writer.Key("type");
    writer.String("common");
    writer.Key("data");
    writer.StartObject();
    writer.Key("ctype");
    writer.String("get_deal_queue");
    writer.Key("code");
    writer.String(code.c_str());
    writer.Key("min_money");
    writer.Int(min_money);
    writer.EndObject();
    writer.EndObject();
    const char* json_content = buf.GetString();
    string result = base_trade_request(std::string(json_content));
    return result;
}
string NetworkApi::test_place_order(string code)
{
    rapidjson::StringBuffer buf;
    rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buf);
    writer.StartObject();
    writer.Key("type");
    writer.String("common");
    writer.Key("data");
    writer.StartObject();
    writer.Key("ctype");
    writer.String("test_place_order");
    writer.Key("code");
    writer.String(code.c_str());
    writer.EndObject();
    writer.EndObject();
    const char* json_content = buf.GetString();
    string result = base_trade_request(std::string(json_content));
    return result;
}
common/NetworkApi.h
@@ -65,10 +65,10 @@
    // 获取自动撤卖模式
    static int get_auto_cancel_sell_mode();
    static int get_auto_cancel_sell_mode(string code);
    // 设置自动撤卖模式
    static void set_auto_cancel_sell_mode(int mode);
    static void set_auto_cancel_sell_mode(string code, int mode);
    // 获取是否买板块独苗
    static int get_buy_unique_block_mode();
@@ -193,6 +193,9 @@
    //同步L1订阅代码
    static string sync_l1_subscript_codes();
    //同步扫入辨识度代码
    static string sync_radical_buy_special_codes();
    //获取系统日志
    static string list_system_log(int start_index, int count);
@@ -222,7 +225,7 @@
    static string get_buy1_info(string code);
    // 设置每个代码可买的金额
    static void set_buy_money_and_count(int mormalCount, string normalMoneyJson,int radicalCount, string radicalMoneyJson);
    static void set_buy_money_and_count(int mormalCount, string normalMoneyJson,int radicalCount, string radicalMoneyJson, int default_buy_money);
    // 获取买入设置
    static string get_buy_money_and_count();
@@ -257,5 +260,27 @@
    // 获取今日已经更新的K线的数据
    static string get_today_updated_history_k_bars_count();
    // 获取买入下单设置
    static string get_place_order_settings();
    // 买入下单参数设置
    static string set_place_order_settings(string radical_buy_data);
    // 隔夜单排1
    static string get_buy_open_limit_up_codes();
    static string set_buy_open_limit_up_codes(list<string> codes);
    // 获取代码同板块历史涨停数量
    static string get_same_block_limit_up_codes_count(list<string> codes);
    // 获取成交队列
    static string get_code_deal_queue(string code, int min_money);
    //测试下单
    static string test_place_order(string code);
};
common/StringUtil.h
@@ -59,6 +59,12 @@
        return stream.str();
    }
    static string to_string(float val) {
        std::stringstream stream;
        stream << std::fixed << std::setprecision(2) << val;
        return stream.str();
    }
    static bool isNumber(const std::string& str) {
        if (str.empty()) {
            return false;
@@ -130,4 +136,20 @@
        return decoded;
    }
    static std::string trim(const std::string& str) {
        if (str.empty()) {
            return str;
        }
        // 去除前空格
        size_t start = str.find_first_not_of(" \t\n\r");
        if (start == std::string::npos) {
            return ""; // 如果全是空格,返回空字符串
        }
        // 去除后空格
        size_t end = str.find_last_not_of(" \t\n\r");
        return str.substr(start, end - start + 1);
    }
};
common/TimeUtil.h
@@ -22,6 +22,14 @@
        return std::string(time_str);
    }
    /// <summary>
    /// 获取当前时间戳(毫秒)
    /// </summary>
    /// <returns></returns>
    static long getNowTimestamp() {
        return GetTickCount64();
    }
    static std::string getNowTime(std::string format) {
        std::time_t now = std::time(nullptr);