完善逻辑,所有界面的关闭按钮
This commit is contained in:
parent
157ad2dae7
commit
4667077c30
30
examples/Debug/resources/themes/default/basic/basic.xml
Normal file
30
examples/Debug/resources/themes/default/basic/basic.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Window size="1280,1024" sizebox="2,2,2,2" caption="0,0,0,35" mininfo="800,600">
|
||||||
|
<VBox bkcolor="bk_wnd_darkcolor">
|
||||||
|
<!-- 标题栏 -->
|
||||||
|
<HBox width="stretch" height="40" bkcolor="bk_wnd_lightcolor">
|
||||||
|
<Control margin="60,0,0,0" />
|
||||||
|
<Label name="title" text="协议调试器" align="left" height="40" font="title"/>
|
||||||
|
<Control />
|
||||||
|
<Button class="btn_wnd_min" name="minbtn" margin="4,6,0,0"/>
|
||||||
|
<Box width="30" margin="4,6,0,0">
|
||||||
|
<Button class="btn_wnd_max" name="maxbtn"/>
|
||||||
|
<Button class="btn_wnd_restore" name="restorebtn" visible="false"/>
|
||||||
|
</Box>
|
||||||
|
<Button class="btn_wnd_close" name="closebtn" margin="4,6,8,0"/>
|
||||||
|
</HBox>
|
||||||
|
<!-- 侧边栏 -->
|
||||||
|
<HBox>
|
||||||
|
<Box width="150" height="stretch">
|
||||||
|
<VBox valign="top" halign="left" width="150" height="stretch" >
|
||||||
|
<Button class="btn_global_blue_80x30" width="100" name="add_new" margin="25,3,5,3" />
|
||||||
|
<TreeView class="list" name="tree" height="stretch" padding="0,3,5,3">
|
||||||
|
</TreeView>
|
||||||
|
</VBox>
|
||||||
|
</Box>
|
||||||
|
<!-- 主界面 -->
|
||||||
|
<TabBox name="tab_side" width="stretch" height="stretch">
|
||||||
|
</TabBox>
|
||||||
|
</HBox>
|
||||||
|
</VBox>
|
||||||
|
</Window>
|
40
examples/Debug/resources/themes/default/basic/newmonitor.xml
Normal file
40
examples/Debug/resources/themes/default/basic/newmonitor.xml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Window size="250,300" caption="0,0,0,35">
|
||||||
|
<VBox bkcolor="bk_wnd_darkcolor">
|
||||||
|
<!-- 标题栏 -->
|
||||||
|
<HBox width="stretch" height="35" bkcolor="bk_wnd_lightcolor">
|
||||||
|
<Label name="title" text="新建监听项" valign="center" margin="60,15,0,0" align="left" width="stretch" height="35" font="arial_14"/>
|
||||||
|
</HBox>
|
||||||
|
<HBox width="stretch" height="35" margin="10,10,10,10">
|
||||||
|
<Label name="title" text="类型:" valign="bottom" margin="30,0,0,0" width="60" height="30" font="arial_14"/>
|
||||||
|
<Combo class="list" name="combo_type" height="30" width="110" bkimage="file='../public/combo/normal.png' corner='5,5,30,5'"/>
|
||||||
|
<Control width="stretch"/>
|
||||||
|
</HBox>
|
||||||
|
<VBox bkcolor="bk_wnd_darkcolor" height="100" visible="false" name="uart_config">
|
||||||
|
<HBox width="stretch" height="35" margin="10,10,10,10">
|
||||||
|
<Label name="title" text="串口:" valign="bottom" margin="30,0,0,0" width="60" height="30" font="arial_14"/>
|
||||||
|
<Combo class="list" name="uart_type" height="30" width="110" bkimage="file='../public/combo/normal.png' corner='5,5,30,5'"/>
|
||||||
|
<Control width="stretch"/>
|
||||||
|
</HBox>
|
||||||
|
<HBox width="stretch" height="35" margin="10,10,10,10">
|
||||||
|
<Label name="title" text="波特率:" valign="bottom" margin="30,0,0,0" width="60" height="30" font="arial_14"/>
|
||||||
|
<Combo class="list" name="uart_baurate_select" height="30" width="110" bkimage="file='../public/combo/normal.png' corner='5,5,30,5'"/>
|
||||||
|
<Control width="stretch"/>
|
||||||
|
</HBox>
|
||||||
|
</VBox>
|
||||||
|
<VBox bkcolor="bk_wnd_darkcolor" height="90" visible="false" name="ip_config">
|
||||||
|
<HBox width="stretch" height="35" margin="10,0,0,0">
|
||||||
|
<Label name="title" text="ip: " valign="bottom" margin="30,0,0,0" width="60" height="30" font="arial_14"/>
|
||||||
|
<RichEdit class="simple input" width="90" name="ip_edit" height="30" margin="0,3" padding="6,6,6" />
|
||||||
|
<Control width="stretch"/>
|
||||||
|
</HBox>
|
||||||
|
<HBox width="stretch" height="35" margin="10,0,0,0">
|
||||||
|
<Label name="title" text="端口:" valign="bottom" margin="30,0,0,0" width="60" height="30" font="arial_14"/>
|
||||||
|
<RichEdit class="simple input" width="90" name="port_input" height="30" margin="0,3" padding="6,6,6" />
|
||||||
|
<Control width="stretch"/>
|
||||||
|
</HBox>
|
||||||
|
</VBox>
|
||||||
|
<Button class="btn_global_blue_80x30" name="open_button" width="100" margin="80,3,5,3" text="打开" />
|
||||||
|
<Button class="btn_global_blue_80x30" name="exit_button" width="100" margin="80,3,5,3" text="退出" />
|
||||||
|
</VBox>
|
||||||
|
</Window>
|
33
examples/Debug/resources/themes/default/basic/uart_form.xml
Normal file
33
examples/Debug/resources/themes/default/basic/uart_form.xml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<ChildBox name="uart_form" width="stretch" height="stretch">
|
||||||
|
<VBox width="stretch" height="stretch">
|
||||||
|
<Label name="uart_info_label" text="当前串口: COM" margin="0,10,0,0" height="25" />
|
||||||
|
<HBox height="25" >
|
||||||
|
<Label text="数据接收:" margin="0,10,0,0" height="25" width="stretch"/>
|
||||||
|
<Label text="lua脚本:" margin="0,10,0,0" height="25" width="stretch"/>
|
||||||
|
</HBox>
|
||||||
|
<HBox>
|
||||||
|
<RichEdit class="simple input" width="stretch" name="uart_recv_eidt" height="stretch" margin="5,5,5,5" padding="6,6,6"
|
||||||
|
multiline="true" vscrollbar="true" hscrollbar="true" autovscroll="true" normaltextcolor="darkcolor" wantreturnmsg="true" rich="true" />
|
||||||
|
<RichEdit class="simple input" width="stretch"
|
||||||
|
name="lua_script" height="stretch"
|
||||||
|
margin="5,5,5,5" padding="6,6,6"
|
||||||
|
multiline="true" vscrollbar="true"
|
||||||
|
hscrollbar="true" autovscroll="true" normaltextcolor="darkcolor" wantreturnmsg="true" rich="true" />
|
||||||
|
</HBox>
|
||||||
|
<Label text="发送数据" height="25" />
|
||||||
|
<RichEdit class="simple input" width="stretch" name="uart_send_edit" height="30" margin="5,5,5,5" padding="6,6,6" />
|
||||||
|
<HBox height="40">
|
||||||
|
<Button class="btn_global_blue_80x30" name="btn_save_lua" width="100" text="保存lua脚本" bkcolor="lightcolor" margin="25,3,5,3" />
|
||||||
|
<Button class="btn_global_blue_80x30" name="btn_send_data" width="100" text="发送" bkcolor="lightcolor" margin="25,3,5,3" />
|
||||||
|
<CheckBox class="checkbox_font12" name="check_new_line" text="发送新行" margin="10,12,0,0" selected="true"/>
|
||||||
|
<CheckBox class="checkbox_font12" name="check_time_send" text="定时发送" margin="10,12,0,0" selected="true"/>
|
||||||
|
<CheckBox class="checkbox_font12" name="check_hex_send" text="hex显示" margin="10,12,0,0" selected="true"/>
|
||||||
|
<CheckBox class="checkbox_font12" name="check_hex_recv" text="hex接受" margin="10,12,0,0" selected="true"/>
|
||||||
|
<Button class="btn_global_blue_80x30" name="btn_close_uart" width="100" text="关闭" bkcolor="lightcolor" margin="25,3,5,3" />
|
||||||
|
|
||||||
|
</HBox>
|
||||||
|
</VBox>
|
||||||
|
</ChildBox>
|
||||||
|
|
@ -63,12 +63,47 @@ LRESULT BasicForm::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
PortNum = PortNum * 10 + (comname[i] - L'0');
|
PortNum = PortNum * 10 + (comname[i] - L'0');
|
||||||
}
|
}
|
||||||
SerialPort::ClosePort(PortNum);
|
SerialPort::ClosePort(PortNum);
|
||||||
delete mRightShow;
|
|
||||||
}
|
}
|
||||||
if (uMsg == WM_ADD_UART_RECVDATA) {
|
if (uMsg == WM_USER_UDP_CLOSE) {
|
||||||
printf("WM_ADD_UART_RECVDATA");
|
wprintf(L"close %s\r\n", ((wstring*)wParam)->c_str());
|
||||||
//this->Paint();
|
mRightShow->SetVisible(false);
|
||||||
|
mRightShow = nullptr;
|
||||||
|
mRightSide->SetAutoDestroy(true);
|
||||||
|
mRightSide->RemoveAll();
|
||||||
|
mUdpForm.erase(*(wstring*)(wParam));
|
||||||
|
int cnt = mMonitor->GetRootNode()->GetChildNode(3)->GetChildNodeCount();
|
||||||
|
ui::TreeNode* p = nullptr;
|
||||||
|
for (int i = 0; i < cnt; i++) {
|
||||||
|
if (mMonitor->GetRootNode()->GetChildNode(3)->GetChildNode(i)->GetText()
|
||||||
|
== *(wstring*)(wParam)) {
|
||||||
|
p = mMonitor->GetRootNode()->GetChildNode(3)->GetChildNode(i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
mMonitor->GetRootNode()->GetChildNode(3)->RemoveChildNode(p);
|
||||||
|
delete mRightShow;
|
||||||
|
mRightShow = nullptr;
|
||||||
|
}
|
||||||
|
if (uMsg == WM_USER_TCP_CLIENT_CLOSE) {
|
||||||
|
wprintf(L"close %s\r\n", ((wstring*)wParam)->c_str());
|
||||||
|
mRightShow->SetVisible(false);
|
||||||
|
mRightSide->SetAutoDestroy(true);
|
||||||
|
mRightSide->RemoveAll();
|
||||||
|
|
||||||
|
mTcpClientForm.erase(*(wstring*)(wParam));
|
||||||
|
int cnt = mMonitor->GetRootNode()->GetChildNode(1)->GetChildNodeCount();
|
||||||
|
ui::TreeNode* p = nullptr;
|
||||||
|
for (int i = 0; i < cnt; i++) {
|
||||||
|
if (mMonitor->GetRootNode()->GetChildNode(1)->GetChildNode(i)->GetText()
|
||||||
|
== *(wstring*)(wParam)) {
|
||||||
|
p = mMonitor->GetRootNode()->GetChildNode(1)->GetChildNode(i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mMonitor->GetRootNode()->GetChildNode(1)->RemoveChildNode(p);
|
||||||
|
delete mRightShow;
|
||||||
|
mRightShow = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uMsg == WM_USER_POS_CHANGED) {
|
if (uMsg == WM_USER_POS_CHANGED) {
|
||||||
|
@ -10,3 +10,6 @@
|
|||||||
|
|
||||||
#define WM_ADD_UDP_MONITOR (WM_USER + 8)
|
#define WM_ADD_UDP_MONITOR (WM_USER + 8)
|
||||||
#define WM_ADD_UDP_GROUP_MONITOR (WM_USER + 9)
|
#define WM_ADD_UDP_GROUP_MONITOR (WM_USER + 9)
|
||||||
|
#define WM_USER_UDP_CLOSE (WM_USER + 10)
|
||||||
|
#define WM_USER_TCP_CLIENT_CLOSE (WM_USER + 11)
|
||||||
|
#define WM_USER_TCP_SERVER_CLOSE (WM_USER + 12)
|
||||||
|
@ -76,14 +76,18 @@ void conn_eventcb(struct bufferevent *bev, short events, void *user_data)
|
|||||||
if (nullptr != p->mObserver)
|
if (nullptr != p->mObserver)
|
||||||
p->mObserver->OnDisConnected("服务器主动断开连接");
|
p->mObserver->OnDisConnected("服务器主动断开连接");
|
||||||
if (p != nullptr)
|
if (p != nullptr)
|
||||||
p->mStatus = TcpClientLibevent::UNCONNECTED;
|
if (p->mStatus != TcpClientLibevent::STOP)
|
||||||
|
p->mStatus = TcpClientLibevent::UNCONNECTED;
|
||||||
printf("Connection closed\n");
|
printf("Connection closed\n");
|
||||||
}
|
}
|
||||||
else if (events & BEV_EVENT_ERROR) {
|
else if (events & BEV_EVENT_ERROR) {
|
||||||
printf("Got an error on the connection: %s\n", strerror(errno));
|
printf("Got an error on the connection: %s\n", strerror(errno));
|
||||||
if (nullptr != p->mObserver)
|
if (nullptr != p) {
|
||||||
p->mObserver->OnDisConnected("连接失败");
|
if (nullptr != p->mObserver)
|
||||||
p->mStatus = TcpClientLibevent::FAIL;
|
p->mObserver->OnDisConnected("连接失败");
|
||||||
|
if(p->mStatus != TcpClientLibevent::STOP)
|
||||||
|
p->mStatus = TcpClientLibevent::FAIL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (events & BEV_EVENT_CONNECTED) {
|
else if (events & BEV_EVENT_CONNECTED) {
|
||||||
p->mSocketFD = (uint64_t)event_get_fd(&(bev->ev_read));
|
p->mSocketFD = (uint64_t)event_get_fd(&(bev->ev_read));
|
||||||
@ -107,6 +111,7 @@ bool TcpClientLibevent::Connected() {
|
|||||||
return (((mStatus != UNCONNECTED)&& (mStatus != FAIL) )?true : false);
|
return (((mStatus != UNCONNECTED)&& (mStatus != FAIL) )?true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TcpClientLibevent::TcpClientLibevent(std::string addrinfo, int port, TcpClientLibevent::TcpClientObserver *p) :
|
TcpClientLibevent::TcpClientLibevent(std::string addrinfo, int port, TcpClientLibevent::TcpClientObserver *p) :
|
||||||
mStatus(UNCONNECTED),
|
mStatus(UNCONNECTED),
|
||||||
mObserver(nullptr)
|
mObserver(nullptr)
|
||||||
@ -141,10 +146,13 @@ TcpClientLibevent::TcpClientLibevent(std::string addrinfo, int port, TcpClientLi
|
|||||||
int TcpClientLibevent::ConnectServer() {
|
int TcpClientLibevent::ConnectServer() {
|
||||||
printf("server conecting...\r\n");
|
printf("server conecting...\r\n");
|
||||||
evthread_make_base_notifiable(mBase);
|
evthread_make_base_notifiable(mBase);
|
||||||
|
mMux.lock();
|
||||||
|
|
||||||
mBev = bufferevent_socket_new(mBase, -1,
|
mBev = bufferevent_socket_new(mBase, -1,
|
||||||
BEV_OPT_CLOSE_ON_FREE | BEV_OPT_THREADSAFE);
|
BEV_OPT_CLOSE_ON_FREE | BEV_OPT_THREADSAFE);
|
||||||
if (nullptr == mBev) {
|
if (nullptr == mBev) {
|
||||||
this->mStatus = TcpClientLibevent::FAIL;
|
this->mStatus = TcpClientLibevent::FAIL;
|
||||||
|
|
||||||
return - 1;
|
return - 1;
|
||||||
}
|
}
|
||||||
bufferevent_setcb(mBev, conn_readcb, conn_writecb, conn_eventcb, this);
|
bufferevent_setcb(mBev, conn_readcb, conn_writecb, conn_eventcb, this);
|
||||||
@ -152,17 +160,20 @@ int TcpClientLibevent::ConnectServer() {
|
|||||||
bufferevent_enable(mBev, EV_READ | EV_WRITE);
|
bufferevent_enable(mBev, EV_READ | EV_WRITE);
|
||||||
if (-1 == flag) {
|
if (-1 == flag) {
|
||||||
this->mStatus = TcpClientLibevent::FAIL;
|
this->mStatus = TcpClientLibevent::FAIL;
|
||||||
|
|
||||||
bufferevent_free(mBev);
|
bufferevent_free(mBev);
|
||||||
mBev = nullptr;
|
mBev = nullptr;
|
||||||
printf("Connect failed\n");
|
printf("Connect failed\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
this->mStatus = TcpClientLibevent::CONNECTING;
|
this->mStatus = TcpClientLibevent::CONNECTING;
|
||||||
|
mMux.unlock();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TcpClientLibevent::ConnectServerSync()
|
int TcpClientLibevent::ConnectServerSync()
|
||||||
{
|
{
|
||||||
|
mMux.lock();
|
||||||
evthread_make_base_notifiable(mBase);
|
evthread_make_base_notifiable(mBase);
|
||||||
if (nullptr != mBev)
|
if (nullptr != mBev)
|
||||||
{
|
{
|
||||||
@ -172,6 +183,7 @@ int TcpClientLibevent::ConnectServerSync()
|
|||||||
BEV_OPT_CLOSE_ON_FREE | BEV_OPT_THREADSAFE);
|
BEV_OPT_CLOSE_ON_FREE | BEV_OPT_THREADSAFE);
|
||||||
if (nullptr == mBev) {
|
if (nullptr == mBev) {
|
||||||
this->mStatus = TcpClientLibevent::FAIL;
|
this->mStatus = TcpClientLibevent::FAIL;
|
||||||
|
mMux.unlock();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
bufferevent_setcb(mBev, conn_readcb, conn_writecb, conn_eventcb, this);
|
bufferevent_setcb(mBev, conn_readcb, conn_writecb, conn_eventcb, this);
|
||||||
@ -182,10 +194,11 @@ int TcpClientLibevent::ConnectServerSync()
|
|||||||
bufferevent_free(mBev);
|
bufferevent_free(mBev);
|
||||||
mBev = nullptr;
|
mBev = nullptr;
|
||||||
printf("Connect failed\n");
|
printf("Connect failed\n");
|
||||||
|
mMux.unlock();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->mStatus = TcpClientLibevent::CONNECTING;
|
this->mStatus = TcpClientLibevent::CONNECTING;
|
||||||
|
|
||||||
auto start = system_clock::to_time_t(system_clock::now());
|
auto start = system_clock::to_time_t(system_clock::now());
|
||||||
while (this->mStatus != TcpClientLibevent::CONNECTED) {
|
while (this->mStatus != TcpClientLibevent::CONNECTED) {
|
||||||
auto end = system_clock::to_time_t(system_clock::now());
|
auto end = system_clock::to_time_t(system_clock::now());
|
||||||
@ -195,6 +208,7 @@ int TcpClientLibevent::ConnectServerSync()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mMux.unlock();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,11 +59,15 @@ public:
|
|||||||
};
|
};
|
||||||
TcpClientLibevent(std::string addrinfo, int port, TcpClientObserver* p);
|
TcpClientLibevent(std::string addrinfo, int port, TcpClientObserver* p);
|
||||||
~TcpClientLibevent() {
|
~TcpClientLibevent() {
|
||||||
|
mMux.lock();
|
||||||
|
mStatus = STOP;
|
||||||
|
mMux.unlock();
|
||||||
|
|
||||||
|
mThread->join();
|
||||||
event_base_free(mBase);
|
event_base_free(mBase);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
friend void conn_eventcb(struct bufferevent*, short, void*);
|
friend void conn_eventcb(struct bufferevent*, short, void*);
|
||||||
|
|
||||||
int ConnectServer();
|
int ConnectServer();
|
||||||
int ConnectServerSync();
|
int ConnectServerSync();
|
||||||
|
|
||||||
@ -89,6 +93,7 @@ private:
|
|||||||
uint64_t mByteSend; // 发送字节数
|
uint64_t mByteSend; // 发送字节数
|
||||||
uint64_t mByteRecv; // 接收字节数
|
uint64_t mByteRecv; // 接收字节数
|
||||||
evutil_socket_t mSocketFD; // 操作系统原生socket
|
evutil_socket_t mSocketFD; // 操作系统原生socket
|
||||||
|
mutex mMux;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#define TCP_CLIENT_SCRIPT "tcp_client.lua"
|
#define TCP_CLIENT_SCRIPT "tcp_client.lua"
|
||||||
TcpClientForm::~TcpClientForm() {
|
TcpClientForm::~TcpClientForm() {
|
||||||
|
delete mClient;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +57,8 @@ void TcpClientForm::Init()
|
|||||||
m_check_box_3 = dynamic_cast<ui::CheckBox*>(FindSubControl(L"check_hex_send"));
|
m_check_box_3 = dynamic_cast<ui::CheckBox*>(FindSubControl(L"check_hex_send"));
|
||||||
m_check_box_4 = dynamic_cast<ui::CheckBox*>(FindSubControl(L"check_hex_recv"));
|
m_check_box_4 = dynamic_cast<ui::CheckBox*>(FindSubControl(L"check_hex_recv"));
|
||||||
m_btn_save_lua = dynamic_cast<ui::Button*>(FindSubControl(L"btn_save_lua"));
|
m_btn_save_lua = dynamic_cast<ui::Button*>(FindSubControl(L"btn_save_lua"));
|
||||||
|
m_btn_close_form = dynamic_cast<ui::Button*>(FindSubControl(L"btn_close_uart"));
|
||||||
|
|
||||||
m_rich_edit_2->SetRich(true);
|
m_rich_edit_2->SetRich(true);
|
||||||
m_rich_edit_2->SetReturnMsgWantCtrl(true);
|
m_rich_edit_2->SetReturnMsgWantCtrl(true);
|
||||||
m_rich_edit_2->SetText(string2wstring(mLuaScript));
|
m_rich_edit_2->SetText(string2wstring(mLuaScript));
|
||||||
@ -65,6 +67,16 @@ void TcpClientForm::Init()
|
|||||||
wsprintf(p, L"µØÖ·%s,¶Ë¿ÚºÅ%d δÁ¬½Ó", string2wstring(m_url).c_str(),m_port);
|
wsprintf(p, L"µØÖ·%s,¶Ë¿ÚºÅ%d δÁ¬½Ó", string2wstring(m_url).c_str(),m_port);
|
||||||
m_label_1->SetText(std::wstring(p));
|
m_label_1->SetText(std::wstring(p));
|
||||||
|
|
||||||
|
if (nullptr != m_btn_close_form) {
|
||||||
|
m_btn_close_form->AttachClick([this](ui::EventArgs*) {
|
||||||
|
wstring* name = new wstring(this->GetName());
|
||||||
|
::PostMessage(this->GetWindow()->GetHWND(),
|
||||||
|
WM_USER_TCP_CLIENT_CLOSE, (WPARAM)name, 0);
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
m_btn_send_data->AttachAllEvents([this](ui::EventArgs* ev) {
|
m_btn_send_data->AttachAllEvents([this](ui::EventArgs* ev) {
|
||||||
if (ev->Type == ui::EventType::kEventClick) {
|
if (ev->Type == ui::EventType::kEventClick) {
|
||||||
std::wcout << m_uart_send_edit->GetText() << std::endl;
|
std::wcout << m_uart_send_edit->GetText() << std::endl;
|
||||||
|
@ -48,6 +48,7 @@ private:
|
|||||||
ui::RichEdit* m_uart_send_edit;
|
ui::RichEdit* m_uart_send_edit;
|
||||||
ui::Button* m_btn_send_data;
|
ui::Button* m_btn_send_data;
|
||||||
ui::Button* m_btn_save_lua;
|
ui::Button* m_btn_save_lua;
|
||||||
|
ui::Button* m_btn_close_form;
|
||||||
ui::CheckBox* m_check_box_1;
|
ui::CheckBox* m_check_box_1;
|
||||||
ui::CheckBox* m_check_box_2;
|
ui::CheckBox* m_check_box_2;
|
||||||
ui::CheckBox* m_check_box_3;
|
ui::CheckBox* m_check_box_3;
|
||||||
|
@ -96,12 +96,12 @@ void UdpForm::Init()
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (nullptr != m_button_2) {
|
if (nullptr != m_button_2) {
|
||||||
m_button_2->AttachClick(
|
m_button_2->AttachClick([this](ui::EventArgs*) {
|
||||||
[this](ui::EventArgs*) {
|
wstring* name = new wstring(this->GetName());
|
||||||
|
::PostMessage(this->GetWindow()->GetHWND(),
|
||||||
return true;
|
WM_USER_UDP_CLOSE, (WPARAM)name, 0);
|
||||||
}
|
return true;
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
if (nullptr != m_button_3) {
|
if (nullptr != m_button_3) {
|
||||||
m_button_3->AttachClick(
|
m_button_3->AttachClick(
|
||||||
|
@ -203,6 +203,7 @@ UdpDataGramLibevent::UdpDataGramLibevent(std::string ip, uint32_t port, std::str
|
|||||||
printf("event_init() failed\n");
|
printf("event_init() failed\n");
|
||||||
}
|
}
|
||||||
m_event = new struct event;
|
m_event = new struct event;
|
||||||
|
|
||||||
if (0 > bind_socket_with_group(m_event, ip.c_str(), port, group_addr.c_str())) {
|
if (0 > bind_socket_with_group(m_event, ip.c_str(), port, group_addr.c_str())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
171
examples/proto_debuger/x64/Debug/themes/default/global.xml
Normal file
171
examples/proto_debuger/x64/Debug/themes/default/global.xml
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Global>
|
||||||
|
<!--所有字体-->
|
||||||
|
<Font id="system_12" name="system" size="12" default="true" />
|
||||||
|
<Font id="system_14" name="system" size="14" />
|
||||||
|
<Font id="system_16" name="system" size="16" />
|
||||||
|
<Font id="system_18" name="system" size="18" />
|
||||||
|
<Font id="system_20" name="system" size="20" />
|
||||||
|
<Font id="system_22" name="system" size="22" />
|
||||||
|
<Font id="system_bold_12" name="system" size="12" bold="true" />
|
||||||
|
<Font id="system_bold_14" name="system" size="14" bold="true" />
|
||||||
|
<Font id="system_bold_16" name="system" size="16" bold="true" />
|
||||||
|
<Font id="system_bold_18" name="system" size="18" bold="true" />
|
||||||
|
<Font id="system_bold_20" name="system" size="20" bold="true" />
|
||||||
|
<Font id="system_bold_22" name="system" size="22" bold="true" />
|
||||||
|
<Font id="arial_12" name="arial" size="12" />
|
||||||
|
<Font id="arial_14" name="arial" size="14" />
|
||||||
|
<Font id="arial_16" name="arial" size="16" />
|
||||||
|
<Font id="arial_18" name="arial" size="18" />
|
||||||
|
<Font id="arial_20" name="arial" size="20" />
|
||||||
|
<Font id="arial_22" name="arial" size="22" />
|
||||||
|
<Font id="arial_30" name="arial" size="30" underline="true" />
|
||||||
|
|
||||||
|
<Font id="arial_bold_12" name="arial" size="12" bold="true" />
|
||||||
|
<Font id="arial_bold_14" name="arial" size="14" bold="true" />
|
||||||
|
<Font id="arial_bold_16" name="arial" size="16" bold="true" />
|
||||||
|
<Font id="arial_bold_18" name="arial" size="18" bold="true" />
|
||||||
|
<Font id="arial_bold_20" name="arial" size="20" bold="true" />
|
||||||
|
<Font id="arial_bold_22" name="arial" size="22" bold="true" />
|
||||||
|
<Font id="system_underline_12" name="system" size="12" underline="true" />
|
||||||
|
<Font id="system_underline_14" name="system" size="14" underline="true" />
|
||||||
|
<Font id="system_underline_16" name="system" size="16" underline="true" />
|
||||||
|
<Font id="system_underline_18" name="system" size="18" underline="true" />
|
||||||
|
<Font id="system_underline_20" name="system" size="20" underline="true" />
|
||||||
|
<Font id="system_underline_22" name="system" size="22" underline="true" />
|
||||||
|
<Font id="title" name="system" size="20" />
|
||||||
|
|
||||||
|
<!--一些常规固定颜色-->
|
||||||
|
<TextColor name="white" value="#ffffffff" />
|
||||||
|
<TextColor name="black" value="#ff000000" />
|
||||||
|
<TextColor name="darkcolor" value="#ff333333" />
|
||||||
|
<TextColor name="lightcolor" value="#ff888888" />
|
||||||
|
<TextColor name="gray" value="#ff8e99a6" />
|
||||||
|
<TextColor name="light_gray" value="#ffa8a8a8" />
|
||||||
|
<TextColor name="dark_gray" value="#ff72797f" />
|
||||||
|
<TextColor name="green" value="#ff00bb96" />
|
||||||
|
<TextColor name="light_green" value="#ff21c7a6" />
|
||||||
|
<TextColor name="blue" value="#ff006DD9" />
|
||||||
|
<TextColor name="red" value="#ffC63535" />
|
||||||
|
|
||||||
|
<!--文字色值,不带透明层-->
|
||||||
|
<TextColor name="textdefaultcolor" value="#ff333333" />
|
||||||
|
<TextColor name="textdefaultdisablecolor" value="#ffa1aebc" />
|
||||||
|
|
||||||
|
<!--窗口常用背景色-->
|
||||||
|
<TextColor name="bk_main_wnd_title" value="#ff238efa" />
|
||||||
|
<TextColor name="bk_main_wnd_search" value="#ff1e7ad7" />
|
||||||
|
<TextColor name="bk_wnd_darkcolor" value="#fff0f2f5" />
|
||||||
|
<TextColor name="bk_wnd_lightcolor" value="#fff0f2f5" />
|
||||||
|
<TextColor name="bk_menuitem_hovered" value="#ffe1e6eb" />
|
||||||
|
<TextColor name="bk_menuitem_selected" value="#ffced4db" />
|
||||||
|
<TextColor name="bk_listitem_hovered" value="#fff0f2f5" />
|
||||||
|
<TextColor name="bk_listitem_selected" value="#ffe4e7eb" />
|
||||||
|
|
||||||
|
<!--置顶项的背景颜色-->
|
||||||
|
<TextColor name="bk_topitem_normal" value="#ffffffe0" />
|
||||||
|
<TextColor name="bk_topitem_hovered" value="#ffffffeb" />
|
||||||
|
<TextColor name="bk_topitem_selected" value="#00fafacd" />
|
||||||
|
|
||||||
|
<!--进度条专用-->
|
||||||
|
<TextColor name="bk_progress_bk" value="#ffe3ecf5" />
|
||||||
|
<TextColor name="bk_progress_progress" value="#ff2aceae" />
|
||||||
|
|
||||||
|
<!--背景色值,半透明-->
|
||||||
|
<TextColor name="transbkblack" value="#80000000" />
|
||||||
|
|
||||||
|
<!--第一级分割线,较深-->
|
||||||
|
<TextColor name="splitline_level1" value="#ffd2d4d6" />
|
||||||
|
|
||||||
|
<!--第二级分割线,较浅-->
|
||||||
|
<TextColor name="splitline_level2" value="#ffebedf0" />
|
||||||
|
|
||||||
|
<!--调色板色值-->
|
||||||
|
<TextColor name="color_palette1" value="#ffff2600" />
|
||||||
|
<TextColor name="color_palette2" value="#ffffeb00" />
|
||||||
|
<TextColor name="color_palette3" value="#ff61ed00" />
|
||||||
|
<TextColor name="color_palette4" value="#ff00b4ff" />
|
||||||
|
<TextColor name="color_palette5" value="#ffa100ff" />
|
||||||
|
<TextColor name="color_palette6" value="#ff000000" />
|
||||||
|
<TextColor name="color_palette7" value="#ff545454" />
|
||||||
|
<TextColor name="color_palette8" value="#ffa8a8a8" />
|
||||||
|
<TextColor name="color_palette9" value="#ffffffff" />
|
||||||
|
|
||||||
|
<!--字体大小-->
|
||||||
|
<Class name="font_title" font="system_14" />
|
||||||
|
|
||||||
|
<!--标题栏-->
|
||||||
|
<Class name="caption" height="34" bkimage="file='../public/caption/caption_public.png' corner='0,0,0,1'" padding="10,0,5,0" />
|
||||||
|
|
||||||
|
<!--滚动条-->
|
||||||
|
<Class name="vscrollbar" width="14" fadealpha="true" thumbnormalimage="file='../public/vscrollbar/thumb_normal.png' corner='0,8,0,8'" thumbhotimage="file='../public/vscrollbar/thumb_hovered.png' corner='0,8,0,8'" bkhotimage="file='../public/vscrollbar/bk_hovered.png' corner='0,4,0,4'" showbutton1="false" showbutton2="false" />
|
||||||
|
<Class name="hscrollbar" height="14" fadealpha="true" thumbnormalimage="file='../public/hscrollbar/thumb_normal.png' corner='8,0,8,0'" thumbhotimage="file='../public/hscrollbar/thumb_hovered.png' corner='8,0,8,0'" bkhotimage="file='../public/hscrollbar/bk_hovered.png' corner='4,0,4,0'" showbutton1="false" showbutton2="false" />
|
||||||
|
|
||||||
|
<!--单选框-->
|
||||||
|
<Class name="option" selectednormalimage="../public/option/selected.png" selectedhotimage="../public/option/selectedhover.png" selectedpushedimage="../public/option/selectedhover.png" />
|
||||||
|
<Class name="circle_option" normalimage="../public/option/circle_unselected.png" disabledimage="../public/option/circle_unselected_disabled.png" />
|
||||||
|
<Class name="circle_option_2" height="18" textpadding="25,0,0,0" font="system_12" normaltextcolor="darkcolor" normalimage="file='../public/option/circle_unselected.png' dest='0,0,18,18'" selectednormalimage="file='../public/option/circle_selected.png' dest='0,0,18,18'" />
|
||||||
|
|
||||||
|
<!--复选框-->
|
||||||
|
<Class name="checkbox_font12" height="16" textpadding="20,0,0,0" font="system_12" normaltextcolor="darkcolor" normalimage="file='../public/CheckBox/check_no.png' dest='0,0,16,16'" disabledimage="file='../public/CheckBox/check_no.png' dest='0,0,16,16' fade='80'" selectednormalimage="file='../public/CheckBox/check_yes.png' dest='0,0,16,16'" selecteddisabledimage="file='../public/CheckBox/check_yes.png' dest='0,0,16,16' fade='80'" />
|
||||||
|
<Class name="checkbox_font14" height="20" textpadding="20,0,0,0" font="system_14" normaltextcolor="darkcolor" normalimage="file='../public/CheckBox/check_no.png' dest='0,2,16,18'" disabledimage="file='../public/CheckBox/check_no.png' dest='0,2,16,18' fade='80'" selectednormalimage="file='../public/CheckBox/check_yes.png' dest='0,2,16,18'" selecteddisabledimage="file='../public/CheckBox/check_yes.png' dest='0,2,16,18' fade='80'" />
|
||||||
|
<Class name="checkbox_green" normalimage="file='../public/CheckBox/check_green_no.png'" disabledimage="file='../public/CheckBox/check_green_no.png' fade='80'" selectednormalimage="file='../public/CheckBox/check_green_yes.png'" selecteddisabledimage="file='../public/CheckBox/check_green_yes.png' fade='80'" />
|
||||||
|
|
||||||
|
<!--按钮-->
|
||||||
|
<Class name="btn_global_blue_80x30" font="system_bold_14" normaltextcolor="white" normalimage="file='../public/button/btn_global_blue_80x30_normal.png'" hotimage="file='../public/button/btn_global_blue_80x30_hovered.png'" pushedimage="file='../public/button/btn_global_blue_80x30_pushed.png'" disabledimage="file='../public/button/btn_global_blue_80x30_normal.png' fade='80'" />
|
||||||
|
<Class name="btn_global_white_80x30" font="system_bold_14" normaltextcolor="dark_gray" normalimage="file='../public/button/btn_global_white_80x30_normal.png'" hotimage="file='../public/button/btn_global_white_80x30_hovered.png'" pushedimage="file='../public/button/btn_global_white_80x30_pushed.png'" disabledimage="file='../public/button/btn_global_white_80x30_normal.png' fade='128'" />
|
||||||
|
<Class name="btn_global_red_80x30" font="system_bold_14" normaltextcolor="white" normalimage="file='../public/button/btn_global_red_80x30_normal.png'" hotimage="file='../public/button/btn_global_red_80x30_hovered.png'" pushedimage="file='../public/button/btn_global_red_80x30_pushed.png'" disabledimage="file='../public/button/btn_global_red_80x30_normal.png' fade='80'" />
|
||||||
|
|
||||||
|
<!--窗口右上角按钮 灰色版 -->
|
||||||
|
<Class name="btn_wnd_min" width="auto" height="auto" forenormalimage="file='../public/button/btn_wnd_gray_min.png' dest='4,4,16,16'" normalimage="" hotimage="../public/button/btn_wnd_gray_min_hovered.png" pushedimage="../public/button/btn_wnd_gray_min_pushed.png" />
|
||||||
|
<Class name="btn_wnd_close" width="20" height="20" normalimage="file='../public/button/btn_wnd_gray_close.png' dest='4,4,16,16'" hotimage="../public/button/btn_wnd_white_close_hovered.png" pushedimage="../public/button/btn_wnd_white_close_pushed.png" fadehot="false" />
|
||||||
|
<Class name="btn_wnd_max" width="auto" height="auto" forenormalimage="file='../public/button/btn_wnd_gray_max.png' dest='4,4,16,16'" normalimage="" hotimage="../public/button/btn_wnd_gray_max_hovered.png" pushedimage="../public/button/btn_wnd_gray_max_pushed.png" />
|
||||||
|
<Class name="btn_wnd_restore" width="auto" height="auto" forenormalimage="file='../public/button/btn_wnd_gray_restore.png' dest='4,4,16,16'" normalimage="" hotimage="../public/button/btn_wnd_gray_restore_hovered.png" pushedimage="../public/button/btn_wnd_gray_restore_pushed.png" />
|
||||||
|
<Class name="btn_wnd_settings" width="auto" height="auto" forenormalimage="file='../public/button/btn_wnd_settings.png' source='1,1,21,21'" hotimage="../public/button/btn_wnd_bk_hovered.png" pushedimage="../public/button/btn_wnd_bk_pushed.png" />
|
||||||
|
|
||||||
|
<!--窗口右上角按钮 白色版 -->
|
||||||
|
<Class name="btn_wnd_white_min" width="auto" height="auto" forenormalimage="file='../public/button/btn_wnd_white_min.png'" normalimage="" hotimage="../public/button/btn_wnd_white_min_hovered.png" pushedimage="../public/button/btn_wnd_white_min_pushed.png" />
|
||||||
|
<Class name="btn_wnd_white_close" width="auto" height="auto" forenormalimage="file='../public/button/btn_wnd_white_close.png'" normalimage="" hotimage="../public/button/btn_wnd_white_close_hovered.png" pushedimage="../public/button/btn_wnd_white_close_pushed.png" />
|
||||||
|
<Class name="btn_wnd_white_max" width="auto" height="auto" forenormalimage="file='../public/button/btn_wnd_white_max.png' dest='4,4,16,16'" normalimage="" hotimage="../public/button/btn_wnd_white_max_hovered.png" pushedimage="../public/button/btn_wnd_white_max_pushed.png" />
|
||||||
|
<Class name="btn_wnd_white_menu" width="auto" height="auto" forenormalimage="file='../public/button/btn_wnd_white_menu.png' dest='4,5,16,15'" normalimage="" hotimage="../public/button/btn_wnd_white_menu_hovered.png" pushedimage="../public/button/btn_wnd_white_menu_pushed.png" />
|
||||||
|
|
||||||
|
<!--删除按钮通用样式-->
|
||||||
|
<Class name="btn_delete" normalimage="file='../public/button/funcicon.png' source='0,0,26,26'" hotimage="file='../public/button/funcicon.png' source='31,0,57,26'" pushedimage="file='../public/button/funcicon.png' source='62,0,88,26'" disabledimage="file='../public/button/funcicon.png' source='93,0,119,26'" />
|
||||||
|
<Class name="btn_recycle" width="auto" height="auto" normalimage="file='../public/button/btn_recycle_normal.png'" hotimage="file='../public/button/btn_recycle_hovered.png'" pushedimage="file='../public/button/btn_recycle_pushed.png'" disabledimage="file='../public/button/btn_recycle_normal.png' fade='80'" />
|
||||||
|
<Class name="btn_refresh" width="auto" height="auto" normalimage="file='../public/button/btn_refresh_normal.png'" hotimage="file='../public/button/btn_refresh_hovered.png'" pushedimage="file='../public/button/btn_refresh_pushed.png'" disabledimage="file='../public/button/btn_refresh_normal.png' fade='80'" />
|
||||||
|
<Class name="btn_del_search" normalimage="../public/button/btn_del_search_normal_gray.png" hotimage="../public/button/btn_del_search_hover_gray.png" pushedimage="../public/button/btn_del_search_pushed_gray.png" />
|
||||||
|
|
||||||
|
<!--列表通用样式-->
|
||||||
|
<Class name="list" bkcolor="bk_wnd_lightcolor" width="strecth" margin="0,0,0,0" vscrollbar="true" />
|
||||||
|
<Class name="listitem" bkcolor="bk_wnd_lightcolor"
|
||||||
|
height="20" hotcolor="bk_listitem_hovered"
|
||||||
|
pushedcolor="bk_listitem_selected"
|
||||||
|
selectednormalcolor="bk_listitem_selected"
|
||||||
|
fadehot="false" />
|
||||||
|
|
||||||
|
<Class name="list_topitem" font="system_bold_20" width="strecth" margin="0,0,0,0"
|
||||||
|
hotcolor="bk_topitem_hovered" pushedcolor="bk_topitem_selected" selectednormalcolor="bk_topitem_selected" />
|
||||||
|
|
||||||
|
<!--进度条通用样式, 注意进度条的值使用`_value`属性-->
|
||||||
|
<Class name="progress_blue" valign="center" _value="0" bkimage="../public/progress/progress_blue_bg.png" height="3" width="stretch" hor="true" max="100" min="0" progressimage="../public/progress/progress_blue_fg.png" />
|
||||||
|
<Class name="slider_green" width="stretch" height="14" margin="4,0,0,0" valign="center" thumbsize="14,14" min="0" max="255" progressbarpadding="0,6,0,6" bkimage="file='../public/slider/slider_hor_bk.png' dest='0,6,1000,8'" progresscolor="bk_progress_progress" thumbnormalimage="../public/slider/slider_thumb.png" />
|
||||||
|
|
||||||
|
<!--菜单通用样式-->
|
||||||
|
<Class name="menu" width="auto" height="auto" bkcolor="bk_wnd_lightcolor" />
|
||||||
|
<Class name="menu_element" padding="20,0,20,0" height="40" hotcolor="bk_menuitem_hovered" pushedcolor="bk_menuitem_selected" selectednormalcolor="bk_menuitem_selected" />
|
||||||
|
<Class name="menu_text" normaltextcolor="darkcolor" font="system_14" valign="center" />
|
||||||
|
|
||||||
|
<!--分割线通用样式-->
|
||||||
|
<Class name="splitline_hor_level1" bkcolor="splitline_level1" height="1" />
|
||||||
|
<Class name="splitline_hor_level2" bkcolor="splitline_level2" height="1" />
|
||||||
|
<Class name="splitline_ver_level1" bkcolor="splitline_level1" width="1" />
|
||||||
|
|
||||||
|
<!--富文本控件通用样式-->
|
||||||
|
<Class name="simple" multiline="false" autohscroll="true" wantreturnmsg="true" wanttab="false" rich="false" normaltextcolor="darkcolor" disabledtextcolor="textdefaultdisablecolor" />
|
||||||
|
<Class name="prompt" promptmode="true" promptcolor="light_gray" />
|
||||||
|
<Class name="edit" hotimage="file='../public/edit/edit1.png' corner='10,10,10,10'" focusedimage="file='../public/edit/edit2.png' corner='10,10,10,10'" />
|
||||||
|
<Class name="input" normalimage="file='../public/edit/edit0.png' corner='10,10,10,10'" hotimage="file='../public/edit/edit0.png' corner='10,10,10,10'" focusedimage="file='../public/edit/edit0.png' corner='10,10,10,10'" disabledimage="file='../public/edit/edit0.png' corner='10,10,10,10' fade='80'" />
|
||||||
|
|
||||||
|
<!--头像蒙版-->
|
||||||
|
<Class name="icon_headimage_mask_40x40" width="40" height="40" bkimage="../public/headmask/icon_headimage_mask_40x40_normal.png" />
|
||||||
|
</Global>
|
@ -18,7 +18,6 @@
|
|||||||
<Button class="btn_global_blue_80x30" name="btn_send_data" width="100" text="发送" bkcolor="lightcolor" margin="25,3,5,3" />
|
<Button class="btn_global_blue_80x30" name="btn_send_data" width="100" text="发送" bkcolor="lightcolor" margin="25,3,5,3" />
|
||||||
<Button class="btn_global_blue_80x30" name="btn_close_uart" width="100" text="关闭" bkcolor="lightcolor" margin="25,3,5,3" />
|
<Button class="btn_global_blue_80x30" name="btn_close_uart" width="100" text="关闭" bkcolor="lightcolor" margin="25,3,5,3" />
|
||||||
<Button class="btn_global_blue_80x30" name="btn_save_lua" width="100" text="保存lua脚本" bkcolor="lightcolor" margin="25,3,5,3" />
|
<Button class="btn_global_blue_80x30" name="btn_save_lua" width="100" text="保存lua脚本" bkcolor="lightcolor" margin="25,3,5,3" />
|
||||||
|
|
||||||
</HBox>
|
</HBox>
|
||||||
<HBox height="40">
|
<HBox height="40">
|
||||||
<Button class="btn_global_blue_80x30" name="btn_do_lua" width="100" text="执行" bkcolor="lightcolor" margin="25,3,5,3" />
|
<Button class="btn_global_blue_80x30" name="btn_do_lua" width="100" text="执行" bkcolor="lightcolor" margin="25,3,5,3" />
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<ChildBox name="udp_form" width="stretch" height="stretch">
|
||||||
|
<VBox width="stretch" height="stretch">
|
||||||
|
<Label name="uart_info_label" text="当前串口: COM" margin="0,10,0,0" height="25" />
|
||||||
|
<HBox height="25" width="stretch">
|
||||||
|
<Label text="数据接收:" margin="0,10,0,0" height="25" width="stretch"/>
|
||||||
|
<Label text="lua脚本:" margin="0,10,0,0" height="25" width="stretch"/>
|
||||||
|
|
||||||
|
</HBox>
|
||||||
|
<HBox>
|
||||||
|
<RichEdit class="simple input" width="stretch" name="uart_recv_eidt" height="stretch" margin="5,5,5,5" padding="6,6,6" multiline="true" vscrollbar="true" hscrollbar="true" autovscroll="true" normaltextcolor="darkcolor" wantreturnmsg="true" rich="true" />
|
||||||
|
<RichEdit class="simple input" width="stretch" name="lua_script" height="stretch" margin="5,5,5,5" padding="6,6,6" multiline="true" vscrollbar="true" hscrollbar="true" autovscroll="true" normaltextcolor="darkcolor" wantreturnmsg="true" rich="true" />
|
||||||
|
</HBox>
|
||||||
|
<Label text="发送数据" height="25" />
|
||||||
|
<RichEdit class="simple input" width="stretch" name="uart_send_edit" height="30" margin="5,5,5,5" padding="6,6,6" />
|
||||||
|
<HBox height="40">
|
||||||
|
<Button class="btn_global_blue_80x30" name="btn_send_data" width="100" text="发送" bkcolor="lightcolor" margin="25,3,5,3" />
|
||||||
|
<Button class="btn_global_blue_80x30" name="btn_close_uart" width="100" text="关闭" bkcolor="lightcolor" margin="25,3,5,3" />
|
||||||
|
<Button class="btn_global_blue_80x30" name="btn_save_lua" width="100" text="保存lua脚本" bkcolor="lightcolor" margin="25,3,5,3" />
|
||||||
|
|
||||||
|
</HBox>
|
||||||
|
<HBox height="40">
|
||||||
|
<Button class="btn_global_blue_80x30" name="btn_do_lua" width="100" text="执行" bkcolor="lightcolor" margin="25,3,5,3" />
|
||||||
|
<RichEdit class="simple input" width="stretch" name="lua_do" height="30" margin="5,5,5,5" multiline="true" vscrollbar="true" hscrollbar="true" autovscroll="true" normaltextcolor="darkcolor" wantreturnmsg="true" rich="true" />
|
||||||
|
|
||||||
|
</HBox>
|
||||||
|
</VBox>
|
||||||
|
</ChildBox>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user