共用方式為


SmsDevice.SmsDeviceStatusChanged 事件

定義

設定 SMS 裝置狀態變更時要呼叫的事件處理常式。

public:
 virtual event SmsDeviceStatusChangedEventHandler ^ SmsDeviceStatusChanged;
/// [add: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Devices.Sms.LegacySmsApiContract)]
/// [remove: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Devices.Sms.LegacySmsApiContract)]
// Register
event_token SmsDeviceStatusChanged(SmsDeviceStatusChangedEventHandler const& handler) const;

// Revoke with event_token
void SmsDeviceStatusChanged(event_token const* cookie) const;

// Revoke with event_revoker
SmsDevice::SmsDeviceStatusChanged_revoker SmsDeviceStatusChanged(auto_revoke_t, SmsDeviceStatusChangedEventHandler const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
// Register
event_token SmsDeviceStatusChanged(SmsDeviceStatusChangedEventHandler const& handler) const;

// Revoke with event_token
void SmsDeviceStatusChanged(event_token const* cookie) const;

// Revoke with event_revoker
SmsDevice::SmsDeviceStatusChanged_revoker SmsDeviceStatusChanged(auto_revoke_t, SmsDeviceStatusChangedEventHandler const& handler) const;
[add: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
[remove: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
public event SmsDeviceStatusChangedEventHandler SmsDeviceStatusChanged;
[add: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("SmsDevice may be altered or unavailable for releases after Windows 10. Instead, use SmsDevice2.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
public event SmsDeviceStatusChangedEventHandler SmsDeviceStatusChanged;
function onSmsDeviceStatusChanged(eventArgs) { /* Your code */ }
smsDevice.addEventListener("smsdevicestatuschanged", onSmsDeviceStatusChanged);
smsDevice.removeEventListener("smsdevicestatuschanged", onSmsDeviceStatusChanged);
- or -
smsDevice.onsmsdevicestatuschanged = onSmsDeviceStatusChanged;
Public Custom Event SmsDeviceStatusChanged As SmsDeviceStatusChangedEventHandler Implements SmsDeviceStatusChanged

事件類型

實作

屬性

Windows 需求

應用程式功能
cellularMessaging sms

適用於