diff --git a/EAPMethods/locale/EAPMethods.pot b/EAPMethods/locale/EAPMethods.pot index 5d365ba..9c55af4 100644 --- a/EAPMethods/locale/EAPMethods.pot +++ b/EAPMethods/locale/EAPMethods.pot @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: EAPMethods\n" -"POT-Creation-Date: 2017-01-31 11:11+0100\n" +"POT-Creation-Date: 2017-01-31 14:57+0100\n" "PO-Revision-Date: 2016-06-02 12:27+0200\n" "Last-Translator: Simon Rozman \n" "Language-Team: Amebis, d. o. o., Kamnik \n" @@ -481,6 +481,22 @@ msgstr "" msgid "Configuring EAP method failed (error %u)." msgstr "" +#: master/lib/GTC_UI/res/wxGTC_UI.cpp:16 +msgid "GTC Challenge" +msgstr "" + +#: master/lib/GTC_UI/res/wxGTC_UI.cpp:26 +msgid "Please provide your response." +msgstr "" + +#: master/lib/GTC_UI/res/wxGTC_UI.cpp:38 +msgid "Server challenge" +msgstr "" + +#: master/lib/GTC_UI/res/wxGTC_UI.cpp:43 +msgid "Enter your response here" +msgstr "" + #: master/lib/GTC_UI/src/GTC_UI.cpp:33 msgid "GTC User ID" msgstr "" @@ -836,7 +852,7 @@ msgstr "" msgid "Check if you would like to save credentials" msgstr "" -#: master/lib/EAPBase_UI/include/EAP_UI.h:1118 +#: master/lib/EAPBase_UI/include/EAP_UI.h:1123 #: ver1.0/lib/EAPBase_UI/include/EAP_UI.h:1000 #: ver1.1/lib/EAPBase_UI/include/EAP_UI.h:1069 msgid "" diff --git a/lib/GTC_UI/build/GTC_UI.vcxproj b/lib/GTC_UI/build/GTC_UI.vcxproj index dc8046c..48f72ca 100644 --- a/lib/GTC_UI/build/GTC_UI.vcxproj +++ b/lib/GTC_UI/build/GTC_UI.vcxproj @@ -80,9 +80,11 @@ + + Create @@ -96,6 +98,9 @@ {d63f24bd-92a0-4d6b-8b69-ed947e4d2b1b} + + + diff --git a/lib/GTC_UI/build/GTC_UI.vcxproj.filters b/lib/GTC_UI/build/GTC_UI.vcxproj.filters index be2a6dc..6bdbb43 100644 --- a/lib/GTC_UI/build/GTC_UI.vcxproj.filters +++ b/lib/GTC_UI/build/GTC_UI.vcxproj.filters @@ -21,6 +21,9 @@ Header Files + + Header Files + @@ -29,5 +32,13 @@ Source Files + + Source Files + + + + + Resource Files + \ No newline at end of file diff --git a/lib/GTC_UI/include/GTC_UI.h b/lib/GTC_UI/include/GTC_UI.h index b97d67a..6f231bd 100644 --- a/lib/GTC_UI/include/GTC_UI.h +++ b/lib/GTC_UI/include/GTC_UI.h @@ -22,6 +22,7 @@ #include "../../GTC/include/Config.h" class wxGTCConfigPanel; +class wxGTCResponsePanel; /// \addtogroup EAPBaseGUI /// @{ @@ -40,6 +41,8 @@ typedef wxEAPCredentialsConfigPanel #include @@ -74,4 +77,17 @@ protected: wxGTCCredentialsConfigPanel *m_credentials; ///< Credentials configuration panel }; + +/// +/// GTC challenge/response panel +/// +class wxGTCResponsePanel : public wxGTCResponsePanelBase +{ +public: + /// + /// Constructs a panel + /// + wxGTCResponsePanel(const eap::config_provider &prov, eap::config_method_eapgtc &cfg, wxWindow* parent); +}; + /// @} diff --git a/lib/GTC_UI/res/wxGTC_UI.cpp b/lib/GTC_UI/res/wxGTC_UI.cpp new file mode 100644 index 0000000..65a8484 --- /dev/null +++ b/lib/GTC_UI/res/wxGTC_UI.cpp @@ -0,0 +1,63 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 17 2015) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include + +#include "wxGTC_UI.h" + +/////////////////////////////////////////////////////////////////////////// + +wxGTCResponsePanelBase::wxGTCResponsePanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +{ + m_sb_response = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("GTC Challenge") ), wxVERTICAL ); + + wxBoxSizer* sb_response_horiz; + sb_response_horiz = new wxBoxSizer( wxHORIZONTAL ); + + m_response_icon = new wxStaticBitmap( m_sb_response->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + sb_response_horiz->Add( m_response_icon, 0, wxALL, 5 ); + + m_sb_response_vert = new wxBoxSizer( wxVERTICAL ); + + m_response_label = new wxStaticText( m_sb_response->GetStaticBox(), wxID_ANY, _("Please provide your response."), wxDefaultPosition, wxDefaultSize, 0 ); + m_response_label->Wrap( 440 ); + m_sb_response_vert->Add( m_response_label, 0, wxALL|wxEXPAND, 5 ); + + wxFlexGridSizer* sb_response_tbl; + sb_response_tbl = new wxFlexGridSizer( 0, 2, 5, 5 ); + sb_response_tbl->AddGrowableCol( 1 ); + sb_response_tbl->SetFlexibleDirection( wxBOTH ); + sb_response_tbl->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_challenge = new wxStaticText( m_sb_response->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_challenge->Wrap( -1 ); + m_challenge->SetToolTip( _("Server challenge") ); + + sb_response_tbl->Add( m_challenge, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_response = new wxTextCtrl( m_sb_response->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_response->SetToolTip( _("Enter your response here") ); + + sb_response_tbl->Add( m_response, 2, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + + + m_sb_response_vert->Add( sb_response_tbl, 0, wxEXPAND|wxALL, 5 ); + + + sb_response_horiz->Add( m_sb_response_vert, 1, wxEXPAND, 5 ); + + + m_sb_response->Add( sb_response_horiz, 0, wxEXPAND, 5 ); + + + this->SetSizer( m_sb_response ); + this->Layout(); +} + +wxGTCResponsePanelBase::~wxGTCResponsePanelBase() +{ +} diff --git a/lib/GTC_UI/res/wxGTC_UI.fbp b/lib/GTC_UI/res/wxGTC_UI.fbp new file mode 100644 index 0000000..e8127c5 --- /dev/null +++ b/lib/GTC_UI/res/wxGTC_UI.fbp @@ -0,0 +1,470 @@ + + + + + ; + C++ + 1 + source_name + 0 + 0 + . + UTF-8 + connect + wxGTC_UI + 1000 + none + 1 + wxGTC_UI + + . + #include <StdAfx.h> + 1 + 1 + 1 + 1 + UI + 1 + 1 + + 0 + wxAUI_MGR_DEFAULT + + + 1 + 1 + impl_virtual + + + 0 + wxID_ANY + + + wxGTCResponsePanelBase + + 500,-1 + ; + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + wxID_ANY + GTC Challenge + + m_sb_response + wxVERTICAL + protected + + + 5 + wxEXPAND + 0 + + + sb_response_horiz + wxHORIZONTAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + Load From Icon Resource; ; [32; 32] + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_response_icon + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + m_sb_response_vert + wxVERTICAL + protected + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Please provide your response. + + 0 + + + 0 + + 1 + m_response_label + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + 440 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALL + 0 + + 2 + wxBOTH + 1 + + 5 + + sb_response_tbl + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 5 + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_challenge + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Server challenge + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 2 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_response + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Enter your response here + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/GTC_UI/res/wxGTC_UI.h b/lib/GTC_UI/res/wxGTC_UI.h new file mode 100644 index 0000000..b0dc9a7 --- /dev/null +++ b/lib/GTC_UI/res/wxGTC_UI.h @@ -0,0 +1,53 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 17 2015) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __WXGTC_UI_H__ +#define __WXGTC_UI_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class wxGTCResponsePanelBase +/////////////////////////////////////////////////////////////////////////////// +class wxGTCResponsePanelBase : public wxPanel +{ + private: + + protected: + wxStaticBoxSizer* m_sb_response; + wxStaticBitmap* m_response_icon; + wxBoxSizer* m_sb_response_vert; + wxStaticText* m_response_label; + wxStaticText* m_challenge; + wxTextCtrl* m_response; + + public: + + wxGTCResponsePanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,-1 ), long style = wxTAB_TRAVERSAL ); + ~wxGTCResponsePanelBase(); + +}; + +#endif //__WXGTC_UI_H__ diff --git a/lib/GTC_UI/src/GTC_UI.cpp b/lib/GTC_UI/src/GTC_UI.cpp index b1edca7..5405b25 100644 --- a/lib/GTC_UI/src/GTC_UI.cpp +++ b/lib/GTC_UI/src/GTC_UI.cpp @@ -56,3 +56,19 @@ void wxGTCConfigPanel::OnInitDialog(wxInitDialogEvent& event) m_credentials->GetEventHandler()->ProcessEvent(event); } /// \endcond + + +////////////////////////////////////////////////////////////////////// +// wxGTCResponsePanel +////////////////////////////////////////////////////////////////////// + +wxGTCResponsePanel::wxGTCResponsePanel(const eap::config_provider &prov, eap::config_method_eapgtc &cfg, wxWindow* parent) : wxGTCResponsePanelBase(parent) +{ + UNREFERENCED_PARAMETER(prov); + UNREFERENCED_PARAMETER(cfg); + + // Load and set icon. + winstd::library lib_shell32; + if (lib_shell32.load(_T("shell32.dll"), NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE)) + m_response_icon->SetIcon(wxLoadIconFromResource(lib_shell32, MAKEINTRESOURCE(24))); +}