diff --git a/examples/proto_debuger/udp_form.cpp b/examples/proto_debuger/udp_form.cpp new file mode 100644 index 00000000..90c859ba --- /dev/null +++ b/examples/proto_debuger/udp_form.cpp @@ -0,0 +1,9 @@ +#include "udp_form.h" + +void UdpForm::ShowDataInEdit(const char*) +{ +} + +void UdpForm::HandleMessage(ui::EventArgs& msg) +{ +} diff --git a/examples/proto_debuger/udp_form.h b/examples/proto_debuger/udp_form.h new file mode 100644 index 00000000..e3bc21a2 --- /dev/null +++ b/examples/proto_debuger/udp_form.h @@ -0,0 +1,63 @@ +#pragma once + +#include +#include "msgdef.h" + +// C runtime header +#include +#include +#include +#include + +// base header +#include "base/base.h" +#include "serial_port.h" +// duilib +#include "duilib/UIlib.h" +#include "tcp_client.h" + +#include "lua_wraper.h" +#include "global.h" +#include + +#include + +class UdpForm : + public ui::ChildBox, + public TcpClientLibevent::TcpClientObserver +{ + +public: + UdpForm(ui::Window* hwnd, string url, uint32_t port, TcpClientLibevent* p); + ~UdpForm(); + virtual void Init() override; + TcpClientLibevent* ClientEvent(); + LuaDelegate* LuaVM(); + +protected: + void ShowDataInEdit(const char*) ; + +private: + ui::Label* m_label_1; + ui::RichEdit* m_rich_edit_1; + ui::RichEdit* m_rich_edit_2; + ui::RichEdit* m_uart_send_edit; + ui::Button* m_btn_send_data; + ui::Button* m_btn_save_lua; + ui::CheckBox* m_check_box_1; + ui::CheckBox* m_check_box_2; + ui::CheckBox* m_check_box_3; + ui::CheckBox* m_check_box_4; + TcpClientLibevent* mClient; + std::fstream mLuaFileRead; + std::ofstream mLuaFileEdit; + + virtual void HandleMessage(ui::EventArgs& msg); + std::string mLuaScript; + std::string m_url; + int m_port; + bool m_connected; + LuaDelegate* mLua; + +}; +