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


C++ AutoAlloc::WriteContainer方法代码示例

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


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

示例1: DestroyWindow

void ApplinkDialog::DestroyWindow(void)
{
	if(dirty)
	{
		AutoAlloc<HyperFile> hyperfilePrefs;
        
		if (hyperfilePrefs->Open(filenamePrefs.GetString(), GE_WRITE, FILE_NODIALOG))
		{
			saveSettings();
			hyperfilePrefs->WriteContainer(gPreferences);
			hyperfilePrefs->Close();
		}
	}
}
开发者ID:oyaGG,项目名称:3DCoat_Applinks,代码行数:14,代码来源:ApplinkDialog.cpp

示例2: InitValues

Bool ApplinkDialog::InitValues(void)
{
	if (!GeDialog::InitValues()) return false;
    
	filenamePrefs = GeGetPluginPath()+ "preference.ini";
	dirty = false;
	
	AutoAlloc<HyperFile> hyperfilePrefs;
    
	if(!GeFExist(filenamePrefs, false))
	{
		if (!hyperfilePrefs->Open('coat', filenamePrefs.GetString(), FILEOPEN_WRITE, FILEDIALOG_ANY)) return false;
        
		gPreferences.SetString(IDC_TMP_FOLDER, "");
        
        Filename path;
#if defined _WIN32 || defined _WIN64
        path = GeGetC4DPath(C4D_PATH_MYDOCUMENTS);
#elif __APPLE__
        path = GeGetC4DPath(C4D_PATH_HOME);
#endif
		//file magic!
		Filename exFolder = path + "3D-CoatV3" + "Exchange";
		if(GeFExist(exFolder, true))
		{
			gPreferences.SetString(IDC_EXCH_FOLDER, exFolder.GetString());
		}
		else
		{
			exFolder = path + "3D-CoatV4" + "Exchange";
			if (GeFExist(exFolder, true))
			{
				gPreferences.SetString(IDC_EXCH_FOLDER, exFolder.GetString());
			}

			else
			{
				GePrint("Not Find");
#if defined _WIN32 || defined _WIN64
				GePrint(String("Folder ..\\MyDocuments\\3D-CoatV3\\Exchange not found!"));
#elif __APPLE__
				GePrint(String("Folder ../Users/admin/3D-CoatV3/Exchange  not found!"));
#endif
				gPreferences.SetString(IDC_EXCH_FOLDER, "");
			}
		}
        
		gPreferences.SetInt32(IDC_COMBO_MAP_TYPE, 0);
		gPreferences.SetBool(IDC_CHK_EXP_MAT, true);
		gPreferences.SetBool(IDC_CHK_EXP_UV, true);
		gPreferences.SetBool(IDC_CHK_SKIP_IMP_DIALOG, false);
		gPreferences.SetBool(IDC_CHK_SKIP_EXP_DIALOG, false);
        
		gPreferences.SetBool(IDC_CHK_IMP_MAT, true);
		gPreferences.SetInt32(IDC_COMBO_MAP_IMPORT, 0);
		gPreferences.SetBool(IDC_CHK_IMP_UV, true);
		gPreferences.SetBool(IDC_CHK_REPLACE, true);
		gPreferences.SetBool(IDC_CHK_PROMPT, false);
		
		gPreferences.SetString(IDC_COAT_EXE_PATH, "");
		gPreferences.SetBool(IDC_CHK_COAT_START, false);
        
		hyperfilePrefs->WriteContainer(gPreferences);
		hyperfilePrefs->Close();
	}
    
	if(!hyperfilePrefs->Open('coat', filenamePrefs.GetString(), FILEOPEN_READ, FILEDIALOG_ANY)) return false;
    
	hyperfilePrefs->ReadContainer(&gPreferences, true);
	hyperfilePrefs->Close();
    
	SetString(IDC_TMP_FOLDER, gPreferences.GetString(IDC_TMP_FOLDER));
	SetString(IDC_EXCH_FOLDER, gPreferences.GetString(IDC_EXCH_FOLDER));
    
	SetInt32(IDC_COMBO_MAP_TYPE, gPreferences.GetInt32(IDC_COMBO_MAP_TYPE));
	SetBool(IDC_CHK_EXP_MAT, gPreferences.GetBool(IDC_CHK_EXP_MAT));
	SetBool(IDC_CHK_EXP_UV, gPreferences.GetBool(IDC_CHK_EXP_UV));
	SetBool(IDC_CHK_SKIP_IMP_DIALOG, gPreferences.GetBool(IDC_CHK_SKIP_IMP_DIALOG));
	SetBool(IDC_CHK_SKIP_EXP_DIALOG, gPreferences.GetBool(IDC_CHK_SKIP_EXP_DIALOG));
    
	SetBool(IDC_CHK_IMP_MAT, gPreferences.GetBool(IDC_CHK_IMP_MAT));
	SetInt32(IDC_COMBO_MAP_IMPORT, gPreferences.GetInt32(IDC_COMBO_MAP_IMPORT));
	SetBool(IDC_CHK_IMP_UV, gPreferences.GetBool(IDC_CHK_IMP_UV));
	SetBool(IDC_CHK_REPLACE, gPreferences.GetBool(IDC_CHK_REPLACE));
	SetBool(IDC_CHK_PROMPT, gPreferences.GetBool(IDC_CHK_PROMPT));
	
	SetString(IDC_COAT_EXE_PATH, gPreferences.GetString(IDC_COAT_EXE_PATH));
	SetBool(IDC_CHK_COAT_START, gPreferences.GetBool(IDC_CHK_COAT_START));

    
#ifdef __APPLE__
    //------------ temp    
    //Enable(IDC_CHK_COAT_START, false);
    //Enable(IDC_COAT_EXE_PATH, false);    
    //-------------
//    SetString(IDS_STATIC12, "Folder ../Users/user/3D-CoatV3/Exchange  not found!");
#endif
    
	SetTimer(1000);
    
//.........这里部分代码省略.........
开发者ID:sshumihin,项目名称:3DCoat_Applinks,代码行数:101,代码来源:ApplinkDialog.cpp

示例3: InitValues

Bool ApplinkDialog::InitValues(void)
{
	if (!GeDialog::InitValues()) return FALSE;

	filenamePrefs = GeGetPluginPath()+ "preference.ini";
	dirty = FALSE;
	
	AutoAlloc<HyperFile> hyperfilePrefs;

	if(!GeFExist(filenamePrefs, FALSE))
	{
		if (!hyperfilePrefs->Open(filenamePrefs.GetString(), GE_WRITE, FILE_NODIALOG)) return FALSE;

		gPreferences.SetString(IDC_TMP_FOLDER, "");

		Filename exFolder = GeGetC4DPath(C4D_PATH_MYDOCUMENTS) + "3D-CoatV3" + "Exchange";
		if(GeFExist(exFolder, TRUE))
		{
			gPreferences.SetString(IDC_EXCH_FOLDER, exFolder.GetString());
		}
		else
		{
			GePrint(String("Folder ..\\MyDocuments\\3D-CoatV3\\Exchange not found!"));
			gPreferences.SetString(IDC_EXCH_FOLDER, "");
		}

		gPreferences.SetLong(IDC_COMBO_MAP_TYPE, 0);
		gPreferences.SetBool(IDC_CHK_EXP_MAT, TRUE);
		gPreferences.SetBool(IDC_CHK_EXP_UV, TRUE);

		gPreferences.SetBool(IDC_CHK_IMP_MAT, TRUE);
		gPreferences.SetLong(IDC_COMBO_MAP_IMPORT, 0);
		gPreferences.SetBool(IDC_CHK_IMP_UV, TRUE);
		gPreferences.SetBool(IDC_CHK_REPLACE, TRUE);
		gPreferences.SetBool(IDC_CHK_PROMPT, FALSE);
		
		gPreferences.SetString(IDC_COAT_EXE_PATH, "");
		gPreferences.SetBool(IDC_CHK_COAT_START, FALSE);

		hyperfilePrefs->WriteContainer(gPreferences);
		hyperfilePrefs->Close();
	}

	if(!hyperfilePrefs->Open(filenamePrefs.GetString(), GE_READ, FILE_NODIALOG)) return FALSE;

	hyperfilePrefs->ReadContainer(&gPreferences, TRUE);
	hyperfilePrefs->Close();

	SetString(IDC_TMP_FOLDER, gPreferences.GetString(IDC_TMP_FOLDER));
	SetString(IDC_EXCH_FOLDER, gPreferences.GetString(IDC_EXCH_FOLDER));

	SetLong(IDC_COMBO_MAP_TYPE, gPreferences.GetLong(IDC_COMBO_MAP_TYPE));
	SetBool(IDC_CHK_EXP_MAT, gPreferences.GetBool(IDC_CHK_EXP_MAT));
	SetBool(IDC_CHK_EXP_UV, gPreferences.GetBool(IDC_CHK_EXP_UV));

	SetBool(IDC_CHK_IMP_MAT, gPreferences.GetBool(IDC_CHK_IMP_MAT));
	SetLong(IDC_COMBO_MAP_IMPORT, gPreferences.GetLong(IDC_COMBO_MAP_IMPORT));
	SetBool(IDC_CHK_IMP_UV, gPreferences.GetBool(IDC_CHK_IMP_UV));
	SetBool(IDC_CHK_REPLACE, gPreferences.GetBool(IDC_CHK_REPLACE));
	SetBool(IDC_CHK_PROMPT, gPreferences.GetBool(IDC_CHK_PROMPT));
	
	SetString(IDC_COAT_EXE_PATH, gPreferences.GetString(IDC_COAT_EXE_PATH));
	SetBool(IDC_CHK_COAT_START, gPreferences.GetBool(IDC_CHK_COAT_START));

	SetTimer(1000);

	return TRUE;
}
开发者ID:oyaGG,项目名称:3DCoat_Applinks,代码行数:68,代码来源:ApplinkDialog.cpp


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