X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOWxGimmickView.cpp;h=70c845c9a611c0442fbc666812734b1b5c3301da;hb=d1635bf73accf21c07f6315ed04609d703250269;hp=5b87845400cd574b220c6011c5294055a1d05f05;hpb=e71f3f9eee510c110566fbdce60c569094e45307;p=creaImageIO.git diff --git a/src2/creaImageIOWxGimmickView.cpp b/src2/creaImageIOWxGimmickView.cpp index 5b87845..70c845c 100644 --- a/src2/creaImageIOWxGimmickView.cpp +++ b/src2/creaImageIOWxGimmickView.cpp @@ -637,6 +637,35 @@ namespace creaImageIO mess << times; */ wxMessageBox(std2wx(mess.str()),_T("Addition result"),wxOK,this); + } + + void WxGimmickView::OnAddDB(wxCommandEvent& event) + { + + //Select DB + long style = wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST; + std::string wc("*.sqlite3*"); + wxFileDialog* FD = new wxFileDialog( 0, + _T("Select file"), + _T(""), + _T(""), + crea::std2wx(wc), + style, + wxDefaultPosition); + + if (FD->ShowModal()==wxID_OK) + { + wxBusyCursor busy; + wxArrayString files; + FD->GetPaths(files); + for(int i = 0; i< files.size(); i++) + { + // gimmick->addDB("remote_" + i.c_str(),files[i]); + // AddTreeHandler(gimmick->getTreeHandlerMap("remote_" + i.c_str())); + } + } + + } //================================================= @@ -646,6 +675,7 @@ namespace creaImageIO EVT_TOOL(TOOL_ADDFILES_ID, WxGimmickView::OnAddFiles) EVT_TOOL(TOOL_ADDDIR_ID, WxGimmickView::OnAddDir) EVT_TOOL(TOOL_REMOVE_ID, WxGimmickView::OnRemove) + EVT_TOOL(TOOL_ADDDATABASE_ID, WxGimmickView::OnAddDB) END_EVENT_TABLE() //=================================================