BFTaskDlg::BFTaskDlg (wxWindow* pParent, BFTask* pTask) : wxDialog (pParent, wxID_ANY, pTask->GetTypeDescription()), pTask_(pTask), pTypeCtrl_(NULL), pNameCtrl_(NULL), pSourceCtrl_(NULL), pDestCtrl_(NULL), pVerifyCheck_(NULL), pVerifyContentCheck_(NULL), pRealSyncCheck_(NULL), pExcludeCtrl_(NULL) { // help ctrl pHelpCtrl_ = new BFHelpCtrl(this); // arrange and create controls wxBoxSizer* pSizer = new wxBoxSizer(wxVERTICAL); pSizer->Add (CreateBook(), wxSizerFlags(0).Center()); pSizer->Add (pHelpCtrl_, wxSizerFlags(0).Center().Border().Expand()); pSizer->Add (CreateButtons(), wxSizerFlags(0).Center().Border(wxALL, 10)); SetSizerAndFit(pSizer); // init the dialog with data GetData(); // display the dialog wxDialog::Show(); // disable the mainframe to simulate a modal dialog BFMainFrame::Instance()->Disable(); /* if the dialog is shown modal it occures in a race condition somewhere in the wx-code so we need to simulate a modal dialog */ Fit(); /* If there is no destination open the ask-for-destination dialog automaticly. */ if ( pDestCtrl_->GetPath().Len() == 0 ) pDestCtrl_->OpenDirPicker(); }
void OCreate::Create() { if (!File) return; if (!Location) Location << (PSZ) "<WP_DESKTOP>"; if (is(".INF")) CreateBook(); else if (is(".EXE") | is(".COM") | is(".BAT") | is(".CMD")) CreateExe(); else CreateDoc(); Title << (PSZ)NULL; File << (PSZ)NULL; }