MistEO
2022-06-03 01:12:12 +08:00
parent f31fac0b35
commit 886ff3af9b
2 changed files with 15 additions and 4 deletions

View File

@@ -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;
}

View File

@@ -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()