本文整理汇总了C++中FileManager::GetFullStartupFilePath方法的典型用法代码示例。如果您正苦于以下问题:C++ FileManager::GetFullStartupFilePath方法的具体用法?C++ FileManager::GetFullStartupFilePath怎么用?C++ FileManager::GetFullStartupFilePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileManager
的用法示例。
在下文中一共展示了FileManager::GetFullStartupFilePath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
}
示例2: LoadData
//------------------------------------------------------------------------------
// virtual void LoadData()
//------------------------------------------------------------------------------
void SetPathDialog::LoadData()
{
FileManager *fm = FileManager::Instance();
wxString startupPath = (fm->GetFullStartupFilePath()).c_str();
mReadFileTextCtrl->SetValue(startupPath.c_str());
}