diff --git a/src/slic3r/GUI/SelectMachine.hpp b/src/slic3r/GUI/SelectMachine.hpp index 3852156f4..ed02dbf33 100644 --- a/src/slic3r/GUI/SelectMachine.hpp +++ b/src/slic3r/GUI/SelectMachine.hpp @@ -310,7 +310,7 @@ private: int m_print_plate_idx{0}; int m_print_plate_total{0}; int m_timeout_count{0}; - int m_print_error_code; + int m_print_error_code{0}; bool m_is_in_sending_mode{ false }; bool m_ams_mapping_res{ false }; bool m_ams_mapping_valid{ false }; diff --git a/src/slic3r/GUI/SendToPrinter.hpp b/src/slic3r/GUI/SendToPrinter.hpp index d048caa29..16a545ed1 100644 --- a/src/slic3r/GUI/SendToPrinter.hpp +++ b/src/slic3r/GUI/SendToPrinter.hpp @@ -45,83 +45,83 @@ namespace GUI { class SendToPrinterDialog : public DPIDialog { private: - void init_bind(); - void init_timer(); + void init_bind(); + void init_timer(); - int m_print_plate_idx; - int m_current_filament_id; - int m_print_error_code; - int timeout_count = 0; - bool m_is_in_sending_mode{ false }; - bool m_is_rename_mode{ false }; - bool enable_prepare_mode{ true }; - bool m_need_adaptation_screen{ false }; - bool m_export_3mf_cancel{ false }; - bool m_is_canceled{ false }; + int m_print_plate_idx; + int m_current_filament_id; + int m_print_error_code = 0; + int timeout_count = 0; + bool m_is_in_sending_mode{ false }; + bool m_is_rename_mode{ false }; + bool enable_prepare_mode{ true }; + bool m_need_adaptation_screen{ false }; + bool m_export_3mf_cancel{ false }; + bool m_is_canceled{ false }; std::string m_print_error_msg; std::string m_print_error_extra; - std::string m_print_info; - std::string m_printer_last_select; - wxString m_current_project_name; + std::string m_print_info; + std::string m_printer_last_select; + wxString m_current_project_name; - TextInput* m_rename_input{ nullptr }; - wxSimplebook* m_rename_switch_panel{ nullptr }; - Plater* m_plater{ nullptr }; - wxStaticBitmap* m_staticbitmap{ nullptr }; - ThumbnailPanel* m_thumbnailPanel{ nullptr }; - ComboBox* m_comboBox_printer{ nullptr }; - ComboBox* m_comboBox_bed{ nullptr }; - Button* m_rename_button{ nullptr }; - Button* m_button_refresh{ nullptr }; - Button* m_button_ensure{ nullptr }; - wxPanel* m_scrollable_region; - wxPanel* m_line_schedule{ nullptr }; - wxPanel* m_panel_sending{ nullptr }; - wxPanel* m_panel_prepare{ nullptr }; - wxPanel* m_panel_finish{ nullptr }; - wxPanel* m_line_top{ nullptr }; - wxPanel* m_panel_image{ nullptr }; - wxPanel* m_rename_normal_panel{ nullptr }; - wxPanel* m_line_materia{ nullptr }; - wxSimplebook* m_simplebook{ nullptr }; - wxStaticText* m_statictext_finish{ nullptr }; - wxStaticText* m_stext_sending{ nullptr }; - wxStaticText* m_staticText_bed_title{ nullptr }; - wxStaticText* m_statictext_printer_msg{ nullptr }; - wxStaticText* m_stext_printer_title{ nullptr }; - wxStaticText* m_rename_text{ nullptr }; - wxStaticText* m_stext_time{ nullptr }; - wxStaticText* m_stext_weight{ nullptr }; + TextInput* m_rename_input{ nullptr }; + wxSimplebook* m_rename_switch_panel{ nullptr }; + Plater* m_plater{ nullptr }; + wxStaticBitmap* m_staticbitmap{ nullptr }; + ThumbnailPanel* m_thumbnailPanel{ nullptr }; + ComboBox* m_comboBox_printer{ nullptr }; + ComboBox* m_comboBox_bed{ nullptr }; + Button* m_rename_button{ nullptr }; + Button* m_button_refresh{ nullptr }; + Button* m_button_ensure{ nullptr }; + wxPanel* m_scrollable_region; + wxPanel* m_line_schedule{ nullptr }; + wxPanel* m_panel_sending{ nullptr }; + wxPanel* m_panel_prepare{ nullptr }; + wxPanel* m_panel_finish{ nullptr }; + wxPanel* m_line_top{ nullptr }; + wxPanel* m_panel_image{ nullptr }; + wxPanel* m_rename_normal_panel{ nullptr }; + wxPanel* m_line_materia{ nullptr }; + wxSimplebook* m_simplebook{ nullptr }; + wxStaticText* m_statictext_finish{ nullptr }; + wxStaticText* m_stext_sending{ nullptr }; + wxStaticText* m_staticText_bed_title{ nullptr }; + wxStaticText* m_statictext_printer_msg{ nullptr }; + wxStaticText* m_stext_printer_title{ nullptr }; + wxStaticText* m_rename_text{ nullptr }; + wxStaticText* m_stext_time{ nullptr }; + wxStaticText* m_stext_weight{ nullptr }; Label* m_st_txt_error_code{ nullptr }; Label* m_st_txt_error_desc{ nullptr }; Label* m_st_txt_extra_info{ nullptr }; wxHyperlinkCtrl* m_link_network_state{ nullptr }; - StateColor btn_bg_enable; - wxBoxSizer* rename_sizer_v{ nullptr }; - wxBoxSizer* rename_sizer_h{ nullptr }; - wxBoxSizer* sizer_thumbnail; - wxBoxSizer* m_sizer_scrollable_region; - wxBoxSizer* m_sizer_main; - wxStaticText* m_file_name; - PrintDialogStatus m_print_status{ PrintStatusInit }; + StateColor btn_bg_enable; + wxBoxSizer* rename_sizer_v{ nullptr }; + wxBoxSizer* rename_sizer_h{ nullptr }; + wxBoxSizer* sizer_thumbnail; + wxBoxSizer* m_sizer_scrollable_region; + wxBoxSizer* m_sizer_main; + wxStaticText* m_file_name; + PrintDialogStatus m_print_status{ PrintStatusInit }; - std::shared_ptr m_send_job{nullptr}; + std::shared_ptr m_send_job{nullptr}; std::vector m_bedtype_list; - std::map m_checkbox_list; - std::vector m_list; - wxColour m_colour_def_color{ wxColour(255, 255, 255) }; - wxColour m_colour_bold_color{ wxColour(38, 46, 48) }; - wxTimer* m_refresh_timer{ nullptr }; + std::map m_checkbox_list; + std::vector m_list; + wxColour m_colour_def_color{ wxColour(255, 255, 255) }; + wxColour m_colour_bold_color{ wxColour(38, 46, 48) }; + wxTimer* m_refresh_timer{ nullptr }; std::shared_ptr m_status_bar; - wxScrolledWindow* m_sw_print_failed_info{nullptr}; + wxScrolledWindow* m_sw_print_failed_info{nullptr}; std::shared_ptr m_token = std::make_shared(0); public: - SendToPrinterDialog(Plater* plater = nullptr); + SendToPrinterDialog(Plater* plater = nullptr); ~SendToPrinterDialog(); - bool Show(bool show); - bool is_timeout(); + bool Show(bool show); + bool is_timeout(); void on_rename_click(wxCommandEvent& event); void on_rename_enter(); void stripWhiteSpace(std::string& str); @@ -136,25 +136,25 @@ public: void check_fcous_state(wxWindow* window); void update_priner_status_msg(wxString msg, bool is_warning = false); void update_print_status_msg(wxString msg, bool is_warning = false, bool is_printer = true); - void update_printer_combobox(wxCommandEvent& event); - void on_cancel(wxCloseEvent& event); - void on_ok(wxCommandEvent& event); - void clear_ip_address_config(wxCommandEvent& e); - void on_refresh(wxCommandEvent& event); - void on_print_job_cancel(wxCommandEvent& evt); - void set_default(); - void on_timer(wxTimerEvent& event); - void on_selection_changed(wxCommandEvent& event); - void Enable_Refresh_Button(bool en); - void show_status(PrintDialogStatus status, std::vector params = std::vector()); - void Enable_Send_Button(bool en); - void on_dpi_changed(const wxRect& suggested_rect) override; + void update_printer_combobox(wxCommandEvent& event); + void on_cancel(wxCloseEvent& event); + void on_ok(wxCommandEvent& event); + void clear_ip_address_config(wxCommandEvent& e); + void on_refresh(wxCommandEvent& event); + void on_print_job_cancel(wxCommandEvent& evt); + void set_default(); + void on_timer(wxTimerEvent& event); + void on_selection_changed(wxCommandEvent& event); + void Enable_Refresh_Button(bool en); + void show_status(PrintDialogStatus status, std::vector params = std::vector()); + void Enable_Send_Button(bool en); + void on_dpi_changed(const wxRect& suggested_rect) override; void update_user_machine_list(); void show_print_failed_info(bool show, int code = 0, wxString description = wxEmptyString, wxString extra = wxEmptyString); void update_print_error_info(int code, std::string msg, std::string extra); void on_change_color_mode() { wxGetApp().UpdateDlgDarkUI(this); } wxString format_text(wxString& m_msg); - std::vector sort_string(std::vector strArray); + std::vector sort_string(std::vector strArray); }; wxDECLARE_EVENT(EVT_CLEAR_IPADDRESS, wxCommandEvent);