本文整理汇总了VB.NET中System.Device.Location.GeoPositionStatus枚举的典型用法代码示例。如果您正苦于以下问题:VB.NET GeoPositionStatus枚举的具体用法?VB.NET GeoPositionStatus怎么用?VB.NET GeoPositionStatus使用的例子?那么恭喜您, 这里精选的枚举代码示例或许可以为您提供帮助。
在下文中一共展示了GeoPositionStatus枚举的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: GetLocationEvent
' 导入命名空间
Imports System.Device.Location
Module GetLocationEvent
Sub ShowStatusUpdates()
Dim Watcher As GeoCoordinateWatcher
Watcher = New GeoCoordinateWatcher()
watcher.Start()
AddHandler Watcher.StatusChanged, AddressOf watcher_StatusChanged
Console.WriteLine("Enter any key to quit.")
Console.ReadLine()
End Sub
Sub watcher_StatusChanged(ByVal sender As Object, ByVal e As GeoPositionStatusChangedEventArgs)
Select Case e.Status
Case GeoPositionStatus.Initializing
Console.WriteLine("Working on location fix")
Case GeoPositionStatus.Ready
Console.WriteLine("Have location")
Case GeoPositionStatus.NoData
Console.WriteLine("No data")
Case GeoPositionStatus.Disabled
Console.WriteLine("Disabled")
End Select
End Sub
Public Sub Main()
ShowStatusUpdates()
End Sub
End Module