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));
        }
Пример #2
0
        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));
            }
        }