ENH:display error msg when connecting to the printer fails

Change-Id: I483d6c00bdd623e34bce5b087bfbcb9a5e876fa3
This commit is contained in:
tao wang 2023-05-22 15:07:33 +08:00 committed by Lane.Wei
parent 4fd8a2b957
commit 6f2839b641
25 changed files with 378 additions and 127 deletions

View file

@ -1934,6 +1934,10 @@ void GUI_App::init_networking_callbacks()
event.SetInt(1);
event.SetString(obj->dev_id);
}
else if(msg == "5") {
event.SetInt(5);
event.SetString(obj->dev_id);
}
else {
event.SetInt(-2);
event.SetString(obj->dev_id);
@ -3243,6 +3247,33 @@ void GUI_App::set_side_menu_popup_status(bool status)
m_side_popup_status = status;
}
void GUI_App::link_to_network_check()
{
std::string url;
std::string country_code = app_config->get_country_code();
if (country_code == "US") {
url = "https://status.bambulab.com";
}
else if (country_code == "CN") {
url = "https://status.bambulab.cn";
}
else if (country_code == "ENV_CN_DEV") {
url = "https://status.bambu-lab.com";
}
else if (country_code == "ENV_CN_QA") {
url = "https://status.bambu-lab.com";
}
else if (country_code == "ENV_CN_PRE") {
url = "https://status.bambu-lab.com";
}
else {
url = "https://status.bambu-lab.com";
}
wxLaunchDefaultBrowser(url);
}
bool GUI_App::tabs_as_menu() const
{
return false;