34 bool OnDropFiles(wxCoord x, wxCoord y,
const wxArrayString &filenames)
override {
36 if (filenames.GetCount() != 1) {
37 wxMessageBox(
"Please drop only one file at a time",
"Multiple Files", wxOK | wxICON_INFORMATION);
41 wxString filePath = filenames[0];
44 if (!filePath.Lower().EndsWith(
".xml")) {
45 wxMessageBox(
"Only XML files are supported for drag and drop",
"Invalid File Type", wxOK | wxICON_WARNING);
50 if (!wxFileExists(filePath)) {
51 wxMessageBox(
"The dropped file does not exist",
"File Not Found", wxOK | wxICON_ERROR);
57 bool ctrlPressed = wxGetKeyState(WXK_CONTROL);