private void RefreshRadiusLocationData(LocationTypeRadius location) { this.textLocationType.SetText(location.DisplayNameResourceId); string textFormat = this.Context.GetString(Resource.String.size_with_unit); this.textRadiusSize.Text = string.Format(textFormat, location.Radius, location.MeasureUnit.Name()); }
private void SetupForRadiusLocationSelection(LocationTypeRadius location) { this.textLocationType.Visibility = ViewStates.Visible; this.containerRadius.Visibility = ViewStates.Visible; this.containerRectangular.Visibility = ViewStates.Gone; this.RefreshRadiusLocationData(location); }
public LocationType CreateLocationType() { if (this.CurrentLocation is RectangularLocationSelection) { return(LocationTypeRectangular.FromCurrentLocationSelectionAndSettings(this.CurrentLocation, this.settingsManager)); } else if (this.CurrentLocation is RadiusLocationSelection) { return(LocationTypeRadius.FromCurrentLocationSelection(this.CurrentLocation, this.settingsManager)); } return(LocationTypeNone.FromCurrentLocationSelection(this.CurrentLocation)); }
public LocationType GetCurrentLocationType() { switch (this.CurrentLocationSelection) { case RadiusLocationSelection locationSelection: return(LocationTypeRadius.FromCurrentLocationSelection(locationSelection, this.settingsManager));; case RectangularLocationSelection locationSelection: return(LocationTypeRectangular.FromCurrentLocationSelectionAndSettings(locationSelection, this.settingsManager)); default: return(LocationTypeNone.FromCurrentLocationSelection(this.CurrentLocationSelection)); } }