diff src/auth.cpp @ 6:9a8b581c1993

improve performance.
author pyon@macmini
date Tue, 23 Oct 2018 19:15:22 +0900
parents e3b10fb860b3
children 82f9af6aa7e4
line wrap: on
line diff
--- a/src/auth.cpp	Mon Oct 22 22:17:02 2018 +0900
+++ b/src/auth.cpp	Tue Oct 23 19:15:22 2018 +0900
@@ -1,5 +1,5 @@
 // Filename   : auth.cpp
-// Last Change: 2018-10-22 月 16:11:52.
+// Last Change: 2018-10-23 火 09:05:53.
 //
 
 #include "id.h"
@@ -110,7 +110,6 @@
 	m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT( "Cancel" ), wxDefaultPosition, wxDefaultSize, 0 );
 	gSizer->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
 	
-	
 	this->SetSizer( gSizer );
 	this->Layout();
 	gSizer->Fit( this );
@@ -119,17 +118,17 @@
     m_textCtrlId->SetFocus();
 }
 
-bool AuthDialog::LoadDB( void )
-{
-	// http get ( auth.db, hhs.db, index.db )
+bool AuthDialog::GetDB( void )
+{   // http get ( auth.db, hhs.db, index.db )
 	wxArrayString args;
 	args.Add( wxT( "client.exe" ) );
 	args.Add( wxT( "-u" ) );
 	args.Add( m_server );
+	wxExecute( wxJoin( args, ' ', '\\' ), wxEXEC_SYNC|wxEXEC_HIDE_CONSOLE );
+}
 
-	wxExecute( wxJoin( args, ' ', '\\' ), wxEXEC_SYNC|wxEXEC_HIDE_CONSOLE );
-
-	// load db
+bool AuthDialog::LoadDB( void )
+{
 	wxTextFile file;
 	if ( !file.Open( wxT( "auth.db" ) ) ) return false;
 	for ( int i = 0; i < file.GetLineCount(); i++ ) {