NEW:hide the entrance of filaments backup

Change-Id: I383de6ced5efb20a19ca8171f981370bf8fcc3aa
This commit is contained in:
tao wang 2023-04-11 14:54:59 +08:00 committed by Lane.Wei
parent 2ce436d773
commit 5e6cfb069a
6 changed files with 33 additions and 10 deletions

View file

@ -1817,25 +1817,30 @@ AMSControl::AMSControl(wxWindow *parent, wxWindowID id, const wxPoint &pos, cons
//backup tips
#ifdef FILAMENT_BACKUP
auto m_ams_backup_tip = new Label(m_amswin, _L("Ams filament backup"));
m_ams_backup_tip->SetFont(::Label::Head_12);
m_ams_backup_tip->SetForegroundColour(wxColour(0x00AE42));
m_ams_backup_tip->SetBackgroundColour(*wxWHITE);
auto img_ams_backup = new wxStaticBitmap(m_amswin, wxID_ANY, create_scaled_bitmap("automatic_material_renewal", this, 16), wxDefaultPosition, wxSize(FromDIP(16), FromDIP(16)), 0);
img_ams_backup->SetBackgroundColour(*wxWHITE);
auto m_img_ams_backup = new wxStaticBitmap(m_amswin, wxID_ANY, create_scaled_bitmap("automatic_material_renewal", this, 16), wxDefaultPosition, wxSize(FromDIP(16), FromDIP(16)), 0);
m_img_ams_backup->SetBackgroundColour(*wxWHITE);
m_sizer_ams_tips->Add( 0, 0, 1, wxEXPAND, 0 );
m_sizer_ams_tips->Add(img_ams_backup, 0, wxALL, FromDIP(3));
m_sizer_ams_tips->Add(0, 0, 1, wxEXPAND, 0);
m_sizer_ams_tips->Add(m_img_ams_backup, 0, wxALL, FromDIP(3));
m_sizer_ams_tips->Add(m_ams_backup_tip, 0, wxTOP, FromDIP(5));
m_ams_backup_tip->Bind(wxEVT_ENTER_WINDOW, [this, img_amsmapping_tip](auto& e) {SetCursor(wxCURSOR_HAND);});
img_ams_backup->Bind(wxEVT_ENTER_WINDOW, [this, img_amsmapping_tip](auto& e) {SetCursor(wxCURSOR_HAND);});
m_ams_backup_tip->Bind(wxEVT_ENTER_WINDOW, [this, img_amsmapping_tip](auto& e) {SetCursor(wxCURSOR_HAND); });
m_img_ams_backup->Bind(wxEVT_ENTER_WINDOW, [this, img_amsmapping_tip](auto& e) {SetCursor(wxCURSOR_HAND); });
m_ams_backup_tip->Bind(wxEVT_LEAVE_WINDOW, [this](auto& e) {SetCursor(wxCURSOR_ARROW);});
img_ams_backup->Bind(wxEVT_LEAVE_WINDOW, [this](auto& e) {SetCursor(wxCURSOR_ARROW);});
m_ams_backup_tip->Bind(wxEVT_LEAVE_WINDOW, [this](auto& e) {SetCursor(wxCURSOR_ARROW); });
m_img_ams_backup->Bind(wxEVT_LEAVE_WINDOW, [this](auto& e) {SetCursor(wxCURSOR_ARROW); });
m_ams_backup_tip->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {post_event(SimpleEvent(EVT_AMS_FILAMENT_BACKUP));});
img_ams_backup->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {post_event(SimpleEvent(EVT_AMS_FILAMENT_BACKUP));});
m_ams_backup_tip->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {post_event(SimpleEvent(EVT_AMS_FILAMENT_BACKUP)); });
m_img_ams_backup->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {post_event(SimpleEvent(EVT_AMS_FILAMENT_BACKUP)); });
#endif // FILAMENT_BACKUP
//ams cans
@ -2578,6 +2583,10 @@ void AMSControl::update_vams_kn_value(AmsTray tray, MachineObject* obj)
m_vams_lib->Refresh();
}
void AMSControl::show_filament_backup(bool show)
{
}
void AMSControl::reset_vams()
{
m_vams_lib->m_info.k = 0;