PhoneLine.LineChanged 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
// Register
event_token LineChanged(TypedEventHandler<PhoneLine, IInspectable const&> const& handler) const;
// Revoke with event_token
void LineChanged(event_token const* cookie) const;
// Revoke with event_revoker
PhoneLine::LineChanged_revoker LineChanged(auto_revoke_t, TypedEventHandler<PhoneLine, IInspectable const&> const& handler) const;
public event TypedEventHandler<PhoneLine,object> LineChanged;
function onLineChanged(eventArgs) { /* Your code */ }
phoneLine.addEventListener("linechanged", onLineChanged);
phoneLine.removeEventListener("linechanged", onLineChanged);
- or -
phoneLine.onlinechanged = onLineChanged;
Public Custom Event LineChanged As TypedEventHandler(Of PhoneLine, Object)
事件類型
TypedEventHandler<PhoneLine,IInspectable>
Windows 需求
應用程式功能 |
phoneCallHistory
phoneCallHistorySystem
|
備註
下列範例示範如何監視和更新網路狀態。
private async void MonitorLineChanges(Guid lineId)
{
// Get the PhoneLine instance
PhoneLine line = await PhoneLine.FromIdAsync(lineId);
PhoneNetworkState updatedNetworkState;
string updatedNetworkName;
line.LineChanged += (o, args) =>
{
updatedNetworkState = line.NetworkState;
updatedNetworkName = line.NetworkName;
};
}