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


C++ FileSel::AllFilesType方法代码示例

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


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

示例1: IdeFs

void IdeFs(FileSel& fs)
{
	fs.WhenIcon = callback(IdeFileIcon);
	fs.AllFilesType();
	fs.Multi();
	fs.NoAsking();
	fs.ReadOnlyOption();
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:8,代码来源:ComDlg.cpp

示例2: DoBrowse

void DlgCompareDir::DoBrowse(Ctrl *field)
{
	FileSel fsel;
	fsel.AllFilesType();
	static String recent_dir;
	fsel <<= Nvl((String)~*field, recent_dir);
	if(fsel.ExecuteSelectDir())
		*field <<= recent_dir = ~fsel;
}
开发者ID:ultimatepp,项目名称:mirror,代码行数:9,代码来源:main.cpp

示例3: sSD

FileSel& sSD()
{
	static bool b;
	static FileSel fs;
	if(!b) {
		fs.AllFilesType();
		b = true;
	}
	return fs;
}
开发者ID:ultimatepp,项目名称:mirror,代码行数:10,代码来源:FindInFiles.cpp

示例4: AnyPackageFs

FileSel& AnyPackageFs()
{
	static FileSel fs;
	static bool b;
	if(!b) {
		fs.Type("Ultimate++ package (*.upp)", "*.upp");
		fs.AllFilesType();
		b = true;
	}
	return fs;
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:11,代码来源:ComDlg.cpp

示例5: Pdf

void ReportWindow::Pdf()
{
	static FileSel fs;
	static bool b;
	if(!b) {
		fs.Type(t_("PDF file"), "*.pdf");
		fs.AllFilesType();
	}
	if(!fs.ExecuteSaveAs(t_("Output PDF file")))
		return;
	SaveFile(~fs, UPP::Pdf(*report));
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:12,代码来源:ReportDlg.cpp

示例6: CreateMakefile

void Ide::CreateMakefile()
{
    const Workspace& wspc = IdeWorkspace();
    if(wspc.GetCount() == 0) {
        PutConsole("Project is empty!");
        return;
    }
    FileSel mfout;
    mfout.AllFilesType();
    mfout <<= AppendFileName(GetFileDirectory(PackagePath(wspc[0])), "Makefile");
    if(!mfout.ExecuteSaveAs("Save makefile as"))
        return;
    SaveMakeFile(~mfout, true);
}
开发者ID:kolyden,项目名称:mirror,代码行数:14,代码来源:Build.cpp

示例7: OutputFs

FileSel& OutputFs()
{
	static FileSel *fsp;
	if(!fsp) {
		static FileSel fs;
		fs.AllFilesType();
		fs.Type("Various (*.log *.map *.ini *.sql)", "*.log *.map *.ini *.sql");
		fs.Type("Log files (*.log)", "*.log");
		fs.Type("Map files (*.map)", "*.map");
		fs.Type("Ini files (*.ini)", "*.ini");
		fs.Type("SQL scripts (*.sql)", "*.sql");
		IdeFs(fs);
		fsp = &fs;
	}
	fsp->Multi();
	return *fsp;
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:17,代码来源:ComDlg.cpp

示例8: Run

void DlgSqlExport::Run(Sql& cursor, String command, String tablename)
{
	Title(Nvl(tablename, t_("SQL query")) + t_(" export"));
	object_name <<= tablename;
	if(!cursor.Execute(command)) {
		Exclamation(NFormat(t_("Error executing [* \1%s\1]: \1%s"), command, cursor.GetLastError()));
		return;
	}
	for(int i = 0; i < cursor.GetColumns(); i++) {
		const SqlColumnInfo& sci = cursor.GetColumnInfo(i);
		String type;
		switch(sci.valuetype) {
			case BOOL_V:
			case INT_V: type = t_("integer"); break;
			case DOUBLE_V: type = t_("real number"); break;
			case STRING_V:
			case WSTRING_V: type = t_("string"); break;
			case DATE_V: type = t_("date"); break;
			case TIME_V: type = t_("date/time"); break;
			case /*ORA_BLOB_V*/-1: type = t_("BLOB"); break;
			case /*ORA_CLOB_V*/-2: type = t_("CLOB"); break;
			default: type = FormatInt(sci.valuetype); break;
		}
		columns.Add(sci.name, sci.valuetype, sci.width, 1);
	}
	static String cfg;
	LoadFromString(*this, cfg);
	SyncUI();
	while(TopWindow::Run() == IDOK)
		try {
			String out_table = ~object_name;
			String delim;
			switch((int)~delimiters) {
				case DELIM_TAB: delim = "\t"; break;
				case DELIM_SEMICOLON: delim = ";"; break;
			}
			Vector<int> out;
			String colstr;
			String title;
			for(int i = 0; i < columns.GetCount(); i++)
				if(columns.Get(i, 3)) {
					out.Add(i);
					String cname = cursor.GetColumnInfo(i).name;
					colstr << (i ? ", " : "") << cname;
					if(i) title << delim;
					title << cname;
				}
			if(out.IsEmpty()) {
				throw Exc(t_("No columns selected!"));
				continue;
			}
			String rowbegin, rowend;
			int fmt = ~format;
			FileSel fsel;
			String ext;
			switch(fmt) {
				case FMT_TEXT: {
					rowend = "";
					ext = ".txt";
					fsel.Type(t_("Text files (*.txt)"), "*.txt");
					break;
				}
				case FMT_SQL: {
					if(identity_insert)
						rowbegin << "set identity_insert " << out_table << " on ";
					rowbegin << "insert into " << out_table << "(" << colstr << ") values (";
					rowend = ");";
					ext = ".sql";
					fsel.Type(t_("SQL scripts (*.sql)"), "*.sql");
					break;
				}
			}
			fsel.AllFilesType().DefaultExt(ext.Mid(1));
			if(!IsNull(recent_file))
				fsel <<= ForceExt(recent_file, ext);
			if(!fsel.ExecuteSaveAs(t_("Save export as")))
				continue;
			recent_file = ~fsel;
			FileOut fo;
			if(!fo.Open(recent_file)) {
				Exclamation(NFormat(t_("Error creating file [* \1%s\1]."), recent_file));
				continue;
			}
			if(fmt == FMT_TEXT)
				fo.PutLine(title);
			Progress progress(t_("Exporting row %d"));
			while(cursor.Fetch()) {
				String script = rowbegin;
				for(int i = 0; i < out.GetCount(); i++) {
					Value v = cursor[out[i]];
					switch(fmt) {
						case FMT_TEXT: {
							if(i)
								script.Cat(delim);
							if(IsString(v) && quote) {
								String s = v;
								script << '\"';
								for(const char *p = s, *e = s.End(); p < e; p++)
									if(*p == '\"')
										script.Cat("\"\"");
//.........这里部分代码省略.........
开发者ID:radtek,项目名称:lister,代码行数:101,代码来源:SqlObjectTree.cpp


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