Example #1
0
	bool CSettings::SaveConvertProfiles(SimpleXmlNode root)
	{
		std::map<CString, ImageConvertingParams>::iterator it;
		for (it = ConvertProfiles.begin(); it != ConvertProfiles.end(); ++it)
		{
			SimpleXmlNode profile = root.CreateChild("Profile");
			ImageConvertingParams& params = it->second;
			profile.SetAttribute("Name", WCstringToUtf8(it->first));
			SettingsManager mgr;
			SettingsNode& image = mgr["Image"];
			BindConvertProfile(image, params);
			mgr.saveToXmlNode(profile);
		}
		return true;
	}
Example #2
0
	bool CSettings::SaveServerProfiles(SimpleXmlNode root)
	{
		for ( ServerProfilesMap::iterator it = ServerProfiles.begin(); it != ServerProfiles.end(); ++it) {
			SimpleXmlNode serverProfileNode = root.CreateChild("ServerProfile");
		
			std::string profileName = WCstringToUtf8(it->first);
			
			//ServerProfile sp = ;
			SettingsManager mgr;
			it->second.bind(mgr.root());
			mgr["@ServerProfileId"].bind(profileName);

			mgr.saveToXmlNode(serverProfileNode);
		}
		return true;
	}