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


C++ wxFileConfig::Read方法代码示例

本文整理汇总了C++中wxFileConfig::Read方法的典型用法代码示例。如果您正苦于以下问题:C++ wxFileConfig::Read方法的具体用法?C++ wxFileConfig::Read怎么用?C++ wxFileConfig::Read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wxFileConfig的用法示例。


在下文中一共展示了wxFileConfig::Read方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: actLoad

void ActLearn::actLoad(wxFileConfig & fileConfig)
{
	fileConfig.Read("listName", &_listName);
	double tmp;
	
	fileConfig.Read("nbText", &tmp);
	if(tmp == 0)//La valeur minimums de _nbText est 1.
		_nbText = 1;
	else
		_nbText = tmp;
}
开发者ID:antoine163,项目名称:Talv,代码行数:11,代码来源:actLearn.cpp

示例2: actLoad

void ActTranslationToNotification::actLoad(wxFileConfig& fileConfig)
{
	_lgto = ManGeneral::get().getSystemLanguage();                                  
	if(	_lgto == wxLANGUAGE_ENGLISH)
		_lgsrc = wxLANGUAGE_FRENCH;
	else
		_lgsrc = wxLANGUAGE_ENGLISH;	
	
	//On récupère les préférences.
	wxString lg;
	lg = fileConfig.Read("lgsrc", wxLocale::GetLanguageName(_lgsrc));
	_lgsrc = (wxLanguage)wxLocale::FindLanguageInfo(lg)->Language;
	lg = fileConfig.Read("lgto", wxLocale::GetLanguageName(_lgto));
	_lgto = (wxLanguage)wxLocale::FindLanguageInfo(lg)->Language;
}
开发者ID:antoine163,项目名称:Talv,代码行数:15,代码来源:actTranslationToNotification.cpp

示例3: SetDefaultFonts

void wxFontsManager::SetDefaultFonts(wxFileConfig& cfg)
{
    wxString name;

    if ( cfg.Read("Default", &name) )
    {
        m_defaultFacenames[wxFONTFAMILY_DECORATIVE] =
        m_defaultFacenames[wxFONTFAMILY_ROMAN] =
        m_defaultFacenames[wxFONTFAMILY_SCRIPT] =
        m_defaultFacenames[wxFONTFAMILY_SWISS] =
        m_defaultFacenames[wxFONTFAMILY_MODERN] =
        m_defaultFacenames[wxFONTFAMILY_TELETYPE] = name;
    }

    if ( cfg.Read("DefaultDecorative", &name) )
        m_defaultFacenames[wxFONTFAMILY_DECORATIVE] = name;
    if ( cfg.Read("DefaultRoman", &name) )
        m_defaultFacenames[wxFONTFAMILY_ROMAN] = name;
    if ( cfg.Read("DefaultScript", &name) )
        m_defaultFacenames[wxFONTFAMILY_SCRIPT] = name;
    if ( cfg.Read("DefaultSwiss", &name) )
        m_defaultFacenames[wxFONTFAMILY_SWISS] = name;
    if ( cfg.Read("DefaultModern", &name) )
        m_defaultFacenames[wxFONTFAMILY_MODERN] = name;
    if ( cfg.Read("DefaultTeletype", &name) )
        m_defaultFacenames[wxFONTFAMILY_TELETYPE] = name;
}
开发者ID:BauerBox,项目名称:wxWidgets,代码行数:27,代码来源:fontmgr.cpp

示例4:

static wxString
ReadFilePath(const wxString& name, const wxString& dir, wxFileConfig& cfg)
{
    wxString p = cfg.Read(name, wxEmptyString);

    if ( p.empty() || wxFileName(p).IsAbsolute() )
        return p;

    return dir + "/" + p;
}
开发者ID:BauerBox,项目名称:wxWidgets,代码行数:10,代码来源:fontmgr.cpp

示例5: AddFont

void wxFontsManager::AddFont(const wxString& dir,
                             const wxString& name,
                             wxFileConfig& cfg)
{
    wxLogTrace("font", "adding font '%s'", name.c_str());

    wxConfigPathChanger ch(&cfg, wxString::Format("/%s/", name.c_str()));

    AddBundle
    (
      new wxFontBundle
          (
            name,
            ReadFilePath("Regular", dir, cfg),
            ReadFilePath("Italic", dir, cfg),
            ReadFilePath("Bold", dir, cfg),
            ReadFilePath("BoldItalic", dir, cfg),
            cfg.Read("IsFixed", (long)false)
          )
    );
}
开发者ID:BauerBox,项目名称:wxWidgets,代码行数:21,代码来源:fontmgr.cpp

示例6: manLoad

