no message
This commit is contained in:
parent
df8e3ca54c
commit
516c82850d
@ -92,18 +92,21 @@ void NewMonitorForm::InitWindow()
|
|||||||
element->SetText(nbase::StringPrintf(L"udp server"));
|
element->SetText(nbase::StringPrintf(L"udp server"));
|
||||||
combo_add_new->Add(element);
|
combo_add_new->Add(element);
|
||||||
}
|
}
|
||||||
|
ui::VBox* ip_config_vbox = dynamic_cast<ui::VBox*>(FindControl(L"ip_config"));
|
||||||
|
ui::VBox* uart_config_vbox = dynamic_cast<ui::VBox*>(FindControl(L"uart_config"));
|
||||||
|
|
||||||
combo_add_new->AttachAllEvents([this](ui::EventArgs* ev) {
|
combo_add_new->AttachAllEvents([this, uart_config_vbox, ip_config_vbox](ui::EventArgs* ev) {
|
||||||
if (nullptr != ev) {
|
if (nullptr != ev) {
|
||||||
auto p = static_cast<ui::Combo*>(ev->pSender);
|
auto p = static_cast<ui::Combo*>(ev->pSender);
|
||||||
|
|
||||||
if (ev->Type == 42) {
|
if (ev->Type == 42) {
|
||||||
auto text = p->GetText();
|
auto text = p->GetText();
|
||||||
wprintf(L"%s\r\n", text.c_str());
|
wprintf(L"%s\r\n", text.c_str());
|
||||||
|
|
||||||
|
if (text == L"uart") {
|
||||||
|
ip_config_vbox->SetVisible(true);
|
||||||
|
uart_config_vbox->SetVisible(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
printf("%d\r\n", ev->Type);
|
|
||||||
auto text = p->GetText();
|
|
||||||
wprintf(L"%s\r\n", text.c_str());
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user