界面导出按钮修改

This commit is contained in:
cjw 2025-01-02 17:11:26 +08:00
parent 66148de58e
commit d06c2e6d54
1 changed files with 31 additions and 29 deletions

View File

@ -950,7 +950,7 @@ void MainFrame::update_title()
void MainFrame::show_publish_button(bool show)
{
m_publish_btn->Show(show);
//m_publish_btn->Show(show);
Layout();
}
@ -1651,19 +1651,19 @@ wxBoxSizer* MainFrame::create_side_tools()
m_slice_option_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& event)
{
SidePopup* p = new SidePopup(this);
SideButton* slice_all_btn = new SideButton(p, _L("Slice all"), "");
slice_all_btn->SetCornerRadius(0);
//SideButton* slice_all_btn = new SideButton(p, _L("Slice all"), "");
//slice_all_btn->SetCornerRadius(0);
SideButton* slice_plate_btn = new SideButton(p, _L("Slice plate"), "");
slice_plate_btn->SetCornerRadius(0);
slice_all_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
/* slice_all_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
m_slice_btn->SetLabel(_L("Slice all"));
m_slice_select = eSliceAll;
m_slice_enable = get_enable_slice_status();
m_slice_btn->Enable(m_slice_enable);
this->Layout();
p->Dismiss();
});
});*/
slice_plate_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
m_slice_btn->SetLabel(_L("Slice plate"));
@ -1673,7 +1673,8 @@ wxBoxSizer* MainFrame::create_side_tools()
this->Layout();
p->Dismiss();
});
p->append_button(slice_all_btn);
//xiamian-
//p->append_button(slice_all_btn);
p->append_button(slice_plate_btn);
p->Popup(m_slice_btn);
}
@ -1727,28 +1728,29 @@ wxBoxSizer* MainFrame::create_side_tools()
}
else {
//Bambu Studio Buttons
SideButton* print_plate_btn = new SideButton(p, _L("Print plate"), "");
print_plate_btn->SetCornerRadius(0);
//xiamian-
//SideButton* print_plate_btn = new SideButton(p, _L("Print plate"), "");
//print_plate_btn->SetCornerRadius(0);
SideButton* send_to_printer_btn = new SideButton(p, _L("Send"), "");
send_to_printer_btn->SetCornerRadius(0);
//SideButton* send_to_printer_btn = new SideButton(p, _L("Send"), "");
//send_to_printer_btn->SetCornerRadius(0);
SideButton* export_sliced_file_btn = new SideButton(p, _L("Export plate sliced file"), "");
export_sliced_file_btn->SetCornerRadius(0);
SideButton* export_all_sliced_file_btn = new SideButton(p, _L("Export all sliced file"), "");
export_all_sliced_file_btn->SetCornerRadius(0);
/* SideButton* export_all_sliced_file_btn = new SideButton(p, _L("Export all sliced file"), "");
export_all_sliced_file_btn->SetCornerRadius(0);*/
print_plate_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
/* print_plate_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
m_print_btn->SetLabel(_L("Print plate"));
m_print_select = ePrintPlate;
m_print_enable = get_enable_print_status();
m_print_btn->Enable(m_print_enable);
this->Layout();
p->Dismiss();
});
});*/
SideButton* print_all_btn = new SideButton(p, _L("Print all"), "");
/* SideButton* print_all_btn = new SideButton(p, _L("Print all"), "");
print_all_btn->SetCornerRadius(0);
print_all_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
m_print_btn->SetLabel(_L("Print all"));
@ -1757,18 +1759,18 @@ wxBoxSizer* MainFrame::create_side_tools()
m_print_btn->Enable(m_print_enable);
this->Layout();
p->Dismiss();
});
});*/
send_to_printer_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
/* send_to_printer_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
m_print_btn->SetLabel(_L("Send"));
m_print_select = eSendToPrinter;
m_print_enable = get_enable_print_status();
m_print_btn->Enable(m_print_enable);
this->Layout();
p->Dismiss();
});
});*/
SideButton* send_to_printer_all_btn = new SideButton(p, _L("Send all"), "");
/* SideButton* send_to_printer_all_btn = new SideButton(p, _L("Send all"), "");
send_to_printer_all_btn->SetCornerRadius(0);
send_to_printer_all_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
m_print_btn->SetLabel(_L("Send all"));
@ -1777,7 +1779,7 @@ wxBoxSizer* MainFrame::create_side_tools()
m_print_btn->Enable(m_print_enable);
this->Layout();
p->Dismiss();
});
});*/
export_sliced_file_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
m_print_btn->SetLabel(_L("Export plate sliced file"));
@ -1788,22 +1790,22 @@ wxBoxSizer* MainFrame::create_side_tools()
p->Dismiss();
});
export_all_sliced_file_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
/* export_all_sliced_file_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
m_print_btn->SetLabel(_L("Export all sliced file"));
m_print_select = eExportAllSlicedFile;
m_print_enable = get_enable_print_status();
m_print_btn->Enable(m_print_enable);
this->Layout();
p->Dismiss();
});
});*/
p->append_button(print_plate_btn);
p->append_button(print_all_btn);
p->append_button(send_to_printer_btn);
p->append_button(send_to_printer_all_btn);
//p->append_button(print_plate_btn);
//p->append_button(print_all_btn);
//p->append_button(send_to_printer_btn);
//p->append_button(send_to_printer_all_btn);
p->append_button(export_sliced_file_btn);
p->append_button(export_all_sliced_file_btn);
if (enable_multi_machine) {
//p->append_button(export_all_sliced_file_btn);
/*if (enable_multi_machine) {
SideButton* print_multi_machine_btn = new SideButton(p, _L("Send to Multi-device"), "");
print_multi_machine_btn->SetCornerRadius(0);
print_multi_machine_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
@ -1815,7 +1817,7 @@ wxBoxSizer* MainFrame::create_side_tools()
p->Dismiss();
});
p->append_button(print_multi_machine_btn);
}
}*/
}
p->Popup(m_print_btn);