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;
};
}