private static void UpdateControl( GeoLocationBox glb, NZazuCoordinate val, ISupportGeoLocationBox support) { glb.SetToCurrentLocation.Visibility = support != null && support.HasCurrentPosition ? Visibility.Visible : Visibility.Collapsed; glb.OpenInGeoApp.Visibility = support != null && support.CanOpenGeoApp ? Visibility.Visible : Visibility.Collapsed; glb.OpenInGeoApp.IsEnabled = val != null && support != null && support.CanOpenGeoApp; glb.LocationBox.IsEnabled = support != null; glb.LocationBox.Text = support?.ToString(val) ?? "no valid coordinate converter added"; }
public NZazuLocationField(FieldDefinition definition, Func <Type, object> serviceLocatorFunc) : base(definition, serviceLocatorFunc) { _geoSupport = (ISupportGeoLocationBox)serviceLocatorFunc(typeof(ISupportGeoLocationBox)); }