Mercurial > mercurial > hgweb_rsearcher.cgi
diff src/mngdb.cpp @ 16:b651aa41b9d4 default tip
hhsinfo method (server)
author | pyon@macmini |
---|---|
date | Mon, 15 Jul 2019 07:03:05 +0900 |
parents | c1dc1fcee7fe |
children |
line wrap: on
line diff
--- a/src/mngdb.cpp Sat Jun 08 15:50:59 2019 +0900 +++ b/src/mngdb.cpp Mon Jul 15 07:03:05 2019 +0900 @@ -1,5 +1,5 @@ // Filename : mngdeb.cpp -// Last Change: 2018-11-21 水 08:36:02. +// Last Change: 2019-07-15 Mon 06:58:48. // #include <wx/datetime.h> @@ -11,60 +11,7 @@ ManageDBFrame::ManageDBFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { - this->SetBackgroundColour( wxColour( 140, 240, 140 ) ); - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bSizerTop = new wxBoxSizer( wxVERTICAL ); - - wxFlexGridSizer* fgSizer = new wxFlexGridSizer( 0, 2, 0, 0 ); - fgSizer->SetFlexibleDirection( wxBOTH ); - fgSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_staticTextDate = new wxStaticText( this, wxID_ANY, wxT( "Date" ), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer->Add( m_staticTextDate, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_datePicker = new wxDatePickerCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxSize( 180, -1 ), wxDP_DROPDOWN|wxDP_SHOWCENTURY ); - fgSizer->Add( m_datePicker, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_staticTextHhs = new wxStaticText( this, wxID_ANY, wxT( "HHS" ), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer->Add( m_staticTextHhs, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); - - m_filePickerHhs = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, wxT( "Select a file" ), wxT( "*.db" ), wxDefaultPosition, wxSize( 180, -1 ), wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_SMALL|wxFLP_USE_TEXTCTRL ); - fgSizer->Add( m_filePickerHhs, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); - - m_staticTextCcn = new wxStaticText( this, wxID_ANY, wxT( "CCN" ), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer->Add( m_staticTextCcn, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - - m_filePickerCcn = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, wxT( "Select a file" ), wxT( "*.db" ), wxDefaultPosition, wxSize( 180, -1 ), wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_SMALL|wxFLP_USE_TEXTCTRL ); - fgSizer->Add( m_filePickerCcn, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - bSizerTop->Add( fgSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - //--- - m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerTop->Add( m_staticline, 0, wxEXPAND|wxALL, 5 ); - - wxBoxSizer* bSizerBtn = new wxBoxSizer( wxHORIZONTAL ); - - m_buttonBuild = new wxButton( this, ID_MNGBLD, wxT( "Build" ), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerBtn->Add( m_buttonBuild, 0, wxALL, 5 ); - - m_buttonUpld = new wxButton( this, ID_MNGUPLD, wxT( "Upload" ), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerBtn->Add( m_buttonUpld, 0, wxALL, 5 ); - - m_buttonIdx = new wxButton( this, ID_MNGIDX, wxT( "Index" ), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerBtn->Add( m_buttonIdx, 0, wxALL, 5 ); - - m_buttonExit = new wxButton( this, ID_MNGEXIT, wxT( "Exit" ), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerBtn->Add( m_buttonExit, 0, wxALL, 5 ); - - bSizerTop->Add( bSizerBtn, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); - - this->SetSizer( bSizerTop ); - this->Layout(); - - this->Centre( wxBOTH ); - m_buttonUpld->Enable( false ); + CreateControls(); } ManageDBFrame::~ManageDBFrame() @@ -163,3 +110,61 @@ m_filePickerCcn->SetPath( dir + wxFILE_SEP_PATH + wxT( "ccn.db") ); } +void ManageDBFrame::CreateControls() +{ + this->SetBackgroundColour( wxColour( 140, 240, 140 ) ); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizerTop = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* fgSizer = new wxFlexGridSizer( 0, 2, 0, 0 ); + fgSizer->SetFlexibleDirection( wxBOTH ); + fgSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticTextDate = new wxStaticText( this, wxID_ANY, wxT( "Date" ), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer->Add( m_staticTextDate, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_datePicker = new wxDatePickerCtrl( this, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxSize( 180, -1 ), wxDP_DROPDOWN|wxDP_SHOWCENTURY ); + fgSizer->Add( m_datePicker, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticTextHhs = new wxStaticText( this, wxID_ANY, wxT( "HHS" ), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer->Add( m_staticTextHhs, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); + + m_filePickerHhs = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, wxT( "Select a file" ), wxT( "*.db" ), wxDefaultPosition, wxSize( 180, -1 ), wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_SMALL|wxFLP_USE_TEXTCTRL ); + fgSizer->Add( m_filePickerHhs, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_staticTextCcn = new wxStaticText( this, wxID_ANY, wxT( "CCN" ), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer->Add( m_staticTextCcn, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_filePickerCcn = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, wxT( "Select a file" ), wxT( "*.db" ), wxDefaultPosition, wxSize( 180, -1 ), wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_SMALL|wxFLP_USE_TEXTCTRL ); + fgSizer->Add( m_filePickerCcn, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizerTop->Add( fgSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + //--- + m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerTop->Add( m_staticline, 0, wxEXPAND|wxALL, 5 ); + + wxBoxSizer* bSizerBtn = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonBuild = new wxButton( this, ID_MNGBLD, wxT( "Build" ), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerBtn->Add( m_buttonBuild, 0, wxALL, 5 ); + + m_buttonUpld = new wxButton( this, ID_MNGUPLD, wxT( "Upload" ), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerBtn->Add( m_buttonUpld, 0, wxALL, 5 ); + m_buttonUpld->Enable( false ); + + m_buttonIdx = new wxButton( this, ID_MNGIDX, wxT( "Index" ), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerBtn->Add( m_buttonIdx, 0, wxALL, 5 ); + + m_buttonExit = new wxButton( this, ID_MNGEXIT, wxT( "Exit" ), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerBtn->Add( m_buttonExit, 0, wxALL, 5 ); + + bSizerTop->Add( bSizerBtn, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizerTop ); + this->Layout(); + + this->Centre( wxBOTH ); +} +