#include "tcp_client_form.h" #include "utils.h" TcpClientForm::TcpClientForm(ui::Window* hwnd,std::string url, uint32_t port, TcpClientLibevent* p) { mClient = p; if (nullptr != hwnd) { this->SetWindow(hwnd, nullptr, false); } m_url = url; m_port = port; } void TcpClientForm::Init() { ui::ChildBox::Init(); m_label_1 = dynamic_cast(FindSubControl(L"uart_info_label")); m_rich_edit_1 = dynamic_cast(FindSubControl(L"uart_recv_eidt")); m_rich_edit_2 = dynamic_cast(FindSubControl(L"lua_script")); m_rich_edit_3 = dynamic_cast(FindSubControl(L"uart_send_edit")); m_button_1 = dynamic_cast(FindSubControl(L"btn_send_data")); m_check_box_1 = dynamic_cast(FindSubControl(L"check_new_line")); m_check_box_2 = dynamic_cast(FindSubControl(L"check_time_send")); m_check_box_3 = dynamic_cast(FindSubControl(L"check_hex_send")); m_check_box_4 = dynamic_cast(FindSubControl(L"check_hex_recv")); wchar_t p[100] = { 0 }; wsprintf(p, L"µØÖ·%s,¶Ë¿ÚºÅ%d ", string2wstring(m_url).c_str(),m_port); m_label_1->SetText(std::wstring(p)); } void TcpClientForm::HandleMessage(ui::EventArgs& msg) { }