6
|
1 // Filename : param.cpp
|
|
2 // Last Change: 18-Oct-2011.
|
|
3 //
|
5
|
4
|
|
5 class DnDFile : public wxFileDropTarget
|
|
6 {
|
|
7 public:
|
6
|
8 DnDFile( wxDirPickerCtrl *dir )
|
|
9 {
|
|
10 m_workdir = dir->GetPath();
|
|
11 }
|
|
12 virtual bool OnDropFiles( wxCoord x, wxCoord y, const wxArrayString& filenames )
|
5
|
13 {
|
6
|
14 size_t nFiles = filenames.GetCount();
|
|
15 for ( size_t n=0; n<nFiles; n++ ) {
|
|
16 wxFileName filename( filenames[n] );
|
|
17 wxString from = filenames[n];
|
|
18 wxString to = m_workdir + wxFILE_SEP_PATH + filename.GetFullName();
|
|
19 wxRenameFile( from, to, true );
|
|
20 //wxMessageBox( wxT("move ") + filenames[n] + to );
|
|
21 }
|
5
|
22 return true;
|
|
23 }
|
|
24
|
|
25 private:
|
6
|
26 wxString m_workdir;
|
5
|
27 };
|
|
28
|