void SettingsResourcePathsControl::saveSettings()
	{
		SettingsManager::VectorString paths;
		for (size_t index = 0; index < mResourcePaths->getItemCount(); ++ index)
			paths.push_back(mResourcePaths->getItemNameAt(index));
		SettingsManager::getInstance().setValueList("Resources/AdditionalPath.List", paths);
	}
Пример #2
0
	SettingsManager::VectorString SettingsManager::getValueList(const std::string& _path)
	{
		SettingsManager::VectorString result;
		std::string path = _path + "/Value";

		pugi::xpath_node_set nodes = mUserDocument->document_element().select_nodes(path.c_str());
		if (!nodes.empty())
		{
			for (pugi::xpath_node_set::const_iterator node = nodes.begin(); node != nodes.end(); node ++)
				result.push_back((*node).node().child_value());
		}
		else
		{
			nodes = mDocument->document_element().select_nodes(path.c_str());
			for (pugi::xpath_node_set::const_iterator node = nodes.begin(); node != nodes.end(); node ++)
				result.push_back((*node).node().child_value());
		}

		return result;
	}