#include #include #include "OpenFileGUICommand.h" #include "Exception.h" #include "LoadFilesCommand.h" #include "MuseumPauseCommand.h" #include "View.h" using namespace std; void OpenFileGUICommand::execute() { Museum * museum = &this->get_museum(); MuseumPauseCommand(*museum).set(true); this->get_view().dialog_file([](vector files, void * data) -> void { Museum * museum = static_cast(data); try { LoadFilesCommand(*museum).execute(files); } catch (Exception & e) { printf("%s\n", e.what()); } }, museum); }