ArcGISWindowsPhoneSDK.ShowGPSLocation.watcher_StatusChanged C# (CSharp) Method

watcher_StatusChanged() private method

private watcher_StatusChanged ( object sender, GeoPositionStatusChangedEventArgs e ) : void
sender object
e GeoPositionStatusChangedEventArgs
return void
        void watcher_StatusChanged(object sender, GeoPositionStatusChangedEventArgs e)
        {
            switch (e.Status)
            {
                case GeoPositionStatus.Disabled:
                    // The location service is disabled or unsupported.
                    // Alert the user
                    StatusTextBlock.Text = "Location is unsupported on this device";
                    break;
                case GeoPositionStatus.Initializing:
                    // The location service is initializing.
                    // Disable the Start Location button
                    StatusTextBlock.Text = "Initializing location service";
                    break;
                case GeoPositionStatus.NoData:
                    // The location service is working, but it cannot get location data
                    // Alert the user and enable the Stop Location button
                    StatusTextBlock.Text = "Data unavailable";
                    break;
                case GeoPositionStatus.Ready:
                    // The location service is working and is receiving location data
                    // Show the current position and enable the Stop Location button
                    StatusTextBlock.Text = "Ready - retrieving data";
                    break;
            }
        }