diff src/myframe.cpp @ 5:3b734fd6ee2b

v0.2
author pyon@macmini
date Thu, 06 Oct 2011 20:27:54 +0900
parents a505f7417742
children 99d612849255
line wrap: on
line diff
--- a/src/myframe.cpp	Thu Oct 06 07:56:12 2011 +0900
+++ b/src/myframe.cpp	Thu Oct 06 20:27:54 2011 +0900
@@ -1,5 +1,5 @@
 // Filename   : mainframe.cpp
-// Last Change: 05-Oct-2011.
+// Last Change: 06-Oct-2011.
 //
 #include "symbol.h"
 #include "common.h"
@@ -170,6 +170,7 @@
     EVT_BUTTON( ID_STDIR,   MyFrame::SetDir )
     EVT_BUTTON( ID_MKDIR,   MyFrame::MakeDir )
     EVT_BUTTON( ID_DOMOVE,  MyFrame::MoveImages )
+    EVT_LIST_ITEM_ACTIVATED( ID_LIST, MyFrame::OnOpenHhsDir )
     EVT_CLOSE( MyFrame::SaveConfig )
 END_EVENT_TABLE()
 
@@ -312,18 +313,32 @@
     }
     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 );
 
     wxString cmd = wxT("explorer ") + dirname;
     wxExecute( cmd );
 }
 
+/* 被保険者のフォルダを開く */
+void MyFrame::OnOpenHhsDir(wxListEvent& WXUNUSED(event))
+{
+    wxString hhsdir = m_textCtrlMoveDir->GetValue();
+    hhsdir.Append( wxFILE_SEP_PATH );
+    long n = m_listCtrl->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED );
+    wxListItem item;
+    item.SetId(n);
+    m_listCtrl->GetColumn( 1, item );
+    hhsdir.Append( item.GetText() );
+    wxMessageBox(hhsdir);
+    //wxString execmd = wxT("explorer ") + hhsdir;
+}
+
 /* 作業フォルダを開く */
 void MyFrame::OnOpenWorkDir(wxCommandEvent& WXUNUSED(event))
 {
     wxString workdir = m_dirPickerWork->GetPath();
     wxString execmd = wxT("explorer ") + workdir;
     wxExecute( execmd );
-    return;
 }