本文整理汇总了C++中ProjectSettingsPtr::RemoveConfiguration方法的典型用法代码示例。如果您正苦于以下问题:C++ ProjectSettingsPtr::RemoveConfiguration方法的具体用法?C++ ProjectSettingsPtr::RemoveConfiguration怎么用?C++ ProjectSettingsPtr::RemoveConfiguration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectSettingsPtr
的用法示例。
在下文中一共展示了ProjectSettingsPtr::RemoveConfiguration方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RenameConfiguration
void EditConfigurationDialog::RenameConfiguration(const wxString &oldName, const wxString &newName)
{
ProjectSettingsPtr settings = ManagerST::Get()->GetProjectSettings(m_projectName);
if(settings){
BuildConfigPtr bldConf = settings->GetBuildConfiguration(oldName);
if(bldConf){
settings->RemoveConfiguration(oldName);
bldConf->SetName(newName);
settings->SetBuildConfiguration(bldConf);
//save changes
ManagerST::Get()->SetProjectSettings(m_projectName, settings);
//update the control
m_configurationsList->Clear();
ProjectSettingsCookie cookie;
BuildConfigPtr bldConf = settings->GetFirstBuildConfiguration(cookie);
while(bldConf){
m_configurationsList->Append(bldConf->GetName());
bldConf = settings->GetNextBuildConfiguration(cookie);
}
if(m_configurationsList->GetCount()>0)
m_configurationsList->SetSelection(0);
}
}
}
示例2: OnButtonDelete
void EditConfigurationDialog::OnButtonDelete(wxCommandEvent &event)
{
wxUnusedVar(event);
wxString selection = m_configurationsList->GetStringSelection() ;
if(selection.IsEmpty()){
return;
}
wxString msg(wxT("Remove configuration '"));
msg << selection << wxT("' ?");
if(wxMessageBox(msg, wxT("Confirm"), wxYES_NO | wxCANCEL | wxICON_QUESTION) == wxYES){
ProjectSettingsPtr settings = ManagerST::Get()->GetProjectSettings(m_projectName);
if(settings){
settings->RemoveConfiguration(selection);
m_configurationsList->Delete(m_configurationsList->GetSelection());
if(m_configurationsList->GetCount()>0)
m_configurationsList->SetSelection(0);
//save changes
ManagerST::Get()->SetProjectSettings(m_projectName, settings);
}
}
}