共用方式為


WebUICachedFileUpdaterActivatedEventArgs 類別

定義

提供使用者儲存或開啟需要應用程式更新之檔案時所引發之啟動事件的相關資訊。

C#/C++/VB 此類型會顯示為 CachedFileUpdaterActivatedEventArgs

public ref class WebUICachedFileUpdaterActivatedEventArgs sealed : ICachedFileUpdaterActivatedEventArgs, IActivatedEventArgsDeferral
public ref class WebUICachedFileUpdaterActivatedEventArgs sealed : IActivatedEventArgsWithUser, ICachedFileUpdaterActivatedEventArgs, IActivatedEventArgsDeferral
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
class WebUICachedFileUpdaterActivatedEventArgs final : ICachedFileUpdaterActivatedEventArgs, IActivatedEventArgsDeferral
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
class WebUICachedFileUpdaterActivatedEventArgs final : IActivatedEventArgsWithUser, ICachedFileUpdaterActivatedEventArgs, IActivatedEventArgsDeferral
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
public sealed class WebUICachedFileUpdaterActivatedEventArgs : ICachedFileUpdaterActivatedEventArgs, IActivatedEventArgsDeferral
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
public sealed class WebUICachedFileUpdaterActivatedEventArgs : IActivatedEventArgsWithUser, ICachedFileUpdaterActivatedEventArgs, IActivatedEventArgsDeferral
Public NotInheritable Class WebUICachedFileUpdaterActivatedEventArgs
Implements IActivatedEventArgsDeferral, ICachedFileUpdaterActivatedEventArgs
Public NotInheritable Class WebUICachedFileUpdaterActivatedEventArgs
Implements IActivatedEventArgsDeferral, IActivatedEventArgsWithUser, ICachedFileUpdaterActivatedEventArgs
繼承
Object Platform::Object IInspectable WebUICachedFileUpdaterActivatedEventArgs
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

範例

檔案選擇器合約範例示範如何回應cachedFileUpdater啟動的事件。

// cachedFileUpdater activated event handler
function activated(eventObject) {
        // Identify whether app was launched for cachedFileUpdater
        if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.cachedFileUpdater) {
            // Perform tasks to prepare your app to display its file picker page

            // Get file picker UI
            cachedFileUpdaterUI = eventObject.detail.cachedFileUpdaterUI;

            cachedFileUpdaterUI.addEventListener("fileupdaterequested", onFileUpdateRequest);
            cachedFileUpdaterUI.addEventListener("uirequested", onUIRequested);

            switch (cachedFileUpdaterUI.updateTarget) {
                case Windows.Storage.Provider.CachedFileTarget.local:
                    scenarios = [{ url: "/html/cachedFileUpdaterScenario1.html", title: "Get latest version" }];
                    break;
                case Windows.Storage.Provider.CachedFileTarget.remote:
                    scenarios = [{ url: "/html/cachedFileUpdaterScenario2.html", title: "Remote file update" }];
                    break;
            }
            SdkSample.scenarios = scenarios;
        }
    }

// Register the activated event handler
WinJS.Application.addEventListener("activated", activated, false);

針對 JavaScript, eventObject 包含 webUICachedFileUpdaterActivatedEventArgs 物件。

備註

深入瞭解如何在快速入門:透過Windows.Storage.Pickers.Provider命名空間參考中提供檔案服務,以取得應用程式所提供的檔案更新。

當您為WinJS.Application.OnactivatedWindows.UI.WebUI.WebUIApplication.activated事件實作事件處理常式時,會存取此物件。

注意

這個類別不是敏捷式的,這表示您需要考慮其執行緒模型和封送處理行為。 如需詳細資訊,請參閱 執行緒和封送處理 (C++/CX)

版本歷程記錄

Windows 版本 SDK 版本 已新增值
1607 14393 User

屬性

ActivatedOperation

取得應用程式啟動的作業。

CachedFileUpdaterUI

取得檔案需要從應用程式更新時所顯示之檔案選擇器的信件箱 UI。

Kind

取得啟用類型。

PreviousExecutionState

取得應用程式啟動前的執行狀態。

SplashScreen

取得啟動顯示畫面物件,提供從啟動顯示畫面轉換至啟動應用程式的相關資訊。

User

取得啟動應用程式的使用者。

適用於

另請參閱