6
|
1 // Filename : param.cpp
|
9
|
2 // Last Change: 19-Oct-2011.
|
6
|
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 }
|
5
|
21 return true;
|
|
22 }
|
|
23
|
|
24 private:
|
6
|
25 wxString m_workdir;
|
5
|
26 };
|
|
27
|