no message
This commit is contained in:
parent
2e8a7cbc8a
commit
a8e4de2236
@ -135,6 +135,26 @@ void UartForm::Init()
|
||||
return true;
|
||||
});
|
||||
}
|
||||
auto mBtnSaveLua = static_cast<ui::Button*>(FindSubControl(L"btn_save_lua"));
|
||||
if (nullptr != mBtnSaveLua) {
|
||||
mBtnSaveLua->AttachClick([this](ui::EventArgs*) {
|
||||
std::cout << "±£´ælua½Å±¾\r\n";
|
||||
std::string lua = wstring2string(mEditLua->GetText());
|
||||
if (0 == this->mLua->UpdateScript(lua)) {
|
||||
this->mLuaScript = lua;
|
||||
mLuaFileEdit = std::ofstream(UART_LUA_SCRIPT, std::ios::out | std::ios::trunc);
|
||||
mLuaFileEdit.write(lua.c_str(), lua.size());
|
||||
mLuaFileEdit.flush();
|
||||
mLuaFileEdit.close();
|
||||
}
|
||||
else {
|
||||
MessageBox(0, L"lua½Å±¾´íÎó", L"", 0);
|
||||
return true;
|
||||
}
|
||||
std::cout << lua.c_str() << "\r\n";
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
auto mBtnClose = static_cast<ui::Button*>(FindSubControl(L"btn_close_uart"));
|
||||
if (mBtnClose != nullptr) {
|
||||
|
@ -7,18 +7,18 @@
|
||||
</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="80" bkimage="file='../public/combo/normal.png' corner='5,5,30,5'"/>
|
||||
<Combo class="list" name="combo_type" height="30" width="120" 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="80" bkimage="file='../public/combo/normal.png' corner='5,5,30,5'"/>
|
||||
<Combo class="list" name="uart_type" height="30" width="120" 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="80" bkimage="file='../public/combo/normal.png' corner='5,5,30,5'"/>
|
||||
<Combo class="list" name="uart_baurate_select" height="30" width="120" bkimage="file='../public/combo/normal.png' corner='5,5,30,5'"/>
|
||||
<Control width="stretch"/>
|
||||
</HBox>
|
||||
</VBox>
|
||||
|
@ -16,12 +16,6 @@
|
||||
<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" />
|
||||
<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"/>
|
||||
<RichEdit class="simple input" name="cycle_eidt" width="50" margin="5,5,5,5" padding="6,6,6" />
|
||||
<Label text="ms" margin="5,5,5,5" width="50" />
|
||||
<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" />
|
||||
<Button class="btn_global_blue_80x30" name="btn_save_lua" width="100" text="保存lua脚本" bkcolor="lightcolor" margin="25,3,5,3" />
|
||||
|
||||
|
@ -17,12 +17,6 @@
|
||||
<RichEdit class="simple input" width="stretch" name="server_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" />
|
||||
<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"/>
|
||||
<RichEdit class="simple input" name="cycle_eidt" width="50" margin="5,5,5,5" padding="6,6,6" />
|
||||
<Label text="ms" margin="5,5,5,5" width="50" />
|
||||
<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" />
|
||||
<Label name="title" text="客户端:" width="60" valign="bottom" margin="0,0,0,0" height="30" font="arial_14"/>
|
||||
<Combo class="list" name="clients" width="100" height="30" bkimage="file='../public/combo/normal.png' corner='5,5,30,5'"/>
|
||||
|
@ -22,6 +22,7 @@
|
||||
<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" />
|
||||
<Button class="btn_global_blue_80x30" name="btn_save_lua" width="100" text="保存lua脚本" bkcolor="lightcolor" margin="25,3,5,3" />
|
||||
</HBox>
|
||||
</VBox>
|
||||
</ChildBox>
|
||||
|
Loading…
Reference in New Issue
Block a user