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.