IAdeUICallbacks::GetFilename

This page is a translated version of the page IAdeUICallbacks::GetFilename and the translation is 100% complete.

ADE User Guide > ADE Server Class Reference > IAdeUICallbacks

Other languages:
English • ‎中文

string GetFilename([in] string function, [in] string defaultName, [in] string directory, [in] string extensions, [in] string caption, [in] CAObject* callingIdent)

当用户被要求选择以文件名时,在任何一个函数被计算时调用。这些函数包括SpreadsheetOpen()、ReadTextFile()、ReadImageFile()和 ReadExportFile

此执行将允许用户选择文件,或者如果你正在执行一个网络应用程序时,你应该允许用户上传文件。

在文件读取后,将调用IAdeUICallbacks::FileOpenCompleted()函数。如果你的应用程序将一个文件卸载到一个临时位置,你可以安全删除该临时文件。

如果该对话是多余的,将不调用该方法。

参 数

  • «function»:请求文件名的内嵌函数的标识符。例如"SpreadsheetOpen"、"ReadTextFile"、"ReadImageFile"或者"ReadExportFile"。
  • «directory»:当前目录
  • «extensions»:要过滤的文件扩展名列表。当多于一种扩展名时,将用"||"符号分开。每一个扩展名包含两部分,用"|"分开。第一部分是一个通配符列表,例如"*.txt;*.dat",每一个通配符用一个分号隔开。第二部分是扩张名的一个用户友好描述。例如, SpreadsheetOpen可以提供以下过滤:"*.xl*;*.csv|Excel Files (*.xl*;*.csv)||*.*|All Files (*.*)"
  • «caption»:给打开文件对话窗口推荐的标题或标题文本。
  • «callingIdent»:一个指向模型中用户对象的CAObject指针,该模型调用内嵌函数。

返回值

被选择或卸载文件的完整路径。

另请参考

Comments


You are not allowed to post comments.