我有一个datepicker字段,我的用户插入了一个日期。我的监听器将用户的日期发送到函数以对此日期进行验证并发送消息并释放按钮并保存此新状态。问题:
该功能执行用户插入其他日期或在我的字段内单击。有人知道我是如何解决这个问题的吗?
Add-Type -AssemblyName System.Device #Required to access System.Device.Location namespace
$GeoWatcher = New-Object System.Device.Location.GeoCoordinateWatcher #Create the required object
$GeoWatcher.Start() #Begin resolving current locaton
while (($GeoWatcher.Status -ne 'Ready') -and ($GeoWatcher.Permission -ne 'Denied')) {
Start-Sleep -Milliseconds 100 #Wait for discovery.
}
if ($GeoWatcher.Permission -eq 'Denied'){
Write-Error 'Access Denied for Location Information'
} else {
$GeoWatcher.Position.Location | Select Latitude,Longitude #Select the relevent results.
}