Mercurial > mercurial > hgweb_mover.cgi
diff src/myframe.cpp @ 8:b59dfcc84d7a default tip
v0.4b
author | pyon@macmini |
---|---|
date | Thu, 13 Oct 2011 20:13:41 +0900 |
parents | bfa0800f1176 |
children |
line wrap: on
line diff
--- a/src/myframe.cpp Sat Oct 08 19:49:13 2011 +0900 +++ b/src/myframe.cpp Thu Oct 13 20:13:41 2011 +0900 @@ -1,5 +1,5 @@ // Filename : mainframe.cpp -// Last Change: 08-Oct-2011. +// Last Change: 13-Oct-2011. // #include "symbol.h" #include "common.h" @@ -221,7 +221,7 @@ void MyFrame::OnDetectWhite(wxCommandEvent& WXUNUSED(event)) { FrameDelWhite* dw = new FrameDelWhite( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCAPTION|wxFRAME_NO_TASKBAR|wxMAXIMIZE_BOX|wxRESIZE_BORDER ); - dw->SetMinSize( wxSize( 580, 680 ) ); + dw->SetMinSize( wxSize( 580, 380 ) ); dw->m_dir = m_dirPickerWork->GetPath(); dw->SetTitle( wxT("Delete White Sheet - ") + dw->m_dir ); @@ -282,6 +282,10 @@ wxDir dir( workdir ); if ( !dir.IsOpened() ) return; + wxProgressDialog pd( wxT("進行状況"), wxT("処理開始..."), 200, this, wxPD_APP_MODAL|wxPD_REMAINING_TIME|wxPD_AUTO_HIDE ); + pd.SetSize( wxSize(320,140) ); + int p=0; + wxString filename; bool cout = dir.GetFirst( &filename, wxT("*.jpg"), wxDIR_FILES ); @@ -295,7 +299,7 @@ wxString d = dirname + hhs; wxMkdir( d ); m_listCtrl->InsertItem( r, wxString::Format(wxT("%d"),r+1) ); - m_listCtrl->SetItem( r, 1, hhs, -1 ); // 被保険者番号 + m_listCtrl->SetItem( r, 1, hhs, -1 ); // 被保険者番号 if ( r % 2 ) m_listCtrl->SetItemBackgroundColour( r, wxColour(wxT("WHEAT")) ); r++; cnt=1; @@ -307,10 +311,11 @@ wxString to = dirname + wxFILE_SEP_PATH + hhs + wxFILE_SEP_PATH + filename; wxRenameFile( from, to, false ); m_listCtrl->SetItem( r-1, 2, wxString::Format(wxT("%d"),cnt), -1 ); // ファイル数 - if ( cnt < 5 ) m_listCtrl->SetItemTextColour( r, *wxRED ); - if ( cnt > 5 ) m_listCtrl->SetItemTextColour( r, *wxBLUE ); + if ( cnt < 5 ) m_listCtrl->SetItemTextColour( r, wxColour(wxT("RED")) ); + if ( cnt > 5 ) m_listCtrl->SetItemTextColour( r, wxColour(wxT("BLUE")) ); cnt++; // write log + pd.Update( p++, wxEmptyString ); cout = dir.GetNext( &filename ); } @@ -329,8 +334,9 @@ item.SetMask(wxLIST_MASK_TEXT); m_listCtrl->GetItem( item ); hhsdir.Append( item.GetText() ); - wxMessageBox(hhsdir); - //wxString execmd = wxT("explorer ") + hhsdir; + //wxMessageBox(hhsdir); + wxString execmd = wxT("explorer ") + hhsdir; + wxExecute( execmd ); } /* 作業フォルダを開く */