当前位置: 首页>>代码示例>>C++>>正文


C++ ProjectSettingsPtr::RemoveConfiguration方法代码示例

本文整理汇总了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);
		}
	}
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:25,代码来源:edit_configuration.cpp

示例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);
		}
	}
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:22,代码来源:edit_configuration.cpp


注:本文中的ProjectSettingsPtr::RemoveConfiguration方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。