mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 17:57:01 +08:00
代码统一格式化
This commit is contained in:
@@ -76,8 +76,5 @@ namespace asst {
|
||||
std::queue<std::pair<AsstMsg, json::value>> m_msg_queue;
|
||||
std::mutex m_msg_mutex;
|
||||
std::condition_variable m_msg_condvar;
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <Windows.h>
|
||||
|
||||
namespace asst {
|
||||
|
||||
static std::string GetCurrentDir()
|
||||
{
|
||||
static std::string cur_dir;
|
||||
@@ -80,7 +79,6 @@ namespace asst {
|
||||
return strTemp;
|
||||
}
|
||||
|
||||
|
||||
//template<typename T,
|
||||
// typename = typename std::enable_if<std::is_constructible<T, std::string>::value>::type>
|
||||
// std::string VectorToString(const std::vector<T>& vector, bool to_gbk = false) {
|
||||
|
||||
@@ -5,22 +5,22 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
namespace asst {
|
||||
class Assistance;
|
||||
}
|
||||
typedef void (MEO_CALL *AsstCallback)(int msg, const char* detail_json, void* custom_arg);
|
||||
namespace asst {
|
||||
class Assistance;
|
||||
}
|
||||
typedef void (MEO_CALL* AsstCallback)(int msg, const char* detail_json, void* custom_arg);
|
||||
|
||||
MEOAPI_PORT asst::Assistance* AsstCreate();
|
||||
MEOAPI_PORT asst::Assistance* AsstCreateEx(AsstCallback callback, void* custom_arg);
|
||||
MEOAPI_PORT void AsstDestory(asst::Assistance* p_asst);
|
||||
MEOAPI_PORT bool AsstCatchEmulator(asst::Assistance* p_asst);
|
||||
MEOAPI_PORT void AsstStart(asst::Assistance* p_asst, const char* task);
|
||||
MEOAPI_PORT void AsstStop(asst::Assistance* p_asst);
|
||||
MEOAPI_PORT bool AsstSetParam(asst::Assistance* p_asst, const char* type, const char* param, const char* value);
|
||||
MEOAPI_PORT bool AsstRunOpenRecruit(asst::Assistance* p_asst, const int required_level[], bool set_time);
|
||||
MEOAPI_PORT bool AsstTestOcr(asst::Assistance* p_asst, const char ** text_array, int array_size, bool need_click);
|
||||
MEOAPI_PORT asst::Assistance* AsstCreate();
|
||||
MEOAPI_PORT asst::Assistance* AsstCreateEx(AsstCallback callback, void* custom_arg);
|
||||
MEOAPI_PORT void AsstDestory(asst::Assistance* p_asst);
|
||||
MEOAPI_PORT bool AsstCatchEmulator(asst::Assistance* p_asst);
|
||||
MEOAPI_PORT void AsstStart(asst::Assistance* p_asst, const char* task);
|
||||
MEOAPI_PORT void AsstStop(asst::Assistance* p_asst);
|
||||
MEOAPI_PORT bool AsstSetParam(asst::Assistance* p_asst, const char* type, const char* param, const char* value);
|
||||
MEOAPI_PORT bool AsstRunOpenRecruit(asst::Assistance* p_asst, const int required_level[], bool set_time);
|
||||
MEOAPI_PORT bool AsstTestOcr(asst::Assistance* p_asst, const char** text_array, int array_size, bool need_click);
|
||||
|
||||
MEOAPI_PORT bool CheckVersionUpdate(char* tag_buffer, int tag_bufsize, char* html_url_buffer, int html_bufsize, char* body_buffer, int body_bufsize);
|
||||
MEOAPI_PORT bool CheckVersionUpdate(char* tag_buffer, int tag_bufsize, char* html_url_buffer, int html_bufsize, char* body_buffer, int body_bufsize);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace json
|
||||
}
|
||||
|
||||
namespace asst {
|
||||
|
||||
enum class HandleType
|
||||
{
|
||||
Window = 1,
|
||||
@@ -38,8 +37,8 @@ namespace asst {
|
||||
ClickRect = BasicClick | 2, // 点击指定区域
|
||||
ClickRand = BasicClick | 4, // 点击随机区域
|
||||
DoNothing = 0x200, // 什么都不做
|
||||
Stop = 0x400, // 停止工作线程
|
||||
PrintWindow = 0x800 // 截图
|
||||
Stop = 0x400, // 停止工作线程
|
||||
PrintWindow = 0x800 // 截图
|
||||
};
|
||||
|
||||
enum class AlgorithmType {
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "AsstDef.h"
|
||||
|
||||
namespace asst {
|
||||
|
||||
class Configer
|
||||
{
|
||||
public:
|
||||
@@ -40,8 +39,8 @@ namespace asst {
|
||||
|
||||
private:
|
||||
Configer() = default;
|
||||
Configer(const Configer & rhs) = default;
|
||||
Configer(Configer && rhs) noexcept = default;
|
||||
Configer(const Configer& rhs) = default;
|
||||
Configer(Configer&& rhs) noexcept = default;
|
||||
|
||||
bool _load(const std::string& filename);
|
||||
};
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
|
||||
#include "AsstDef.h"
|
||||
|
||||
|
||||
namespace asst {
|
||||
|
||||
class WinMacro;
|
||||
|
||||
class Identify
|
||||
@@ -37,13 +35,13 @@ namespace asst {
|
||||
std::optional<Rect> find_text(const cv::Mat& mat, const std::string& text);
|
||||
std::vector<TextArea> find_text(const cv::Mat& mat, const std::vector<std::string>& texts);
|
||||
std::vector<TextArea> find_text(const cv::Mat& mat, const std::unordered_set<std::string>& texts);
|
||||
|
||||
|
||||
std::vector<TextArea> ocr_detect(const cv::Mat& mat);
|
||||
private:
|
||||
cv::Mat image_2_hist(const cv::Mat& src);
|
||||
double image_hist_comp(const cv::Mat& src, const cv::MatND& hist);
|
||||
static asst::Rect cvrect_2_rect(const cv::Rect& cvRect) {
|
||||
return asst::Rect(cvRect.x, cvRect.y, cvRect.width, cvRect.height);
|
||||
static asst::Rect cvrect_2_rect(const cv::Rect& cvRect) {
|
||||
return asst::Rect(cvRect.x, cvRect.y, cvRect.width, cvRect.height);
|
||||
}
|
||||
|
||||
// return pair< suitability, raw opencv::point>
|
||||
@@ -55,5 +53,4 @@ namespace asst {
|
||||
|
||||
OcrLiteCaller m_ocr_lite;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -31,10 +31,9 @@ namespace asst {
|
||||
|
||||
private:
|
||||
OpenRecruitConfiger() = default;
|
||||
OpenRecruitConfiger(const OpenRecruitConfiger & rhs) = default;
|
||||
OpenRecruitConfiger(OpenRecruitConfiger && rhs) noexcept = default;
|
||||
OpenRecruitConfiger(const OpenRecruitConfiger& rhs) = default;
|
||||
OpenRecruitConfiger(OpenRecruitConfiger&& rhs) noexcept = default;
|
||||
|
||||
bool _load(const std::string& filename);
|
||||
};
|
||||
|
||||
}
|
||||
@@ -22,7 +22,6 @@ namespace json
|
||||
}
|
||||
|
||||
namespace asst {
|
||||
|
||||
class WinMacro;
|
||||
class Identify;
|
||||
class Configer;
|
||||
@@ -118,7 +117,7 @@ namespace asst {
|
||||
virtual void set_retry_times(int times) { m_retry_times = times; }
|
||||
virtual int get_retry_times() { return m_retry_times; }
|
||||
virtual void set_task_chain(std::string name) { m_task_chain = std::move(name); }
|
||||
virtual const std::string & get_task_chain() { return m_task_chain; }
|
||||
virtual const std::string& get_task_chain() { return m_task_chain; }
|
||||
protected:
|
||||
virtual cv::Mat get_format_image();
|
||||
virtual bool set_control_scale(int cur_width, int cur_height);
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace asst {
|
||||
static Updater& get_instance();
|
||||
|
||||
bool has_new_version();
|
||||
const VersionInfo & get_version_info() const noexcept;
|
||||
const VersionInfo& get_version_info() const noexcept;
|
||||
|
||||
private:
|
||||
Updater() = default;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace asst {
|
||||
class WinMacro
|
||||
{
|
||||
public:
|
||||
WinMacro(const EmulatorInfo & info, HandleType type);
|
||||
WinMacro(const EmulatorInfo& info, HandleType type);
|
||||
~WinMacro() = default;
|
||||
|
||||
bool captured() const noexcept;
|
||||
@@ -23,8 +23,8 @@ namespace asst {
|
||||
bool resizeWindow(); // by configer
|
||||
bool showWindow();
|
||||
bool hideWindow();
|
||||
bool click(const Point & p);
|
||||
bool click(const Rect & rect);
|
||||
bool click(const Point& p);
|
||||
bool click(const Rect& rect);
|
||||
void setControlScale(double scale);
|
||||
cv::Mat getImage(const Rect& rect);
|
||||
Rect getWindowRect();
|
||||
|
||||
@@ -245,7 +245,6 @@ void Assistance::working_proc(Assistance* p_this)
|
||||
std::unique_lock<std::mutex> lock(p_this->m_mutex);
|
||||
if (!p_this->m_thread_idle && !p_this->m_tasks_queue.empty())
|
||||
{
|
||||
|
||||
auto start_time = std::chrono::system_clock::now();
|
||||
std::shared_ptr<AbstractTask> task_ptr = p_this->m_tasks_queue.front();
|
||||
task_ptr->set_ptr(p_this->m_window_ptr, p_this->m_view_ptr, p_this->m_control_ptr, p_this->m_identify_ptr);
|
||||
@@ -430,4 +429,4 @@ void Assistance::clear_exec_times()
|
||||
{
|
||||
pair.second->exec_times = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,7 @@ bool AsstRunOpenRecruit(asst::Assistance* p_asst, const int required_level[], bo
|
||||
if (p_asst == NULL) {
|
||||
return false;
|
||||
}
|
||||
int len = sizeof required_level / sizeof(int);
|
||||
int len = sizeof(required_level) / sizeof(const int);
|
||||
std::vector<int> level_vector;
|
||||
level_vector.assign(required_level, required_level + len);
|
||||
p_asst->start_open_recruit(level_vector, set_time);
|
||||
@@ -128,7 +128,6 @@ bool AsstTestOcr(asst::Assistance* p_asst, const char** text_array, int array_si
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool CheckVersionUpdate(char* tag_buffer, int tag_bufsize, char* html_url_buffer, int html_bufsize, char* body_buffer, int body_bufsize)
|
||||
{
|
||||
bool ret = asst::Updater::get_instance().has_new_version();
|
||||
|
||||
@@ -29,7 +29,7 @@ bool Configer::load(const std::string& filename)
|
||||
{
|
||||
DebugTraceFunction;
|
||||
DebugTrace("Configer::load | ", filename);
|
||||
|
||||
|
||||
Configer temp;
|
||||
if (temp._load(filename)) {
|
||||
*this = std::move(temp);
|
||||
@@ -147,7 +147,7 @@ bool asst::Configer::_load(const std::string& filename)
|
||||
match_task_info_ptr->hist_threshold = task_json.get("histThreshold", DefaultCachetempl_threshold);
|
||||
task_info_ptr = match_task_info_ptr;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case AlgorithmType::OcrDetect:
|
||||
{
|
||||
auto ocr_task_info_ptr = std::make_shared<OcrTaskInfo>();
|
||||
@@ -164,7 +164,7 @@ bool asst::Configer::_load(const std::string& filename)
|
||||
}
|
||||
task_info_ptr = ocr_task_info_ptr;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
task_info_ptr->algorithm = algorithm;
|
||||
task_info_ptr->name = name;
|
||||
@@ -184,7 +184,7 @@ bool asst::Configer::_load(const std::string& filename)
|
||||
}
|
||||
else if (type == "clickrect") {
|
||||
task_info_ptr->type = ProcessTaskType::ClickRect;
|
||||
json::value & area_json = task_json["specificArea"];
|
||||
json::value& area_json = task_json["specificArea"];
|
||||
task_info_ptr->specific_area = Rect(
|
||||
area_json[0].as_integer(),
|
||||
area_json[1].as_integer(),
|
||||
@@ -201,8 +201,8 @@ bool asst::Configer::_load(const std::string& filename)
|
||||
|
||||
task_info_ptr->max_times = task_json.get("maxTimes", INT_MAX);
|
||||
if (task_json.exist("exceededNext")) {
|
||||
json::array & excceed_next_arr = task_json["exceededNext"].as_array();
|
||||
for (const json::value & excceed_next : excceed_next_arr) {
|
||||
json::array& excceed_next_arr = task_json["exceededNext"].as_array();
|
||||
for (const json::value& excceed_next : excceed_next_arr) {
|
||||
task_info_ptr->exceeded_next.emplace_back(excceed_next.as_string());
|
||||
}
|
||||
}
|
||||
@@ -212,13 +212,13 @@ bool asst::Configer::_load(const std::string& filename)
|
||||
task_info_ptr->pre_delay = task_json.get("preDelay", 0);
|
||||
task_info_ptr->rear_delay = task_json.get("rearDelay", 0);
|
||||
if (task_json.exist("reduceOtherTimes")) {
|
||||
json::array & reduce_arr = task_json["reduceOtherTimes"].as_array();
|
||||
json::array& reduce_arr = task_json["reduceOtherTimes"].as_array();
|
||||
for (const json::value& reduce : reduce_arr) {
|
||||
task_info_ptr->reduce_other_times.emplace_back(reduce.as_string());
|
||||
}
|
||||
}
|
||||
|
||||
json::array & next_arr = task_json["next"].as_array();
|
||||
json::array& next_arr = task_json["next"].as_array();
|
||||
for (const json::value& next : next_arr) {
|
||||
task_info_ptr->next.emplace_back(next.as_string());
|
||||
}
|
||||
|
||||
@@ -63,12 +63,12 @@ std::vector<TextArea> asst::Identify::ocr_detect(const cv::Mat& mat)
|
||||
2.0f, false, false);
|
||||
|
||||
std::vector<TextArea> result;
|
||||
for (TextBlock & text_block : ocr_results.textBlocks) {
|
||||
for (TextBlock& text_block : ocr_results.textBlocks) {
|
||||
if (text_block.boxPoint.size() != 4) {
|
||||
continue;
|
||||
}
|
||||
// the rect like ↓
|
||||
// 0 - 1
|
||||
// 0 - 1
|
||||
// 3 - 2
|
||||
int x = text_block.boxPoint.at(0).x;
|
||||
int y = text_block.boxPoint.at(0).y;
|
||||
@@ -111,7 +111,7 @@ std::tuple<AlgorithmType, double, asst::Rect> Identify::find_image(const Mat& cu
|
||||
const cv::Mat& templ_mat = m_mat_map.at(templ);
|
||||
const auto& [value, point] = match_template(cur, templ_mat);
|
||||
cv::Rect raw_rect(point.x, point.y, templ_mat.cols, templ_mat.rows);
|
||||
|
||||
|
||||
if (m_use_cache && value >= templ_threshold) {
|
||||
m_cache_map.emplace(templ, std::make_pair(raw_rect, image_2_hist(cur(raw_rect))));
|
||||
}
|
||||
|
||||
@@ -86,4 +86,4 @@ bool asst::OpenRecruitConfiger::_load(const std::string& filename)
|
||||
DebugTrace("Load config succeed");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -234,7 +234,6 @@ bool ProcessTask::run()
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
std::shared_ptr<TaskInfo> ProcessTask::match_image(Rect* matched_rect)
|
||||
{
|
||||
//// 如果当前仅有一个任务,且这个任务的阈值是0(说明是justreturn的),就不抓图像识别了,直接返回就行
|
||||
@@ -310,7 +309,7 @@ std::shared_ptr<TaskInfo> ProcessTask::match_image(Rect* matched_rect)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case AlgorithmType::OcrDetect:
|
||||
{
|
||||
std::shared_ptr<OcrTaskInfo> ocr_task_info_ptr =
|
||||
@@ -318,7 +317,7 @@ std::shared_ptr<TaskInfo> ProcessTask::match_image(Rect* matched_rect)
|
||||
std::vector<TextArea> all_text_area = ocr_detect(cur_image);
|
||||
std::vector<TextArea> match_result;
|
||||
if (ocr_task_info_ptr->need_match) {
|
||||
match_result = text_match(all_text_area,
|
||||
match_result = text_match(all_text_area,
|
||||
ocr_task_info_ptr->text, ocr_task_info_ptr->replace_map);
|
||||
}
|
||||
else {
|
||||
@@ -333,7 +332,7 @@ std::shared_ptr<TaskInfo> ProcessTask::match_image(Rect* matched_rect)
|
||||
matched = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
//CompareHist是MatchTemplate的衍生算法,不应作为单独的配置参数出现
|
||||
//case AlgorithmType::CompareHist:
|
||||
// break;
|
||||
@@ -373,7 +372,6 @@ void ProcessTask::exec_click_task(const Rect& matched_rect)
|
||||
m_control_ptr->click(matched_rect);
|
||||
}
|
||||
|
||||
|
||||
OcrAbstractTask::OcrAbstractTask(AsstCallback callback, void* callback_arg)
|
||||
: AbstractTask(callback, callback_arg)
|
||||
{
|
||||
@@ -695,5 +693,4 @@ bool TestOcrTask::run()
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,12 +22,12 @@ Updater& Updater::get_instance()
|
||||
|
||||
bool Updater::has_new_version()
|
||||
{
|
||||
auto && req_ret = request_github_api();
|
||||
auto&& req_ret = request_github_api();
|
||||
if (!req_ret) {
|
||||
DebugTraceInfo("Requeset Error");
|
||||
return false;
|
||||
}
|
||||
auto && parse_ret = json::parser::parse(req_ret.value());
|
||||
auto&& parse_ret = json::parser::parse(req_ret.value());
|
||||
if (!parse_ret) {
|
||||
DebugTraceInfo("Parse Error");
|
||||
return false;
|
||||
@@ -63,7 +63,7 @@ bool Updater::has_new_version()
|
||||
}
|
||||
}
|
||||
|
||||
const VersionInfo & Updater::get_version_info() const noexcept
|
||||
const VersionInfo& Updater::get_version_info() const noexcept
|
||||
{
|
||||
return m_lastest_version;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ std::optional<std::string> Updater::request_github_api()
|
||||
}
|
||||
std::string response;
|
||||
DWORD buff_size = 4096;
|
||||
char *buffer = new char[buff_size];
|
||||
char* buffer = new char[buff_size];
|
||||
DWORD number = 1;
|
||||
while (number > 0) {
|
||||
memset(buffer, 0, buff_size);
|
||||
|
||||
@@ -81,7 +81,6 @@ bool WinMacro::findHandle()
|
||||
}
|
||||
}
|
||||
if (m_is_adb && m_handle != NULL) {
|
||||
|
||||
DWORD pid = 0;
|
||||
::GetWindowThreadProcessId(m_handle, &pid);
|
||||
HANDLE handle = ::OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid);
|
||||
@@ -106,7 +105,7 @@ bool WinMacro::findHandle()
|
||||
auto&& display_ret = callCmd(adb_dir + m_emulator_info.adb.display);
|
||||
if (display_ret) {
|
||||
std::string pipe_str = display_ret.value();
|
||||
sscanf_s(pipe_str.c_str(), m_emulator_info.adb.display_regex.c_str(),
|
||||
sscanf_s(pipe_str.c_str(), m_emulator_info.adb.display_regex.c_str(),
|
||||
&m_emulator_info.adb.display_width, &m_emulator_info.adb.display_height);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<runtime>
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
<Application x:Class="MeoAsstGui.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:MeoAsstGui"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
<!--<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Blue.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Indigo.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Blue.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Indigo.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>-->
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
</Application>
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows;
|
||||
|
||||
namespace MeoAsstGui
|
||||
{
|
||||
@@ -14,4 +8,4 @@ namespace MeoAsstGui
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,26 @@
|
||||
<Window x:Class="MeoAsstGui.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:MeoAsstGui"
|
||||
mc:Ignorable="d"
|
||||
Title="Meo明日方舟辅助" Height="520" Width="410" Loaded="OnLoaded">
|
||||
<Grid>
|
||||
<CheckBox x:Name="checkBox_useMedicine" Content="吃理智药" HorizontalAlignment="Left" Margin="50,100,0,0" VerticalAlignment="Top" Checked="checkBox_useMedicine_Checked" Unchecked="checkBox_useMedicine_Checked" IsChecked="True"/>
|
||||
<CheckBox x:Name="checkBox_useStone" Content="吃石头" HorizontalAlignment="Left" Margin="50,150,0,0" VerticalAlignment="Top" Checked="checkBox_useStone_Checked" Unchecked="checkBox_useStone_Checked"/>
|
||||
<TextBox x:Name="textBox_useStone" HorizontalAlignment="Left" Height="23" Margin="112,148,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" Width="47" TextChanged="textBox_useStone_TextChanged" InputMethod.IsInputMethodEnabled="False"/>
|
||||
<Label x:Name="label_stoneNumber" Content="颗" HorizontalAlignment="Left" Margin="164,144,0,0" VerticalAlignment="Top" RenderTransformOrigin="-5.771,-6.291"/>
|
||||
<Button x:Name="button_startSanity" Content="开始刷理智" HorizontalAlignment="Left" Margin="50,300,0,0" VerticalAlignment="Top" Width="120" Height="50" Click="button_Click_startSanity"/>
|
||||
<Button x:Name="button_stop" Content="停止" HorizontalAlignment="Left" Margin="230,380,0,0" VerticalAlignment="Top" Width="120" Height="50" Click="button_Click_stop"/>
|
||||
<Label x:Name="catch_status" Content="" HorizontalAlignment="Left" Margin="50,30,0,0" VerticalAlignment="Top"/>
|
||||
<Button x:Name="button_visit" Content="访问基建" HorizontalAlignment="Left" Margin="230,300,0,0" VerticalAlignment="Top" Width="120" Height="50" Click="button_Click_visit"/>
|
||||
<Label x:Name="exec_times" Content="" HorizontalAlignment="Left" Margin="230,60,0,0" VerticalAlignment="Top"/>
|
||||
<Label x:Name="stone_times" Content="" HorizontalAlignment="Left" Margin="230,144,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.702,0.403"/>
|
||||
<CheckBox x:Name="checkBox_maxTimes" Content="指定次数" HorizontalAlignment="Left" Margin="50,200,0,0" VerticalAlignment="Top" Checked="checkBox_maxTimes_Checked" Unchecked="checkBox_maxTimes_Checked"/>
|
||||
<TextBox x:Name="textBox_maxTimes" HorizontalAlignment="Left" Height="23" Margin="124,198,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" Width="47" TextChanged="textBox_maxTimes_TextChanged" InputMethod.IsInputMethodEnabled="False"/>
|
||||
<Label x:Name="label" Content="次" HorizontalAlignment="Left" Margin="176,193,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.397,-0.745"/>
|
||||
<CheckBox x:Name="checkBox_shutdown" Content="刷完自动关机" HorizontalAlignment="Left" Margin="50,250,0,0" VerticalAlignment="Top"/>
|
||||
<Label x:Name="label_status" Content="" HorizontalAlignment="Left" Margin="230,30,0,0" VerticalAlignment="Top"/>
|
||||
<Button x:Name="button_recruit" Content="全自动公招" HorizontalAlignment="Left" Margin="50,380,0,0" VerticalAlignment="Top" Width="120" Height="50" Click="button_recruit_Click" RenderTransformOrigin="-0.598,0.641"/>
|
||||
<CheckBox x:Name="checkBox_useMedicine" Content="吃理智药" HorizontalAlignment="Left" Margin="50,100,0,0" VerticalAlignment="Top" Checked="checkBox_useMedicine_Checked" Unchecked="checkBox_useMedicine_Checked" IsChecked="True" />
|
||||
<CheckBox x:Name="checkBox_useStone" Content="吃石头" HorizontalAlignment="Left" Margin="50,150,0,0" VerticalAlignment="Top" Checked="checkBox_useStone_Checked" Unchecked="checkBox_useStone_Checked" />
|
||||
<TextBox x:Name="textBox_useStone" HorizontalAlignment="Left" Height="23" Margin="112,148,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" Width="47" TextChanged="textBox_useStone_TextChanged" InputMethod.IsInputMethodEnabled="False" />
|
||||
<Label x:Name="label_stoneNumber" Content="颗" HorizontalAlignment="Left" Margin="164,144,0,0" VerticalAlignment="Top" RenderTransformOrigin="-5.771,-6.291" />
|
||||
<Button x:Name="button_startSanity" Content="开始刷理智" HorizontalAlignment="Left" Margin="50,300,0,0" VerticalAlignment="Top" Width="120" Height="50" Click="button_Click_startSanity" />
|
||||
<Button x:Name="button_stop" Content="停止" HorizontalAlignment="Left" Margin="230,380,0,0" VerticalAlignment="Top" Width="120" Height="50" Click="button_Click_stop" />
|
||||
<Label x:Name="catch_status" Content="" HorizontalAlignment="Left" Margin="50,30,0,0" VerticalAlignment="Top" />
|
||||
<Button x:Name="button_visit" Content="访问基建" HorizontalAlignment="Left" Margin="230,300,0,0" VerticalAlignment="Top" Width="120" Height="50" Click="button_Click_visit" />
|
||||
<Label x:Name="exec_times" Content="" HorizontalAlignment="Left" Margin="230,60,0,0" VerticalAlignment="Top" />
|
||||
<Label x:Name="stone_times" Content="" HorizontalAlignment="Left" Margin="230,144,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.702,0.403" />
|
||||
<CheckBox x:Name="checkBox_maxTimes" Content="指定次数" HorizontalAlignment="Left" Margin="50,200,0,0" VerticalAlignment="Top" Checked="checkBox_maxTimes_Checked" Unchecked="checkBox_maxTimes_Checked" />
|
||||
<TextBox x:Name="textBox_maxTimes" HorizontalAlignment="Left" Height="23" Margin="124,198,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" Width="47" TextChanged="textBox_maxTimes_TextChanged" InputMethod.IsInputMethodEnabled="False" />
|
||||
<Label x:Name="label" Content="次" HorizontalAlignment="Left" Margin="176,193,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.397,-0.745" />
|
||||
<CheckBox x:Name="checkBox_shutdown" Content="刷完自动关机" HorizontalAlignment="Left" Margin="50,250,0,0" VerticalAlignment="Top" />
|
||||
<Label x:Name="label_status" Content="" HorizontalAlignment="Left" Margin="230,30,0,0" VerticalAlignment="Top" />
|
||||
<Button x:Name="button_recruit" Content="全自动公招" HorizontalAlignment="Left" Margin="50,380,0,0" VerticalAlignment="Top" Width="120" Height="50" Click="button_recruit_Click" RenderTransformOrigin="-0.598,0.641" />
|
||||
</Grid>
|
||||
</Window>
|
||||
</Window>
|
||||
@@ -1,22 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Threading;
|
||||
using System.Threading;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace MeoAsstGui
|
||||
{
|
||||
@@ -25,16 +13,22 @@ namespace MeoAsstGui
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
|
||||
[DllImport("MeoAssistance.dll")] static private extern IntPtr AsstCreate();
|
||||
|
||||
[DllImport("MeoAssistance.dll")] static private extern IntPtr AsstCreateEx(CallbackDelegate callback, IntPtr custom_arg);
|
||||
|
||||
[DllImport("MeoAssistance.dll")] static private extern void AsstDestory(IntPtr ptr);
|
||||
|
||||
[DllImport("MeoAssistance.dll")] static private extern bool AsstCatchEmulator(IntPtr ptr);
|
||||
|
||||
[DllImport("MeoAssistance.dll")] static private extern void AsstStart(IntPtr ptr, string task);
|
||||
|
||||
[DllImport("MeoAssistance.dll")] static private extern void AsstStop(IntPtr ptr);
|
||||
|
||||
[DllImport("MeoAssistance.dll")] static private extern bool AsstSetParam(IntPtr p_asst, string type, string param, string value);
|
||||
|
||||
private delegate void CallbackDelegate(int msg, IntPtr json_buffer, IntPtr custom_arg);
|
||||
|
||||
private delegate void ProcCallbckMsg(AsstMsg msg, JObject detail);
|
||||
|
||||
private static CallbackDelegate callback;
|
||||
@@ -82,6 +76,7 @@ namespace MeoAsstGui
|
||||
ProcCallbckMsg dlg = new ProcCallbckMsg(proc_msg);
|
||||
this.Dispatcher.Invoke(dlg, msg, json);
|
||||
}
|
||||
|
||||
private void proc_msg(AsstMsg msg, JObject detail)
|
||||
{
|
||||
switch (msg)
|
||||
@@ -100,6 +95,7 @@ namespace MeoAsstGui
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case AsstMsg.TaskStart:
|
||||
{
|
||||
string task_chain = detail["task_chain"].ToString();
|
||||
@@ -110,6 +106,7 @@ namespace MeoAsstGui
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case AsstMsg.TaskStop:
|
||||
{
|
||||
string task_chain = detail["task_chain"].ToString();
|
||||
@@ -130,14 +127,17 @@ namespace MeoAsstGui
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case AsstMsg.TextDetected:
|
||||
break;
|
||||
|
||||
case AsstMsg.RecruitTagsDetected:
|
||||
case AsstMsg.OcrResultError:
|
||||
case AsstMsg.RecruitSpecialTag:
|
||||
case AsstMsg.RecruitResult:
|
||||
recruitWindow.proc_msg(msg, detail);
|
||||
break;
|
||||
|
||||
case AsstMsg.TaskError:
|
||||
{
|
||||
string task_chain = detail["task_chain"].ToString();
|
||||
@@ -167,16 +167,19 @@ namespace MeoAsstGui
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case AsstMsg.InitFaild:
|
||||
MessageBox.Show("资源文件错误!请尝试重新解压或下载", "错误");
|
||||
Close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
~MainWindow()
|
||||
{
|
||||
AsstDestory(p_asst);
|
||||
@@ -288,4 +291,4 @@ namespace MeoAsstGui
|
||||
recruitWindow.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
@@ -30,7 +29,6 @@ using System.Windows;
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
|
||||
//(未在页面中找到资源时使用,
|
||||
@@ -40,8 +38,7 @@ using System.Windows;
|
||||
//、应用程序或任何主题专用资源字典中找到时使用)
|
||||
)]
|
||||
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
@@ -53,4 +50,4 @@ using System.Windows;
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: NeutralResourcesLanguage("zh")]
|
||||
[assembly: NeutralResourcesLanguage("zh")]
|
||||
@@ -7,14 +7,14 @@
|
||||
mc:Ignorable="d"
|
||||
Title="全自动公开招募计算器" Height="450" Width="800">
|
||||
<Grid>
|
||||
<Label x:Name="result" Content="" HorizontalAlignment="Left" Margin="30,40,-467.667,0" VerticalAlignment="Top" Height="240" Width="1231"/>
|
||||
<Button x:Name="button_start" Content="开始计算" HorizontalAlignment="Left" Margin="600,0,0,30" VerticalAlignment="Bottom" Width="150" Height="60" Click="button_start_Click"/>
|
||||
<CheckBox x:Name="checkBox_time" Content="自动设置时间" HorizontalAlignment="Left" Margin="30,0,0,80" VerticalAlignment="Bottom" IsChecked="True"/>
|
||||
<CheckBox x:Name="checkBox_level_3" Content="自动选择3星Tags" HorizontalAlignment="Left" Margin="150,0,0,120" VerticalAlignment="Bottom"/>
|
||||
<CheckBox x:Name="checkBox_level_4" Content="自动选择4星Tags" HorizontalAlignment="Left" Margin="150,0,0,90" VerticalAlignment="Bottom" IsChecked="True"/>
|
||||
<CheckBox x:Name="checkBox_level_5" Content="自动选择5星Tags" HorizontalAlignment="Left" Margin="150,0,0,60" VerticalAlignment="Bottom" IsChecked="True"/>
|
||||
<CheckBox x:Name="checkBox_level_6" Content="自动选择6星Tags" HorizontalAlignment="Left" Margin="150,0,0,30" VerticalAlignment="Bottom" IsChecked="True"/>
|
||||
<Label x:Name="prompt" Content="提示:本辅助仅会帮你选择最优Tags,
但是不会帮你点击确定按钮!!!
请自行检查辅助选择的是否正确,
若辅助出现识别错误,遗漏了高星干员,
作者概不负责哦__(:з」∠)_" HorizontalAlignment="Left" Margin="300,0,0,10" VerticalAlignment="Bottom" Height="121" Width="292" FontSize="16"/>
|
||||
<Label x:Name="info" Content="识别结果" HorizontalAlignment="Left" Margin="30,10,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.025,0.211" Height="30" Width="500"/>
|
||||
<Label x:Name="result" Content="" HorizontalAlignment="Left" Margin="30,40,-467.667,0" VerticalAlignment="Top" Height="240" Width="1231" />
|
||||
<Button x:Name="button_start" Content="开始计算" HorizontalAlignment="Left" Margin="600,0,0,30" VerticalAlignment="Bottom" Width="150" Height="60" Click="button_start_Click" />
|
||||
<CheckBox x:Name="checkBox_time" Content="自动设置时间" HorizontalAlignment="Left" Margin="30,0,0,80" VerticalAlignment="Bottom" IsChecked="True" />
|
||||
<CheckBox x:Name="checkBox_level_3" Content="自动选择3星Tags" HorizontalAlignment="Left" Margin="150,0,0,120" VerticalAlignment="Bottom" />
|
||||
<CheckBox x:Name="checkBox_level_4" Content="自动选择4星Tags" HorizontalAlignment="Left" Margin="150,0,0,90" VerticalAlignment="Bottom" IsChecked="True" />
|
||||
<CheckBox x:Name="checkBox_level_5" Content="自动选择5星Tags" HorizontalAlignment="Left" Margin="150,0,0,60" VerticalAlignment="Bottom" IsChecked="True" />
|
||||
<CheckBox x:Name="checkBox_level_6" Content="自动选择6星Tags" HorizontalAlignment="Left" Margin="150,0,0,30" VerticalAlignment="Bottom" IsChecked="True" />
|
||||
<Label x:Name="prompt" Content="提示:本辅助仅会帮你选择最优Tags,
但是不会帮你点击确定按钮!!!
请自行检查辅助选择的是否正确,
若辅助出现识别错误,遗漏了高星干员,
作者概不负责哦__(:з」∠)_" HorizontalAlignment="Left" Margin="300,0,0,10" VerticalAlignment="Bottom" Height="121" Width="292" FontSize="16" />
|
||||
<Label x:Name="info" Content="识别结果" HorizontalAlignment="Left" Margin="30,10,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.025,0.211" Height="30" Width="500" />
|
||||
</Grid>
|
||||
</Window>
|
||||
</Window>
|
||||
@@ -1,43 +1,37 @@
|
||||
using System;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using System.Runtime.InteropServices;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Windows;
|
||||
|
||||
namespace MeoAsstGui
|
||||
{
|
||||
using AsstMsg = MainWindow.AsstMsg;
|
||||
|
||||
/// <summary>
|
||||
/// RecruitWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class RecruitWindow : Window
|
||||
{
|
||||
[DllImport("MeoAssistance.dll")] static private extern bool AsstCatchEmulator(IntPtr ptr);
|
||||
|
||||
[DllImport("MeoAssistance.dll")] static private extern bool AsstRunOpenRecruit(IntPtr ptr, int[] required_level, bool set_time);
|
||||
|
||||
private IntPtr p_asst;
|
||||
|
||||
public RecruitWindow(IntPtr ptr)
|
||||
{
|
||||
InitializeComponent();
|
||||
p_asst = ptr;
|
||||
}
|
||||
|
||||
public void proc_msg(AsstMsg msg, JObject detail)
|
||||
{
|
||||
switch (msg)
|
||||
{
|
||||
case AsstMsg.TextDetected:
|
||||
break;
|
||||
|
||||
case AsstMsg.RecruitTagsDetected:
|
||||
JArray tags = (JArray)detail["tags"];
|
||||
string info_content = "识别结果: ";
|
||||
@@ -47,12 +41,15 @@ namespace MeoAsstGui
|
||||
}
|
||||
info.Content = info_content;
|
||||
break;
|
||||
|
||||
case AsstMsg.OcrResultError:
|
||||
info.Content = "识别错误!";
|
||||
break;
|
||||
|
||||
case AsstMsg.RecruitSpecialTag:
|
||||
MessageBox.Show("检测到特殊Tag:" + detail["tag"].ToString(), "提示");
|
||||
break;
|
||||
|
||||
case AsstMsg.RecruitResult:
|
||||
string result_content = "";
|
||||
JArray result_array = (JArray)detail["result"];
|
||||
@@ -117,4 +114,4 @@ namespace MeoAsstGui
|
||||
AsstRunOpenRecruit(p_asst, level_list.ToArray(), set_time);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,10 +7,9 @@
|
||||
mc:Ignorable="d"
|
||||
Title="有新版本" Height="500" Width="400">
|
||||
<Grid>
|
||||
<Label x:Name="label_tag" Content="" HorizontalAlignment="Center" Margin="10,25,10.333,0" VerticalAlignment="Top" Height="50" Width="373" FontSize="24"/>
|
||||
<Label x:Name="label_body" Content="" HorizontalAlignment="Left" Margin="50,80,-656.667,0" VerticalAlignment="Top" Height="281" Width="1000" FontSize="16"/>
|
||||
<Button x:Name="button_confirm" Content="前往下载" HorizontalAlignment="Left" Margin="50,366,0,0" VerticalAlignment="Top" Width="120" Height="60" Click="button_confirm_Click"/>
|
||||
<Button x:Name="button_cancer" Content="下次一定" HorizontalAlignment="Left" Margin="220,366,0,0" VerticalAlignment="Top" Width="120" Height="60" Click="button_cancer_Click"/>
|
||||
|
||||
<Label x:Name="label_tag" Content="" HorizontalAlignment="Center" Margin="10,25,10.333,0" VerticalAlignment="Top" Height="50" Width="373" FontSize="24" />
|
||||
<Label x:Name="label_body" Content="" HorizontalAlignment="Left" Margin="50,80,-656.667,0" VerticalAlignment="Top" Height="281" Width="1000" FontSize="16" />
|
||||
<Button x:Name="button_confirm" Content="前往下载" HorizontalAlignment="Left" Margin="50,366,0,0" VerticalAlignment="Top" Width="120" Height="60" Click="button_confirm_Click" />
|
||||
<Button x:Name="button_cancer" Content="下次一定" HorizontalAlignment="Left" Margin="220,366,0,0" VerticalAlignment="Top" Width="120" Height="60" Click="button_cancer_Click" />
|
||||
</Grid>
|
||||
</Window>
|
||||
</Window>
|
||||
@@ -1,17 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
|
||||
namespace MeoAsstGui
|
||||
{
|
||||
@@ -25,6 +15,7 @@ namespace MeoAsstGui
|
||||
[In, Out] StringBuilder tag, int tag_bufsize,
|
||||
[In, Out] StringBuilder html_url, int html_bufsize,
|
||||
[In, Out] StringBuilder body, int body_bufsize);
|
||||
|
||||
public UpdateDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -66,4 +57,4 @@ namespace MeoAsstGui
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
asst::Assistance * ptr = AsstCreate();
|
||||
asst::Assistance* ptr = AsstCreate();
|
||||
|
||||
auto ret = AsstCatchEmulator(ptr);
|
||||
if (!ret) {
|
||||
|
||||
@@ -19,7 +19,7 @@ int main(int argc, char** argv)
|
||||
|
||||
char ch = 0;
|
||||
while (ch != 'q') {
|
||||
AsstTestOcr(ptr, text_array, sizeof(text_array)/sizeof(char*), true);
|
||||
AsstTestOcr(ptr, text_array, sizeof(text_array) / sizeof(char*), true);
|
||||
ch = getchar();
|
||||
}
|
||||
|
||||
|
||||
@@ -204,7 +204,6 @@
|
||||
"tasks_Doc": "下面的和任务队列执行逻辑有关,不需要修改",
|
||||
"tasks": {
|
||||
"SanityBegin": {
|
||||
|
||||
"algorithm": "justreturn",
|
||||
"type": "doNothing",
|
||||
"next": [
|
||||
@@ -256,7 +255,7 @@
|
||||
]
|
||||
},
|
||||
"WaitAfterPRTS": {
|
||||
"rearDealy": 5000,
|
||||
"rearDelay": 5000,
|
||||
"algorithm": "justreturn",
|
||||
"type": "doNothing",
|
||||
"next": [
|
||||
@@ -372,7 +371,6 @@
|
||||
]
|
||||
},
|
||||
"VisitBegin": {
|
||||
|
||||
"algorithm": "justreturn",
|
||||
"type": "doNothing",
|
||||
"next": [
|
||||
@@ -412,6 +410,7 @@
|
||||
"StartToVisit": {
|
||||
"template": "StartToVisit.png",
|
||||
"type": "clickSelf",
|
||||
"rearDelay": 5000,
|
||||
"next": [
|
||||
"VisitNext"
|
||||
]
|
||||
@@ -419,7 +418,7 @@
|
||||
"VisitNext": {
|
||||
"template": "VisitNext.png",
|
||||
"type": "clickSelf",
|
||||
"maxTimes": 21,
|
||||
"rearDelay": 3000,
|
||||
"exceededNext": [
|
||||
"ReturnToMall"
|
||||
],
|
||||
@@ -434,8 +433,7 @@
|
||||
"algorithm": "OcrDetect",
|
||||
"text": [ "访问下位" ],
|
||||
"type": "clickSelf",
|
||||
"maxTimes": 21,
|
||||
"rearDealy": 3000,
|
||||
"rearDelay": 3000,
|
||||
"exceededNext": [
|
||||
"ReturnToMall"
|
||||
],
|
||||
@@ -449,6 +447,7 @@
|
||||
"ReturnToMall": {
|
||||
"template": "Return.png",
|
||||
"type": "clickSelf",
|
||||
"rearDelay": 5000,
|
||||
"next": [
|
||||
"Mall",
|
||||
"ReturnToMall",
|
||||
@@ -502,7 +501,6 @@
|
||||
]
|
||||
},
|
||||
"Stop": {
|
||||
|
||||
"algorithm": "justreturn",
|
||||
"type": "stop",
|
||||
"next": []
|
||||
|
||||
Reference in New Issue
Block a user