mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 02:10:21 +08:00
fix.修复作业没有actions字段时的崩溃问题
https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/692 https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/685
This commit is contained in:
@@ -36,5 +36,9 @@ bool asst::AbstractConfiger::load(const std::string& filename)
|
||||
m_last_error = std::string("json field error ") + e.what();
|
||||
return false;
|
||||
}
|
||||
catch (std::exception& e) {
|
||||
m_last_error = std::string("json field error ") + e.what();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace MeoAsstGui
|
||||
//LogItemViewModels.Insert(0, new LogItemViewModel(time + content, color, weight));
|
||||
}
|
||||
|
||||
public void AddLogWithUrl(string content,string url, string color = "Gray", string weight = "Regular")
|
||||
public void AddLogWithUrl(string content, string url, string color = "Gray", string weight = "Regular")
|
||||
{
|
||||
LogItemViewModels.Add(new LogItemViewModel(content, color, weight));
|
||||
//LogItemViewModels.Insert(0, new LogItemViewModel(time + content, color, weight));
|
||||
@@ -232,9 +232,16 @@ namespace MeoAsstGui
|
||||
|
||||
const string _newfilename = "resource/_temp_copilot.json";
|
||||
File.WriteAllText(_newfilename, data.ToString());
|
||||
asstProxy.AsstStartCopilot(data["stage_name"].ToString(), _newfilename, Form);
|
||||
Idle = false;
|
||||
AddLog("Star Burst Stream!");
|
||||
bool ret = asstProxy.AsstStartCopilot(data["stage_name"].ToString(), _newfilename, Form);
|
||||
if (ret)
|
||||
{
|
||||
Idle = false;
|
||||
AddLog("Star Burst Stream!");
|
||||
}
|
||||
else
|
||||
{
|
||||
AddLog("读取 JSON 作业文件出错\n请检查文件内容", "darkred");
|
||||
}
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
|
||||
Reference in New Issue
Block a user