void ManAction::manLoad(wxFileConfig& fileConfig)
{
	wxString stringShortcut;
	long lIndex;
	
	//Avent de charger quoi que se soi on supprime tout les raccourcis/actions
	removeAll();
	
	//On récupère le premier raccourci.
	if(!fileConfig.GetFirstGroup(stringShortcut, lIndex))
		return;
		
	do
	{	
		//On positionne le path
		fileConfig.SetPath(stringShortcut+"/");
		
		//Récupérer le type de l'action.
		wxString actTypeName;
		fileConfig.Read("ActTypeName", &actTypeName);
		
		//Création d'une action a partir de son nom.
		Action* tmpAct = Action::createAction(actTypeName);
		
		//Si la création de l'action a réussie, alor on l'ajoute.
		if(tmpAct)
		{
			//Chargement des préférences de l'action à partir du fichier de configuration.
			tmpAct->load(fileConfig);
			//Ajout de l'action.
			add(ShortcutKey::stringToShortcutKey(stringShortcut), tmpAct);
		}
		
		//On positionne le path
		fileConfig.SetPath("..");
		
	}//Puis tous les autres
	while(fileConfig.GetNextGroup(stringShortcut, lIndex));
}
开发者ID:antoine163,项目名称:Talv,代码行数:39,代码来源:manAction.cpp

示例7: theConfig

//~~ int GetIconIndex() [AstadeRelation] ~~

wxArrayString names;

wxFileConfig theConfig(wxEmptyString, wxEmptyString, wxEmptyString, myModelElement->GetFileName().GetFullPath());

wxString RelationType = theConfig.Read(wxS("Astade/RelationType"));

if (RelationType == wxS("ImplementationDependency"))
{
	names.Add(wxS("relation"));
	names.Add(CODE_CPlusPlus);
}
else if (RelationType == wxS("SpecificationDependency"))
{
	names.Add(wxS("relation"));
	names.Add(wxS("h"));
}
else if (RelationType == wxS("Friend"))
	names.Add(wxS("relation"));
else if (RelationType == wxS("Association"))
	names.Add(wxS("association"));
else if (RelationType == wxS("Aggregation"))
	names.Add(wxS("aggregation"));
else if (RelationType == wxS("Composition"))
	names.Add(wxS("composition"));
else if (RelationType == wxS("Generalization"))
	names.Add(wxS("generalisation"));
else
	assert(false);
开发者ID:andib78,项目名称:Astade,代码行数:30,代码来源:code.cpp

示例8: aFile

//~~ void Load(const wxString fileName) [glFrame] ~~

if (!fileName.empty())
{
	currentFile = fileName;
	wxFileName aFile(currentFile);
	wxFileConfig aConfig(wxEmptyString, wxEmptyString, aFile.GetFullPath(),	wxEmptyString, wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_RELATIVE_PATH);
		
    int saveVersion = 1;
    bool read = aConfig.Read(wxS("SaveFileVersion"), &saveVersion);
    
    if (read && (saveVersion < 2))
    {
         wxMessageBox(wxS("This file has an older graphic format. If you overwrite it with this newer program, the program which has generated this file will not be able to read it any more!"), wxS("Notice!"), wxOK | wxICON_INFORMATION, this);
    }

	int w = 600;
	aConfig.Read(wxS("Window/XSize"), &w);

	int h = 400;
	aConfig.Read(wxS("Window/YSize"), &h);

	xPixelSlider->SetValue(w);
	yPixelSlider->SetValue(h);
	wxScrollEvent dummy;
	OnSliderMove(dummy);
		
	graphicPanel->Load(aConfig);
	SetTitle(currentFile);
	isChanged = false;
}
开发者ID:Astade,项目名称:Astade,代码行数:31,代码来源:code.cpp

示例9: theConfig

//~~ int GetIconIndex() [AstadeTransition] ~~

wxArrayString names;

wxFileConfig theConfig(wxEmptyString, wxEmptyString, wxEmptyString, myModelElement->GetFileName().GetFullPath());

wxString TransitionType = theConfig.Read(wxS("Astade/TransitionType"));

if (TransitionType == wxS("Self"))
	names.Add(wxS("selftransition"));
else if (TransitionType == wxS("Internal"))
	names.Add(wxS("internaltransition"));
else
	names.Add(wxS("transition"));

if (search->isSet(AdeSearch::SearchIsActive))
{
	switch (myModelElement->Search(*search))
	{
	case AdeSearch::contain:
		names.Add(wxS("hasfound"));
		break;
	case AdeSearch::found:
		names.Add(wxS("found"));
		break;
	default:
		break;
	}
}
else
{
开发者ID:andib78,项目名称:Astade,代码行数:31,代码来源:code.cpp


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