add protodebuger
This commit is contained in:
parent
e0afe13a45
commit
d99f89c44f
@ -100,7 +100,7 @@ void NewMonitorForm::InitWindow()
|
|||||||
ui::Button* btn_add_new = dynamic_cast<ui::Button*>(FindControl(L"open_button"));
|
ui::Button* btn_add_new = dynamic_cast<ui::Button*>(FindControl(L"open_button"));
|
||||||
if (nullptr != btn_add_new) {
|
if (nullptr != btn_add_new) {
|
||||||
btn_add_new->AttachClick([this](ui::EventArgs*) {
|
btn_add_new->AttachClick([this](ui::EventArgs*) {
|
||||||
if(m_uart_select_combo->GetText() != L""){
|
if(m_combo_type->GetText() == L"uart"){
|
||||||
UINT PortNum = 0;
|
UINT PortNum = 0;
|
||||||
for (int i = 3; m_uart_select_combo->GetText()[i] != '\0'; i++) //תťťÎŞĘý×Ö
|
for (int i = 3; m_uart_select_combo->GetText()[i] != '\0'; i++) //תťťÎŞĘý×Ö
|
||||||
{
|
{
|
||||||
@ -128,6 +128,10 @@ void NewMonitorForm::InitWindow()
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (m_combo_type->GetText() == L"tcp_client") {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -187,6 +191,7 @@ void NewMonitorForm::InitWindow()
|
|||||||
m_ip_config_vbox = dynamic_cast<ui::VBox*>(FindControl(L"ip_config"));
|
m_ip_config_vbox = dynamic_cast<ui::VBox*>(FindControl(L"ip_config"));
|
||||||
m_uart_config_vbox = dynamic_cast<ui::VBox*>(FindControl(L"uart_config"));
|
m_uart_config_vbox = dynamic_cast<ui::VBox*>(FindControl(L"uart_config"));
|
||||||
|
|
||||||
|
|
||||||
m_uart_select_combo = dynamic_cast<ui::Combo*>(FindControl(L"uart_type"));
|
m_uart_select_combo = dynamic_cast<ui::Combo*>(FindControl(L"uart_type"));
|
||||||
m_uart_select_combo->AttachAllEvents([this](ui::EventArgs* ev) {
|
m_uart_select_combo->AttachAllEvents([this](ui::EventArgs* ev) {
|
||||||
if (ev->Type == 42) {
|
if (ev->Type == 42) {
|
||||||
@ -196,6 +201,8 @@ void NewMonitorForm::InitWindow()
|
|||||||
});
|
});
|
||||||
|
|
||||||
m_uart_baurate_select = dynamic_cast<ui::Combo*>(FindControl(L"uart_baurate_select"));
|
m_uart_baurate_select = dynamic_cast<ui::Combo*>(FindControl(L"uart_baurate_select"));
|
||||||
|
m_ip_select = dynamic_cast<ui::RichEdit*>(FindControl(L"ip_edit"));
|
||||||
|
m_port_select= dynamic_cast<ui::RichEdit*>(FindControl(L"port_input"));
|
||||||
|
|
||||||
m_combo_type->AttachAllEvents([this](ui::EventArgs* ev) {
|
m_combo_type->AttachAllEvents([this](ui::EventArgs* ev) {
|
||||||
if (nullptr != ev) {
|
if (nullptr != ev) {
|
||||||
@ -253,6 +260,9 @@ void NewMonitorForm::InitWindow()
|
|||||||
(text == L"udp client") || (text == L"udp server")) {
|
(text == L"udp client") || (text == L"udp server")) {
|
||||||
this->m_ip_config_vbox->SetVisible(true);
|
this->m_ip_config_vbox->SetVisible(true);
|
||||||
this->m_uart_config_vbox->SetVisible(false);
|
this->m_uart_config_vbox->SetVisible(false);
|
||||||
|
|
||||||
|
m_ip_select->SetText(L"127.0.0.1");
|
||||||
|
m_port_select->SetText(L"9001");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,10 @@ private:
|
|||||||
ui::VBox* m_uart_config_vbox;
|
ui::VBox* m_uart_config_vbox;
|
||||||
ui::Combo* m_uart_select_combo;
|
ui::Combo* m_uart_select_combo;
|
||||||
ui::Combo* m_uart_baurate_select;
|
ui::Combo* m_uart_baurate_select;
|
||||||
|
|
||||||
|
ui::RichEdit* m_ip_select;
|
||||||
|
ui::RichEdit* m_port_select;
|
||||||
|
|
||||||
ui::Combo* m_combo_type;
|
ui::Combo* m_combo_type;
|
||||||
ui::Window* m_parent;
|
ui::Window* m_parent;
|
||||||
|
|
||||||
|
@ -172,6 +172,9 @@
|
|||||||
<ClInclude Include="uart_process.h" />
|
<ClInclude Include="uart_process.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Xml Include="..\Debug\resources\themes\default\basic\basic.xml" />
|
||||||
|
<Xml Include="..\Debug\resources\themes\default\basic\newmonitor.xml" />
|
||||||
|
<Xml Include="..\Debug\resources\themes\default\basic\uart_form.xml" />
|
||||||
<Xml Include="..\Debug\resources\themes\default\global.xml" />
|
<Xml Include="..\Debug\resources\themes\default\global.xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -55,6 +55,15 @@
|
|||||||
<Xml Include="..\Debug\resources\themes\default\global.xml">
|
<Xml Include="..\Debug\resources\themes\default\global.xml">
|
||||||
<Filter>资源文件</Filter>
|
<Filter>资源文件</Filter>
|
||||||
</Xml>
|
</Xml>
|
||||||
|
<Xml Include="..\Debug\resources\themes\default\basic\basic.xml">
|
||||||
|
<Filter>资源文件</Filter>
|
||||||
|
</Xml>
|
||||||
|
<Xml Include="..\Debug\resources\themes\default\basic\newmonitor.xml">
|
||||||
|
<Filter>资源文件</Filter>
|
||||||
|
</Xml>
|
||||||
|
<Xml Include="..\Debug\resources\themes\default\basic\uart_form.xml">
|
||||||
|
<Filter>资源文件</Filter>
|
||||||
|
</Xml>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="proto_debuger.rc">
|
<ResourceCompile Include="proto_debuger.rc">
|
||||||
|
0
examples/proto_debuger/tcpclient_process.cpp
Normal file
0
examples/proto_debuger/tcpclient_process.cpp
Normal file
24
examples/proto_debuger/tcpclient_process.h
Normal file
24
examples/proto_debuger/tcpclient_process.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
// C runtime header
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <malloc.h>
|
||||||
|
#include <memory.h>
|
||||||
|
#include <tchar.h>
|
||||||
|
|
||||||
|
// base header
|
||||||
|
#include "base/base.h"
|
||||||
|
#include "serial_port.h"
|
||||||
|
// duilib
|
||||||
|
#include "duilib/UIlib.h"
|
||||||
|
|
||||||
|
|
||||||
|
class TcpclientForm : public ui::ChildBox
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user