private void gps_DeviceStateChanged(object sender, Microsoft.WindowsMobile.Samples.Location.DeviceStateChangedEventArgs args) { if (oldState == args.DeviceState.ServiceState) { return; } //switch (args.DeviceState.ServiceState) { // case GpsServiceState.Uninitialized: // case GpsServiceState.Unknown : // case GpsServiceState.Off: OnStateChanged(GpsState.Closed); // break; // case GpsServiceState.On: OnStateChanged(GpsState.Open); // break; // case GpsServiceState.Unloading : // case GpsServiceState.ShuttingDown:OnStateChanged(GpsState.Closing); // break; // case GpsServiceState.StartingUp: OnStateChanged(GpsState.Opening); // break; //} oldState = args.DeviceState.ServiceState; }
private void gps_DeviceStateChanged(object sender, Microsoft.WindowsMobile.Samples.Location.DeviceStateChangedEventArgs args) { if (oldState == args.DeviceState.ServiceState) return; //switch (args.DeviceState.ServiceState) { // case GpsServiceState.Uninitialized: // case GpsServiceState.Unknown : // case GpsServiceState.Off: OnStateChanged(GpsState.Closed); // break; // case GpsServiceState.On: OnStateChanged(GpsState.Open); // break; // case GpsServiceState.Unloading : // case GpsServiceState.ShuttingDown:OnStateChanged(GpsState.Closing); // break; // case GpsServiceState.StartingUp: OnStateChanged(GpsState.Opening); // break; //} oldState = args.DeviceState.ServiceState; }