58 : wxDialog(parent, wxID_ANY,
_(
L(
"Network lookup")), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
59 ,
list(
new wxListView(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSIMPLE_BORDER))
61 ,
label(
new wxStaticText(
this, wxID_ANY,
""))
62 ,
timer(
new wxTimer())
65{
66 const int em = GUI::wxGetApp().em_unit();
67 list->SetMinSize(wxSize(80 * em, 30 * em));
68
69 wxBoxSizer *vsizer = new wxBoxSizer(wxVERTICAL);
70
71 vsizer->Add(
label, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, em);
72
73 list->SetSingleStyle(wxLC_SINGLE_SEL);
74 list->SetSingleStyle(wxLC_SORT_DESCENDING);
75 list->AppendColumn(
_(
L(
"Address")), wxLIST_FORMAT_LEFT, 5 * em);
76 list->AppendColumn(
_(
L(
"Hostname")), wxLIST_FORMAT_LEFT, 10 * em);
77 list->AppendColumn(
_(
L(
"Service name")), wxLIST_FORMAT_LEFT, 20 * em);
79 list->AppendColumn(
_(
L(
"OctoPrint version")), wxLIST_FORMAT_LEFT, 5 * em);
80 }
81
82 vsizer->Add(
list, 1, wxEXPAND | wxALL, em);
83
84 wxBoxSizer *button_sizer = new wxBoxSizer(wxHORIZONTAL);
85 button_sizer->Add(new wxButton(this, wxID_OK, "OK"), 0, wxALL, em);
86 button_sizer->Add(new wxButton(this, wxID_CANCEL, "Cancel"), 0, wxALL, em);
87
88
89 vsizer->Add(button_sizer, 0, wxALIGN_CENTER);
90 SetSizerAndFit(vsizer);
91
93
94 Bind(EVT_BONJOUR_COMPLETE, [this](wxCommandEvent &) {
96 });
97
99 GUI::wxGetApp().UpdateDlgDarkUI(this);
100}
void on_timer(wxTimerEvent &)
Definition BonjourDialog.cpp:218
Slic3r::PrinterTechnology tech
Definition BonjourDialog.hpp:46
std::unique_ptr< ReplySet > replies
Definition BonjourDialog.hpp:41
std::unique_ptr< wxTimer > timer
Definition BonjourDialog.hpp:44
wxStaticText * label
Definition BonjourDialog.hpp:42
virtual void on_reply(BonjourReplyEvent &)
Definition BonjourDialog.cpp:166
wxListView * list
Definition BonjourDialog.hpp:40
unsigned timer_state
Definition BonjourDialog.hpp:45
#define _(msgid)
Definition getopt.c:87
@ ptFFF
Definition Config.hpp:207
#define L(s)
Definition I18N.hpp:18