diff src/myframe.cpp @ 9:dfa5cae8c992

small fix
author pyon@macmini
date Thu, 20 Oct 2011 07:44:56 +0900
parents 550c143ab194
children 1fda3a06c39b
line wrap: on
line diff
--- a/src/myframe.cpp	Wed Oct 19 20:36:52 2011 +0900
+++ b/src/myframe.cpp	Thu Oct 20 07:44:56 2011 +0900
@@ -1,12 +1,12 @@
 // Filename   : myframe.cpp
-// Last Change: 19-Oct-2011.
+// Last Change: 20-Oct-2011.
 //
 
 #include "main.h"
 #include "myframe.h"
 #include "param.h"
-#include "marksheet.h"
 #include "dndfile.h"
+#include "myutils.h"
 
 // resources
 // the application icon (under Windows and OS/2 it is in resources and even
@@ -15,6 +15,8 @@
     #include "sample.xpm"
 #endif
 
+WX_DECLARE_HASH_MAP( wxString, Cache*, wxStringHash, wxStringEqual, CacheHash );
+
 //////////////////////////////////////////////////////////////////////////
 // frame constructor
 MyFrame::MyFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
@@ -166,6 +168,8 @@
     m_statusBar->SetStatusText( wxEmptyString, 0 );
 	
 	this->Centre( wxBOTH );
+
+    CacheHash cache;
 }
 
 // destructor
@@ -314,7 +318,7 @@
     wxString first;
     wxProgressDialog pd( wxT("進行状況"), wxT("処理開始..."), 7, this, wxPD_APP_MODAL|wxPD_REMAINING_TIME|wxPD_AUTO_HIDE );
     pd.SetSize( wxSize(320,140) );
-    float b; long l;
+    float z; long l;
     for ( int i=0; i<n; i++ ) {
         wxFileName f( filenames[i] );
         wxString filename = f.GetFullName();
@@ -327,9 +331,9 @@
         m_imageList->Add( bmp );
 
         if ( i == 0 ) {
-            IsMarksheet( filenames[i], &b, &l );
+            IsMarksheet( filenames[i], &z, &l );
             first = filenames[i];
-            SetStatusText( wxString::Format(wxT("1st image : z = %f, l = %d"),b,l), 1 );
+            SetStatusText( wxString::Format(wxT("1st image : z = %f, l = %d"),z,l), 1 );
 
             wxImage marksheet( first, wxBITMAP_TYPE_JPEG );
             wxImage name_image;
@@ -346,7 +350,7 @@
             m_textCtrlGuess->SetValue( hhsno );
         }
         else {
-            if ( IsMarksheet( filenames[i], &b, &l ) ) {
+            if ( IsMarksheet( filenames[i], &z, &l ) ) {
                 break;
             }
         }