本文整理汇总了C++中FileManager::GetAllGmatFunctionPaths方法的典型用法代码示例。如果您正苦于以下问题:C++ FileManager::GetAllGmatFunctionPaths方法的具体用法?C++ FileManager::GetAllGmatFunctionPaths怎么用?C++ FileManager::GetAllGmatFunctionPaths使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileManager
的用法示例。
在下文中一共展示了FileManager::GetAllGmatFunctionPaths方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnReadButtonClick
//------------------------------------------------------------------------------
// void OnReadButtonClick(wxCommandEvent& event)
//------------------------------------------------------------------------------
void SetPathDialog::OnReadButtonClick(wxCommandEvent& event)
{
#ifdef DEBUG_SETPATH
MessageInterface::ShowMessage(wxT("SetPathDialog::OnReadButtonClick() entered\n"));
#endif
FileManager *fm = FileManager::Instance();
// Do we want default directory to be where executable is?
// Set it blank, so that system can show current working directory for now.
//wxString defDir = fm->GetStartupFileDir();
wxString defDir;
#ifdef DEBUG_SETPATH
MessageInterface::ShowMessage(wxT(" defDir='%s'\n"), defDir.c_str());
#endif
wxFileDialog dialog(this, wxT("Choose a file"), defDir, wxT(""), wxT("*.*"));
if (dialog.ShowModal() == wxID_OK)
{
wxString filename;
filename = dialog.GetPath().c_str();
if (!filename.IsSameAs(mStartupFilePath))
{
mReadFileTextCtrl->SetValue(filename);
try
{
fm->ReadStartupFile(filename.c_str());
StringArray paths = fm->GetAllGmatFunctionPaths();
mGmatFunPathPanel->UpdatePathNames(paths);
paths = fm->GetAllMatlabFunctionPaths();
mMatlabPathPanel->UpdatePathNames(paths);
mStartupFilePath = filename;
}
catch(BaseException &e)
{
MessageInterface::PopupMessage(Gmat::ERROR_, e.GetFullMessage());
}
}
}
}
示例2: Create
//------------------------------------------------------------------------------
// virtual void Create()
//------------------------------------------------------------------------------
void SetPathDialog::Create()
{
#ifdef DEBUG_SETPATH_DIALOG_CREATE
MessageInterface::ShowMessage(wxT("SetPathDialog::Create() entered.\n"));
#endif
FileManager *fm = FileManager::Instance();
mStartupFilePath = (fm->GetFullStartupFilePath()).c_str();
//----- read startup file
wxButton *readButton =
new wxButton(this, ID_BUTTON_READ, wxT("Read Other Startup File"),
wxDefaultPosition, wxDefaultSize, 0);
wxStaticText *currFileText =
new wxStaticText(this, -1, wxT("Current Startup File:"),
wxDefaultPosition, wxDefaultSize, 0 );
mReadFileTextCtrl =
new wxTextCtrl(this, -1, wxT(""),
wxDefaultPosition, wxSize(350, 20), 0);
mReadFileTextCtrl->Disable();
//----- write startup file
wxButton *saveButton =
new wxButton(this, ID_BUTTON_SAVE, wxT("Save Current Startup File"),
wxDefaultPosition, wxDefaultSize, 0);
mSaveFileTextCtrl =
new wxTextCtrl(this, -1, wxT(""),
wxDefaultPosition, wxSize(350, 20), 0);
mSaveFileTextCtrl->Disable();
//----- add to sizer
GmatStaticBoxSizer *startupSizer =
new GmatStaticBoxSizer(wxVERTICAL, this, wxT("Startup File"));
startupSizer->Add(readButton, 0, wxALIGN_LEFT|wxALL, 2);
startupSizer->Add(currFileText, 0, wxALIGN_LEFT|wxALL, 2);
startupSizer->Add(mReadFileTextCtrl, 0, wxALIGN_CENTER|wxGROW|wxALL, 2);
startupSizer->Add(saveButton, 0, wxALIGN_LEFT|wxALL, 2);
startupSizer->Add(mSaveFileTextCtrl, 0, wxALIGN_CENTER|wxGROW|wxALL, 2);
//----- create Notebook
mPathNotebook =
new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, wxGROW);
StringArray gmatPaths = fm->GetAllGmatFunctionPaths();
//----- add panels to notebook
mGmatFunPathPanel = new MultiPathSetupPanel(mPathNotebook, gmatPaths);
mPathNotebook->AddPage(mGmatFunPathPanel, wxT("GMAT Function"));
StringArray matlabPaths = fm->GetAllMatlabFunctionPaths();
mMatlabPathPanel = new MultiPathSetupPanel(mPathNotebook, matlabPaths);
mPathNotebook->AddPage(mMatlabPathPanel, wxT("MATLAB Function"));
wxString outputPath = fm->GetFullPathname(wxT("OUTPUT_PATH"));
#ifdef DEBUG_SETPATH_DIALOG_CREATE
MessageInterface::ShowMessage(wxT(" outputPath='%s'\n"), outputPath.c_str());
#endif
mOutputPathPanel = new SinglePathSetupPanel(mPathNotebook, outputPath.c_str());
mPathNotebook->AddPage(mOutputPathPanel, wxT("Output"));
theMiddleSizer->Add(startupSizer, 0, wxALIGN_CENTER|wxGROW|wxALL, 5);
theMiddleSizer->Add(mPathNotebook, 1, wxALIGN_CENTER|wxGROW|wxALL, 5);
}