PowerGridForecast.ForecastUpdated 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當新的預測承載就緒時要通知訂閱者的事件。 預期當您的應用程式收到此通知時,您將會呼叫 GetForecast。
// Register
static event_token ForecastUpdated(EventHandler<IInspectable> const& handler) const;
// Revoke with event_token
static void ForecastUpdated(event_token const* cookie) const;
// Revoke with event_revoker
static PowerGridForecast::ForecastUpdated_revoker ForecastUpdated(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> ForecastUpdated;
function onForecastUpdated(eventArgs) { /* Your code */ }
Windows.Devices.Power.PowerGridForecast.addEventListener("forecastupdated", onForecastUpdated);
Windows.Devices.Power.PowerGridForecast.removeEventListener("forecastupdated", onForecastUpdated);
- or -
Windows.Devices.Power.PowerGridForecast.onforecastupdated = onForecastUpdated;
Public Shared Custom Event ForecastUpdated As EventHandler(Of Object)