mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	ENH:show default ip address and access code when user enter
Change-Id: Idbe3af1fd13dfe34634b5c7fa2f7ca8791b3e10a
This commit is contained in:
		
							parent
							
								
									8ab190da48
								
							
						
					
					
						commit
						6e41067bbb
					
				
					 3 changed files with 5 additions and 5 deletions
				
			
		|  | @ -4565,7 +4565,7 @@ bool  GUI_App::show_ip_address_enter_dialog() | ||||||
|     if (!dev) return false; |     if (!dev) return false; | ||||||
|     if (!dev->get_selected_machine()) return false; |     if (!dev->get_selected_machine()) return false; | ||||||
|     auto obj = dev->get_selected_machine(); |     auto obj = dev->get_selected_machine(); | ||||||
|     InputIpAddressDialog dlg(nullptr, from_u8(dev->get_selected_machine()->dev_name)); |     InputIpAddressDialog dlg(nullptr, from_u8(dev->get_selected_machine()->dev_name), dev->get_selected_machine()->dev_ip, dev->get_selected_machine()->access_code); | ||||||
|     dlg.Bind(EVT_ENTER_IP_ADDRESS, [this, obj](wxCommandEvent& e) { |     dlg.Bind(EVT_ENTER_IP_ADDRESS, [this, obj](wxCommandEvent& e) { | ||||||
|         auto selection_data_arr = wxSplit(e.GetString().ToStdString(), '|'); |         auto selection_data_arr = wxSplit(e.GetString().ToStdString(), '|'); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -422,7 +422,7 @@ void DownloadDialog::SetExtendedMessage(const wxString &extendedMessage) | ||||||
|     Fit(); |     Fit(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| InputIpAddressDialog::InputIpAddressDialog(wxWindow* parent, wxString name) | InputIpAddressDialog::InputIpAddressDialog(wxWindow* parent, wxString name, wxString ip, wxString access_code) | ||||||
|     :DPIDialog(static_cast<wxWindow*>(wxGetApp().mainframe), wxID_ANY, _L("Unable to connect printer"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX) |     :DPIDialog(static_cast<wxWindow*>(wxGetApp().mainframe), wxID_ANY, _L("Unable to connect printer"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX) | ||||||
| { | { | ||||||
|     std::string icon_path = (boost::format("%1%/images/BambuStudioTitle.ico") % resources_dir()).str(); |     std::string icon_path = (boost::format("%1%/images/BambuStudioTitle.ico") % resources_dir()).str(); | ||||||
|  | @ -448,13 +448,13 @@ InputIpAddressDialog::InputIpAddressDialog(wxWindow* parent, wxString name) | ||||||
|     tip->Wrap(FromDIP(420)); |     tip->Wrap(FromDIP(420)); | ||||||
| 
 | 
 | ||||||
|     m_tips_ip = new Label(this, _L("IP")); |     m_tips_ip = new Label(this, _L("IP")); | ||||||
|     m_input_ip = new TextInput(this, wxEmptyString, wxEmptyString); |     m_input_ip = new TextInput(this, ip, wxEmptyString); | ||||||
|     m_input_ip->Bind(wxEVT_TEXT, &InputIpAddressDialog::on_text, this); |     m_input_ip->Bind(wxEVT_TEXT, &InputIpAddressDialog::on_text, this); | ||||||
|     m_input_ip->SetMinSize(wxSize(FromDIP(420), FromDIP(28))); |     m_input_ip->SetMinSize(wxSize(FromDIP(420), FromDIP(28))); | ||||||
|     m_input_ip->SetMaxSize(wxSize(FromDIP(420), FromDIP(28))); |     m_input_ip->SetMaxSize(wxSize(FromDIP(420), FromDIP(28))); | ||||||
| 
 | 
 | ||||||
|     m_tips_access_code = new Label(this, _L("Access Code")); |     m_tips_access_code = new Label(this, _L("Access Code")); | ||||||
|     m_input_access_code = new TextInput(this, wxEmptyString, wxEmptyString); |     m_input_access_code = new TextInput(this, access_code, wxEmptyString); | ||||||
|     m_input_access_code->Bind(wxEVT_TEXT, &InputIpAddressDialog::on_text, this); |     m_input_access_code->Bind(wxEVT_TEXT, &InputIpAddressDialog::on_text, this); | ||||||
|     m_input_access_code->SetMinSize(wxSize(FromDIP(420), FromDIP(28))); |     m_input_access_code->SetMinSize(wxSize(FromDIP(420), FromDIP(28))); | ||||||
|     m_input_access_code->SetMaxSize(wxSize(FromDIP(420), FromDIP(28))); |     m_input_access_code->SetMaxSize(wxSize(FromDIP(420), FromDIP(28))); | ||||||
|  |  | ||||||
|  | @ -378,7 +378,7 @@ public: | ||||||
| 	wxString comfirm_after_enter_text; | 	wxString comfirm_after_enter_text; | ||||||
| 	std::string m_ip; | 	std::string m_ip; | ||||||
| 	Label* tip{nullptr}; | 	Label* tip{nullptr}; | ||||||
|     InputIpAddressDialog(wxWindow* parent = nullptr, wxString name = wxEmptyString); |     InputIpAddressDialog(wxWindow* parent = nullptr, wxString name = wxEmptyString,  wxString id = wxEmptyString, wxString access_code = wxEmptyString); | ||||||
| 	~InputIpAddressDialog(); | 	~InputIpAddressDialog(); | ||||||
| 
 | 
 | ||||||
| 	Button* m_button_ok{nullptr}; | 	Button* m_button_ok{nullptr}; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 tao wang
						tao wang