private void Submit()
        {
            WhereToMessage.Send(new Models.WhereToModel(SelectedCustomPoint.Address, SelectedCustomPoint.Location, searchType));

            NavigationService.RemoveBackEntry();
            NavigationService.GoBack();
        }
Пример #2
0
        private void Submit()
        {
            if (!PointA.HasValue() && !PointB.HasValue())
            {
                base.ShowPopup(CustomPopupMessageType.Error, AppResources.MapPointSelectionNoPointsPlacedPopupText, AppResources.CustomPopupGenericOkMessage, null);
                return;
            }

            if (fromWhereTo)
            {
                WhereToMessage.Send(new WhereToModel(PointA.Name, PointB.Name, PointA.Location, PointB.Location));

                NavigationService.GoBack();
            }
            else
            {
                if (PointA.HasValue() && PointB.HasValue())
                {
                    NavigationService.NavigateTo(string.Format("/Views/WhereTo.xaml?startname={0}&endname={1}&startlat={2}&startlon={3}&endlat={4}&endlon={5}", PointA.Name, PointB.Name, PointA.Location.Latitude.ToString(CultureInfo.InvariantCulture), PointA.Location.Longitude.ToString(CultureInfo.InvariantCulture), PointB.Location.Latitude.ToString(CultureInfo.InvariantCulture), PointB.Location.Longitude.ToString(CultureInfo.InvariantCulture)));
                }
                else if (PointA.HasValue() && !PointB.HasValue())
                {
                    NavigationService.NavigateTo(string.Format("/Views/WhereTo.xaml?startname={0}&startlat={1}&startlon={2}", PointA.Name, PointA.Location.Latitude.ToString(CultureInfo.InvariantCulture), PointA.Location.Longitude.ToString(CultureInfo.InvariantCulture)));
                }
                else if (!PointA.HasValue() && PointB.HasValue())
                {
                    NavigationService.NavigateTo(string.Format("/Views/WhereTo.xaml?endname={0}&endlat={1}&endlon={2}", PointB.Name, PointB.Location.Latitude.ToString(CultureInfo.InvariantCulture), PointB.Location.Longitude.ToString(CultureInfo.InvariantCulture)));
                }
            }
        }
Пример #3
0
        private void CurrentLocation()
        {
            if (!base.InMemoryApplicationSettingModel.GetSetting(ApplicationSetting.AllowLocation).Value)
            {
                ShowPopup(CustomPopupMessageType.Error, AppResources.LocationAppDisabledErrorMessage, AppResources.CustomPopupGenericOkGotItMessage, null);
                return;
            }

            WhereToMessage.Send(new Models.WhereToModel(string.Empty, null, searchType));

            NavigationService.GoBack();
        }