IAdeUICallbacks::GetFilename

Revision as of 02:42, 27 October 2015 by Jhuawen (Talk | contribs) (Created page with "如果该对话是多余的,将不调用该方法。")

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»: the identifier of the built-in function that is requesting the filename. E.g., "SpreadsheetOpen", "ReadTextFile", "ReadImageFile", or "ReadExportFile".
  • «directory»: The current directory.
  • «extensions»: A list of file extensions to filter for. When there is more that one possible extension, they are separated by a double bar, "||". Each extension has two parts, separated by a single bar, "|". The first part is a list of wild cards such as "*.txt;*.dat", each wildcard separated by semi-colons. The second part is a user-friendly description of the extension. For example, SpreadsheetOpen may provide the following filter: "*.xl*;*.csv|Excel Files (*.xl*;*.csv)||*.*|All Files (*.*)"
  • «caption»: The recommended title or caption text for a file open dialog.
  • «callingIdent»: A CAObject pointer to the user-object in the model that is calling the build-in function.

返回值

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

另请参考

Comments


You are not allowed to post comments.