void fwknop_guiFrame::populate()
{

    NickTxt->ChangeValue(ourConfig->NICK_NAME);
    ServAddrTxt->ChangeValue(ourConfig->SERVER_IP);
    LegacyChk->SetValue(ourConfig->LEGACY);
    if (ourConfig->SERVER_PORT.CmpNoCase(wxT("Random")) == 0) {
    RandomChk->SetValue(true);
    } else {
        RandomChk->SetValue(false);
        ServPortTxt->SetValue(ourConfig->SERVER_PORT);
    }
    if (ourConfig->PROTOCOL.CmpNoCase(wxT("UDP")) == 0)
        ProtoChoice->SetSelection(0);
    else if (ourConfig->PROTOCOL.CmpNoCase(wxT("TCP")) == 0)
        ProtoChoice->SetSelection(1);
    else if (ourConfig->PROTOCOL.CmpNoCase(wxT("HTTP")) == 0)
        ProtoChoice->SetSelection(2);

    KeyTxt->SetValue(ourConfig->KEY);
    KeyB64Chk->SetValue(ourConfig->KEY_BASE64);
    HmacKeyTxt->SetValue(ourConfig->HMAC);
    HmacKeyB64Chk->SetValue(ourConfig->HMAC_BASE64);

    if (ourConfig->ACCESS_IP.CmpNoCase(wxT("Resolve IP")) == 0)
        AllowIPChoice->SetSelection(0);
    else if (ourConfig->ACCESS_IP.CmpNoCase(wxT("Source IP")) == 0)
        AllowIPChoice->SetSelection(1);
    else {
        AllowIPChoice->SetSelection(2);
        IPToAllowTxt->SetValue(ourConfig->ACCESS_IP);
    }

    if (ourConfig->MESS_TYPE.CmpNoCase(wxT("Open Port")) == 0)
        MessTypeChoice->SetSelection(0);
    else if (ourConfig->MESS_TYPE.CmpNoCase(wxT("Nat Access")) == 0)
        MessTypeChoice->SetSelection(1);
    else if (ourConfig->MESS_TYPE.CmpNoCase(wxT("Server Command")) == 0)
        MessTypeChoice->SetSelection(2);

    AccessPortsTxt->SetValue(ourConfig->PORTS);
    FwTimeTxt->SetValue(ourConfig->SERVER_TIMEOUT);
    InternalIPTxt->SetValue(ourConfig->NAT_IP);
    InternalPortTxt->SetValue(ourConfig->NAT_PORT);
    ServCmdTxt->SetValue(ourConfig->SERVER_CMD);
    OnChoice(*initMessTypeEvent);
    OnChoice(*initAllowIPEvent);
    OnChoice(*initCheckboxEvent);

}
Beispiel #2
0
void DeviceToolBar::ShowComboDialog(wxChoice *combo, const wxString &title)
{
   if (!combo || combo->GetCount() == 0) {
      wxMessageBox(_("Device information is not available."));
      return;
   }

#if USE_PORTMIXER
   wxArrayString inputSources = combo->GetStrings();

   wxDialog dlg(NULL, wxID_ANY, title);
   dlg.SetName(dlg.GetTitle());
   ShuttleGui S(&dlg, eIsCreating);
   wxChoice *c;

   S.StartVerticalLay(true);
   {
     S.StartHorizontalLay(wxCENTER, false);
      {
         c = S.AddChoice(combo->GetName(),
                         combo->GetStringSelection(),
                         &inputSources);
      }
      S.EndHorizontalLay();
      S.AddStandardButtons();
   }
   S.EndVerticalLay();

   dlg.SetSize(dlg.GetSizer()->GetMinSize());
   dlg.Center();

   if (dlg.ShowModal() == wxID_OK)
   {
      wxCommandEvent dummyEvent;
      dummyEvent.SetEventObject(combo);
      // SetSelection() doesn't send an event, so we call OnChoice explicitly
      combo->SetSelection(c->GetSelection());
      OnChoice(dummyEvent);
   }
#endif
}
Beispiel #3
0
NetPlaySetupFrame::NetPlaySetupFrame(wxWindow* const parent, const CGameListCtrl* const game_list)
    : wxFrame(parent, wxID_ANY, _("Dolphin NetPlay Setup")), m_game_list(game_list)
{
  IniFile inifile;
  inifile.Load(File::GetUserPath(D_CONFIG_IDX) + "Dolphin.ini");
  IniFile::Section& netplay_section = *inifile.GetOrCreateSection("NetPlay");

  wxPanel* const panel = new wxPanel(this);

  // top row
  wxBoxSizer* const trav_szr = new wxBoxSizer(wxHORIZONTAL);
  wxBoxSizer* const nick_szr = new wxBoxSizer(wxHORIZONTAL);
  {
    // Connection Config
    wxStaticText* const connectiontype_lbl = new wxStaticText(
        panel, wxID_ANY, _("Connection Type:"), wxDefaultPosition, wxSize(100, -1));

    m_direct_traversal = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxSize(150, -1));
    m_direct_traversal->Bind(wxEVT_CHOICE, &NetPlaySetupFrame::OnChoice, this);
    m_direct_traversal->Append(_("Direct Connection"));
    m_direct_traversal->Append(_("Traversal Server"));

    trav_szr->Add(connectiontype_lbl, 0, wxCENTER, 5);
    trav_szr->AddSpacer(5);
    trav_szr->Add(m_direct_traversal, 0, wxCENTER, 5);

    m_trav_reset_btn = new wxButton(panel, wxID_ANY, _("Reset Traversal Settings"),
                                    wxDefaultPosition, wxSize(-1, 25));
    m_trav_reset_btn->Bind(wxEVT_BUTTON, &NetPlaySetupFrame::OnResetTraversal, this);

    trav_szr->AddSpacer(5);

    trav_szr->Add(m_trav_reset_btn, 0, wxRIGHT);

    // Nickname
    wxStaticText* const nick_lbl =
        new wxStaticText(panel, wxID_ANY, _("Nickname:"), wxDefaultPosition, wxSize(100, -1));

    std::string nickname;
    netplay_section.Get("Nickname", &nickname, "Player");

    m_nickname_text =
        new wxTextCtrl(panel, wxID_ANY, StrToWxStr(nickname), wxDefaultPosition, wxSize(150, -1));

    nick_szr->Add(nick_lbl, 0, wxCENTER);
    nick_szr->Add(m_nickname_text, 0, wxALL, 5);

    std::string travChoice;
    netplay_section.Get("TraversalChoice", &travChoice, "direct");
    if (travChoice == "traversal")
    {
      m_direct_traversal->Select(1);
    }
    else
    {
      m_direct_traversal->Select(0);
    }

    std::string centralPort;
    GetTraversalPort(netplay_section, &centralPort);
    std::string centralServer;
    GetTraversalServer(netplay_section, &centralServer);

    m_traversal_lbl = new wxStaticText(panel, wxID_ANY, _("Traversal Server:") + " " +
                                                            centralServer + ":" + centralPort);
  }
  // tabs
  wxNotebook* const notebook = new wxNotebook(panel, wxID_ANY);
  wxPanel* const connect_tab = new wxPanel(notebook, wxID_ANY);
  notebook->AddPage(connect_tab, _("Connect"));
  wxPanel* const host_tab = new wxPanel(notebook, wxID_ANY);
  notebook->AddPage(host_tab, _("Host"));

  // connect tab
  {
    m_ip_lbl = new wxStaticText(connect_tab, wxID_ANY, _("Host Code :"));

    std::string address;
    netplay_section.Get("HostCode", &address, "00000000");
    m_connect_ip_text = new wxTextCtrl(connect_tab, wxID_ANY, StrToWxStr(address));

    m_client_port_lbl = new wxStaticText(connect_tab, wxID_ANY, _("Port :"));

    // string? w/e
    std::string port;
    netplay_section.Get("ConnectPort", &port, "2626");
    m_connect_port_text = new wxTextCtrl(connect_tab, wxID_ANY, StrToWxStr(port));

    wxButton* const connect_btn = new wxButton(connect_tab, wxID_ANY, _("Connect"));
    connect_btn->Bind(wxEVT_BUTTON, &NetPlaySetupFrame::OnJoin, this);

    wxStaticText* const alert_lbl = new wxStaticText(
        connect_tab, wxID_ANY,
        _("ALERT:\n\n"
          "All players must use the same Dolphin version.\n"
          "All memory cards, SD cards and cheats must be identical between players or disabled.\n"
          "If DSP LLE is used, DSP ROMs must be identical between players.\n"
          "If connecting directly, the host must have the chosen UDP port open/forwarded!\n"
          "\n"
          "Wiimote netplay is experimental and should not be expected to work.\n"));

    wxBoxSizer* const top_szr = new wxBoxSizer(wxHORIZONTAL);

    top_szr->Add(m_ip_lbl, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
    top_szr->Add(m_connect_ip_text, 3);
    top_szr->Add(m_client_port_lbl, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT | wxLEFT, 5);
    top_szr->Add(m_connect_port_text, 1);

    wxBoxSizer* const con_szr = new wxBoxSizer(wxVERTICAL);
    con_szr->Add(top_szr, 0, wxALL | wxEXPAND, 5);
    con_szr->AddStretchSpacer(1);
    con_szr->Add(alert_lbl, 0, wxLEFT | wxRIGHT | wxEXPAND, 5);
    con_szr->AddStretchSpacer(1);
    con_szr->Add(connect_btn, 0, wxALL | wxALIGN_RIGHT, 5);

    connect_tab->SetSizerAndFit(con_szr);
  }

  // host tab
  {
    m_host_port_lbl = new wxStaticText(host_tab, wxID_ANY, _("Port :"));

    // string? w/e
    std::string port;
    netplay_section.Get("HostPort", &port, "2626");
    m_host_port_text = new wxTextCtrl(host_tab, wxID_ANY, StrToWxStr(port));

    m_traversal_listen_port_enabled = new wxCheckBox(host_tab, wxID_ANY, _("Force Listen Port: "));
    m_traversal_listen_port = new wxSpinCtrl(host_tab, wxID_ANY, "", wxDefaultPosition,
                                             wxSize(80, -1), wxSP_ARROW_KEYS, 1, 65535);

    unsigned int listen_port;
    netplay_section.Get("ListenPort", &listen_port, 0);
    m_traversal_listen_port_enabled->SetValue(listen_port != 0);
    m_traversal_listen_port->Enable(m_traversal_listen_port_enabled->IsChecked());
    m_traversal_listen_port->SetValue(listen_port);

    m_traversal_listen_port_enabled->Bind(wxEVT_CHECKBOX,
                                          &NetPlaySetupFrame::OnTraversalListenPortChanged, this);
    m_traversal_listen_port->Bind(wxEVT_TEXT, &NetPlaySetupFrame::OnTraversalListenPortChanged,
                                  this);

    wxButton* const host_btn = new wxButton(host_tab, wxID_ANY, _("Host"));
    host_btn->Bind(wxEVT_BUTTON, &NetPlaySetupFrame::OnHost, this);

    m_game_lbox =
        new wxListBox(host_tab, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, nullptr, wxLB_SORT);
    m_game_lbox->Bind(wxEVT_LISTBOX_DCLICK, &NetPlaySetupFrame::OnHost, this);

    NetPlayDialog::FillWithGameNames(m_game_lbox, *game_list);

    wxBoxSizer* const top_szr = new wxBoxSizer(wxHORIZONTAL);
    top_szr->Add(m_host_port_lbl, 0, wxCENTER | wxRIGHT, 5);
    top_szr->Add(m_host_port_text, 0);
#ifdef USE_UPNP
    m_upnp_chk = new wxCheckBox(host_tab, wxID_ANY, _("Forward port (UPnP)"));
    top_szr->Add(m_upnp_chk, 0, wxALL, 5);
#endif
    wxBoxSizer* const bottom_szr = new wxBoxSizer(wxHORIZONTAL);
    bottom_szr->Add(m_traversal_listen_port_enabled, 0, wxCENTER | wxLEFT, 5);
    bottom_szr->Add(m_traversal_listen_port, 0, wxCENTER, 0);
    wxBoxSizer* const host_btn_szr = new wxBoxSizer(wxVERTICAL);
    host_btn_szr->Add(host_btn, 0, wxCENTER | wxALIGN_RIGHT, 0);
    bottom_szr->Add(host_btn_szr, 1, wxALL, 5);

    wxBoxSizer* const host_szr = new wxBoxSizer(wxVERTICAL);
    host_szr->Add(top_szr, 0, wxALL | wxEXPAND, 5);
    host_szr->Add(m_game_lbox, 1, wxLEFT | wxRIGHT | wxEXPAND, 5);
    host_szr->Add(bottom_szr, 0, wxEXPAND, 0);

    host_tab->SetSizerAndFit(host_szr);
  }

  // bottom row
  wxButton* const quit_btn = new wxButton(panel, wxID_ANY, _("Quit"));
  quit_btn->Bind(wxEVT_BUTTON, &NetPlaySetupFrame::OnQuit, this);

  // main sizer
  wxBoxSizer* const main_szr = new wxBoxSizer(wxVERTICAL);
  main_szr->Add(trav_szr, 0, wxALL | wxALIGN_LEFT, 5);
  main_szr->Add(nick_szr, 0, wxALL | wxALIGN_LEFT, 5);
  main_szr->Add(m_traversal_lbl, 0, wxALL | wxALIGN_LEFT, 5);
  main_szr->Add(notebook, 1, wxLEFT | wxRIGHT | wxEXPAND, 5);
  main_szr->Add(quit_btn, 0, wxALL | wxALIGN_RIGHT, 5);

  panel->SetSizerAndFit(main_szr);

  // wxBoxSizer* const diag_szr = new wxBoxSizer(wxVERTICAL);
  // diag_szr->Add(panel, 1, wxEXPAND);
  // SetSizerAndFit(diag_szr);

  main_szr->SetSizeHints(this);

  Center();
  Show();

  //  Needs to be done last or it set up the spacing on the page correctly
  wxCommandEvent ev;
  OnChoice(ev);
}
fwknop_guiFrame::fwknop_guiFrame(wxFrame *frame, const wxString& title)
    : wxFrame(frame, wxID_ANY, title, wxPoint(-1, -1), wxSize(800, 600))
{
#if wxUSE_MENUS
    // create a menu bar
    wxMenuBar* mbar = new wxMenuBar();
    wxMenu* fileMenu = new wxMenu(_T(""));
    fileMenu->Append(idMenuSettings, _("Settings"));
    fileMenu->Append(idMenuNew, _("&New Config"));
    fileMenu->Append(idMenuDelete, _("&Delete Config"));
    fileMenu->Append(idMenuQuit, _("&Quit\tAlt-F4"), _("Quit the application"));
    mbar->Append(fileMenu, _("&File"));

    wxMenu* helpMenu = new wxMenu(_T(""));
    helpMenu->Append(idMenuAbout, _("&About\tF1"), _("Show info about this application"));
    helpMenu->Append(idMenuHelpScreen, _("&Help Screen"), _("Show help screen"));
    mbar->Append(helpMenu, _("&Help"));

    SetMenuBar(mbar);
#endif // wxUSE_MENUS


// So this will be where we set up the gui. All the interesting things will happen in event handlers


wxPanel *configPanel = new wxPanel(this, wxID_ANY);
curl_global_init(CURL_GLOBAL_DEFAULT);
wxColour *BackGround = new wxColour(233,233,233);
this->SetBackgroundColour(*BackGround);

hbox = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *vListBox = new wxBoxSizer(wxVERTICAL);
vConfigBox = new wxBoxSizer(wxVERTICAL);

//The following are the sizers for each line of config:
wxBoxSizer *hNickBox = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *hServAddrBox = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *hLegacyBox = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *hRandomBox = new wxBoxSizer(wxHORIZONTAL);
hServPortBox = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *hProtoBox = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *hKeyBox = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *hKeyB64Box = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *hHmacKeyBox = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *hHmacB64Box = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *hAllowIPBox = new wxBoxSizer(wxHORIZONTAL);
hIPToAllowBox = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *hMessTypeBox = new wxBoxSizer(wxHORIZONTAL);
hAccessPortsBox = new wxBoxSizer(wxHORIZONTAL);
hFwTimeBox = new wxBoxSizer(wxHORIZONTAL);
hInternalIPBox = new wxBoxSizer(wxHORIZONTAL);
hInternalPortBox = new wxBoxSizer(wxHORIZONTAL);
hServCmdBox = new wxBoxSizer(wxHORIZONTAL);
initMessTypeEvent = new wxCommandEvent(wxEVT_COMMAND_CHOICE_SELECTED, ID_MessType);
initAllowIPEvent = new wxCommandEvent(wxEVT_COMMAND_CHOICE_SELECTED, ID_AllowIP);
initCheckboxEvent = new wxCommandEvent(wxEVT_COMMAND_CHOICE_SELECTED, ID_Random);
configFile = new wxFileConfig (wxT("fwknop-gui"));
ourConfigList = new wxArrayString;
ourConfig = new Config;


wxButton *save = new wxButton(configPanel, ID_SaveButton, wxT("Save Config"));


wxStaticText *NickLbl = new wxStaticText(configPanel,wxID_ANY, wxT("Nickname: "));
NickTxt = new wxTextCtrl(configPanel, wxID_ANY);

hNickBox->Add(NickLbl,0,wxALIGN_BOTTOM);
hNickBox->Add(NickTxt,1, wxEXPAND);


wxStaticText *ServAddrLbl = new wxStaticText(configPanel,wxID_ANY, wxT("Server Address: "));
ServAddrTxt = new wxTextCtrl(configPanel, wxID_ANY);

hServAddrBox->Add(ServAddrLbl,0,wxALIGN_BOTTOM);
hServAddrBox->Add(ServAddrTxt,1, wxEXPAND);


LegacyChk = new wxCheckBox(configPanel, wxID_ANY,wxT("Use Legacy Mode"));
hLegacyBox->Add(LegacyChk);

RandomChk = new wxCheckBox(configPanel, ID_Random,wxT("Use Random Port"));
hRandomBox->Add(RandomChk);

wxStaticText *ServPortLbl = new wxStaticText(configPanel,wxID_ANY, wxT("Server Port: "));
ServPortTxt = new wxTextCtrl(configPanel, wxID_ANY,wxT("62201"));

hServPortBox->Add(ServPortLbl,0,wxALIGN_BOTTOM);
hServPortBox->Add(ServPortTxt,1, wxEXPAND);


wxStaticText *ProtoLbl = new wxStaticText(configPanel,wxID_ANY, wxT("Protocol: "));

wxArrayString Protos;
Protos.Add(wxT("UDP"));
Protos.Add(wxT("TCP"));
Protos.Add(wxT("HTTP"));
ProtoChoice = new wxChoice(configPanel,wxID_ANY, wxDefaultPosition, wxDefaultSize,
   Protos);

hProtoBox->Add(ProtoLbl,0,wxALIGN_BOTTOM);
hProtoBox->Add(ProtoChoice);
ProtoChoice->SetSelection(0);

wxStaticText *KeyLbl = new wxStaticText(configPanel,wxID_ANY, wxT("Rijndael Key: "));
KeyTxt = new wxTextCtrl(configPanel, wxID_ANY);

hKeyBox->Add(KeyLbl,0,wxALIGN_BOTTOM);
hKeyBox->Add(KeyTxt,1, wxEXPAND);


KeyB64Chk = new wxCheckBox(configPanel, wxID_ANY,wxT("Key Is Base 64"));

hKeyB64Box->Add(KeyB64Chk);


wxStaticText *HmacKeyLbl = new wxStaticText(configPanel,wxID_ANY, wxT("HMAC Key: "));
HmacKeyTxt = new wxTextCtrl(configPanel, wxID_ANY);

hHmacKeyBox->Add(HmacKeyLbl,0,wxALIGN_BOTTOM);
hHmacKeyBox->Add(HmacKeyTxt,1, wxEXPAND);


HmacKeyB64Chk = new wxCheckBox(configPanel, wxID_ANY,wxT("HMAC Is Base 64"));

hHmacB64Box->Add(HmacKeyB64Chk);


wxStaticText *AllowIPLbl = new wxStaticText(configPanel,wxID_ANY, wxT("Allow IP: "));

wxArrayString AllowIP;
AllowIP.Add(wxT("Resolve IP"));
AllowIP.Add(wxT("Source IP"));
AllowIP.Add(wxT("Allow IP"));

AllowIPChoice = new wxChoice(configPanel, ID_AllowIP, wxDefaultPosition, wxDefaultSize,
   AllowIP);


hAllowIPBox->Add(AllowIPLbl,0,wxALIGN_BOTTOM);
hAllowIPBox->Add(AllowIPChoice);
AllowIPChoice->SetSelection(0);

wxStaticText *IPToAllowLbl = new wxStaticText(configPanel,wxID_ANY, wxT("IP To Allow: "));
IPToAllowTxt = new wxTextCtrl(configPanel, wxID_ANY);

hIPToAllowBox->Add(IPToAllowLbl,0,wxALIGN_BOTTOM);
hIPToAllowBox->Add(IPToAllowTxt,1, wxEXPAND);


wxStaticText *MessTypeLbl = new wxStaticText(configPanel,wxID_ANY, wxT("Message Type: "));

wxArrayString MessType;
MessType.Add(wxT("Open Port"));
MessType.Add(wxT("Nat Access"));
MessType.Add(wxT("Server Command"));
MessTypeChoice = new wxChoice(configPanel,ID_MessType, wxDefaultPosition, wxDefaultSize,
   MessType);

hMessTypeBox->Add(MessTypeLbl,0,wxALIGN_BOTTOM);
hMessTypeBox->Add(MessTypeChoice);
MessTypeChoice->SetSelection(0);




wxStaticText *AccessPortsLbl = new wxStaticText(configPanel,wxID_ANY, wxT("Access Ports: "));
AccessPortsTxt = new wxTextCtrl(configPanel, wxID_ANY, wxT("tcp/22"));

hAccessPortsBox->Add(AccessPortsLbl,0,wxALIGN_BOTTOM);
hAccessPortsBox->Add(AccessPortsTxt,1, wxEXPAND);


wxStaticText *FwTimeLbl = new wxStaticText(configPanel,wxID_ANY, wxT("Firewall Timeout: "));
FwTimeTxt = new wxTextCtrl(configPanel, wxID_ANY, wxT("60"));

hFwTimeBox->Add(FwTimeLbl,0,wxALIGN_BOTTOM);
hFwTimeBox->Add(FwTimeTxt,1, wxEXPAND);


wxStaticText *InternalIPLbl = new wxStaticText(configPanel,wxID_ANY, wxT("Internal IP: "));
InternalIPTxt = new wxTextCtrl(configPanel, wxID_ANY);

hInternalIPBox->Add(InternalIPLbl,0,wxALIGN_BOTTOM);
hInternalIPBox->Add(InternalIPTxt,1, wxEXPAND);


wxStaticText *InternalPortLbl = new wxStaticText(configPanel,wxID_ANY, wxT("Internal Port: "));
InternalPortTxt = new wxTextCtrl(configPanel, wxID_ANY);

hInternalPortBox->Add(InternalPortLbl,0,wxALIGN_BOTTOM);
hInternalPortBox->Add(InternalPortTxt,1, wxEXPAND);


wxStaticText *ServCmdLbl = new wxStaticText(configPanel,wxID_ANY, wxT("Server Command: "));
ServCmdTxt = new wxTextCtrl(configPanel, wxID_ANY);

hServCmdBox->Add(ServCmdLbl,0,wxALIGN_BOTTOM);
hServCmdBox->Add(ServCmdTxt,1, wxEXPAND);


listbox = new wxListBox(configPanel, ID_List, wxPoint(-1, -1), wxSize(200, -1));
ourConfig->getAllConfigs(ourConfigList, configFile);
listbox->InsertItems(*ourConfigList,0);

wxButton *ok = new wxButton(configPanel, ID_KnockButton, wxT("Send Knock"));



vListBox->Add(listbox,1,wxBOTTOM, 50);
vListBox->Add(ok);


hbox->Add(vListBox, 0, wxEXPAND);

vConfigBox->Add(hNickBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hServAddrBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hLegacyBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hRandomBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hServPortBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hProtoBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hKeyBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hKeyB64Box,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hHmacKeyBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hHmacB64Box,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hAllowIPBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hIPToAllowBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hMessTypeBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hAccessPortsBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hFwTimeBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hInternalIPBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hInternalPortBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(hServCmdBox,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);
vConfigBox->Add(save,1,wxALIGN_LEFT | wxEXPAND | wxALL,2);

OnChoice(*initMessTypeEvent);
OnChoice(*initAllowIPEvent);

hbox->Add(vConfigBox, 1, wxALIGN_CENTER_HORIZONTAL | wxTOP, 5);
configPanel->SetSizer(hbox);

}