# HG changeset patch # User pyon@macmini # Date 1321071483 -32400 # Node ID 51e522f34598df49dde7436698cd5e71b475c1ee # Parent 945864229b5a173e0a909f02748b7a5383636882 guess ccndir. diff -r 945864229b5a -r 51e522f34598 include/main.h --- a/include/main.h Mon Nov 07 21:02:04 2011 +0900 +++ b/include/main.h Sat Nov 12 13:18:03 2011 +0900 @@ -1,5 +1,5 @@ // Filename : main.h -// Last Change: 06-Nov-2011. +// Last Change: 12-Nov-2011. // #include "wx/wx.h" #include "wx/config.h" @@ -8,8 +8,8 @@ #define MYAPPNAME wxT("AMover2") #define VER 2 -#define REV 4 -#define BLD 20111107 +#define REV 5 +#define BLD 20111114 // private classes // Define a new application type, each program should derive a class from wxApp diff -r 945864229b5a -r 51e522f34598 src/myframe.cpp --- a/src/myframe.cpp Mon Nov 07 21:02:04 2011 +0900 +++ b/src/myframe.cpp Sat Nov 12 13:18:03 2011 +0900 @@ -1,5 +1,5 @@ // Filename : myframe.cpp -// Last Change: 07-Nov-2011. +// Last Change: 12-Nov-2011. // #include "main.h" @@ -465,7 +465,7 @@ m_textCtrlGuess->SetValue( hhsno ); wxString name; int judge = IsHhsno( hhsno, name ); - if ( judge == 0 ) m_textCtrlGuess->SetBackgroundColour(*wxRED); // not hhsno-style + if ( judge == 0 ) m_textCtrlGuess->SetBackgroundColour(*wxRED); // not hhsno-style else if ( judge == 1 ) m_textCtrlGuess->SetBackgroundColour(wxT("YELLOW")); // not in DB m_textCtrlName->SetValue( name ); @@ -479,6 +479,13 @@ pd.Update( i+1, wxT("画像認識中") ); } + // 画像ファイル数が多ければ,おそらく申請書 + if ( keys.GetCount() > 32 ) { + int n = m_comboBoxCcn->GetCurrentSelection(); + wxString ccndir, dummy; wxArrayString array; + GetCCnArrayInfo( array, n, dummy, ccndir ); + m_textCtrlGuess->SetValue( ccndir ); + } // 選択したものは青い画像を使う long i = -1; @@ -495,10 +502,13 @@ void MyFrame::OnItemSelected(wxListEvent& event) { int i = event.GetIndex(); - m_listCtrlView->SetItemImage( i, i+m_listCtrlView->GetItemCount() ); // 青い画像 + int m = m_listCtrlView->GetSelectedItemCount(); + m_listCtrlView->SetItemImage( i, i+m ); // 青い画像 - if ( m_listCtrlView->GetSelectedItemCount() != 1 ) return; - SetStatusText( wxEmptyString, 2 ); + if ( m != 1 ) { + SetStatusText( wxString::Format(wxT("%d files selected."),m), 2 ); + return; + } wxString filename = event.GetText(); CacheItem* ci = new CacheItem; @@ -511,6 +521,7 @@ { int i = event.GetIndex(); m_listCtrlView->SetItemImage( i, i ); + SetStatusText( wxString::Format(wxT("%d files selected."),m_listCtrlView->GetSelectedItemCount()), 2 ); } /* 画像のスクリーン表示*/ @@ -635,7 +646,8 @@ for ( int i=0; iInsertItem( i, -1 ); buf.Printf(wxT("%d"),i+1); @@ -643,7 +655,7 @@ m_listCtrlHhsDir->SetItem( i, 1, m_hhsList[i], -1 ); buf.Printf(wxT("%d"),n); m_listCtrlHhsDir->SetItem( i, 2, buf, -1 ); - m_listCtrlHhsDir->SetItem( i, 3, GetHhsName(m_hhsList[i]), -1 ); + m_listCtrlHhsDir->SetItem( i, 3, GetHhsName( m_hhsList[i]), -1 ); if ( i % 2 ) m_listCtrlHhsDir->SetItemBackgroundColour( i, wxColour(wxT("WHEAT")) ); } }