void copyValuesIntoConfig(HKEY key, wxFileConfig& config, const wxString& sectionName) {
	config.SetPath(sectionName);

	for (DWORD i = 0; ; ++i) {
		wxString name;
		wxString value;
		if (!enumRegistryValue(key, i, name, value))
		{
			break;
		}
		config.Write(name, value);
	}
}
Exemple #2
0
void ManAction::manSave(wxFileConfig& fileConfig)const
{
	for(auto &it: _shortcutKeysActions)
	{
		//Obtenir la version string du raccourci.
		wxString stringShortcut = ShortcutKey::shortcutKeyToString(it.first);
		//Crée un groupe pour ce raccourci.
		fileConfig.SetPath(stringShortcut+"/");
		
		//Sauvegarde le type de l'action.
		fileConfig.Write("ActTypeName", it.second->getActTypeName());
		//Sauvegarde de l'action.
		it.second->save(fileConfig);
		
		//On positionne le path
		fileConfig.SetPath("..");
	}
}	
Exemple #3
0
void ManNotification::manSave(wxFileConfig& fileConfig)const
{	
	fileConfig.Write("useNotification", (long)_useNotification);
	fileConfig.Write("notificationPosition", (long)_notificationPosition);
	fileConfig.Write("nearCursor", _nearCursor);
	fileConfig.Write("multipleNotifications", _multipleNotifications);
	fileConfig.Write("border", (long)_border);
	
	fileConfig.Write("colourBackground", (long)_colourBackground.GetRGB());
	fileConfig.Write("colourText", (long)_colourText.GetRGB());
	
	
	fileConfig.SetPath("workarea/");
	
	//On écrit -1 pour les valeur par défaut.
	wxRect workarea = wxDisplay().GetGeometry();
	
		if(workarea.x == _workarea.x)
			fileConfig.Write("x", (long)-1);
		else
			fileConfig.Write("x", (long)_workarea.x);
		if(workarea.y == _workarea.y)
			fileConfig.Write("y", (long)-1);
		else
			fileConfig.Write("y", (long)_workarea.y);
		if(workarea.height == _workarea.height)	
			fileConfig.Write("height", (long)-1);
		else
			fileConfig.Write("height", (long)_workarea.height);
		if(workarea.width == _workarea.width)	
			fileConfig.Write("width", (long)-1);
		else
			fileConfig.Write("width", (long)_workarea.width);
	
	fileConfig.SetPath("..");
}
void ActTranslationToNotification::actSave(wxFileConfig& fileConfig)const
{
	fileConfig.Write("lgsrc", wxLocale::GetLanguageName(_lgsrc));
	fileConfig.Write("lgto", wxLocale::GetLanguageName(_lgto));
}
Exemple #5
0
void ActLearn::actSave(wxFileConfig & fileConfig)const
{
	fileConfig.Write("listName", _listName);
	fileConfig.Write("nbText", (double)_nbText);
}