mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 05:47:28 +02:00
3.0.257 merged
This commit is contained in:
parent
de8d5f8414
commit
b6fb6394db
155 changed files with 805 additions and 5751 deletions
|
@ -15,6 +15,7 @@ using MonkeyCache.FileStore;
|
|||
using Plugin.Connectivity;
|
||||
using System.Threading;
|
||||
using TINK.Model.Settings;
|
||||
using Plugin.Permissions;
|
||||
using TINK.Services.BluetoothLock.Crypto;
|
||||
using TINK.Model.Services.Geolocation;
|
||||
using TINK.Services;
|
||||
|
@ -82,8 +83,8 @@ namespace TINK
|
|||
try
|
||||
{
|
||||
settings = new Model.Settings.Settings(
|
||||
JsonSettingsDictionary.GetGroupFilterMapPage(settingsJSON) ?? GroupFilterHelper.GetMapPageFilterDefaults, // Activate map filtering for meinkonrad
|
||||
JsonSettingsDictionary.GetGoupFilterSettings(settingsJSON) ?? GroupFilterHelper.GetSettingsFilterDefaults,// Activate map filtering for meinkonrad
|
||||
JsonSettingsDictionary.GetGroupFilterMapPage(settingsJSON),
|
||||
JsonSettingsDictionary.GetGoupFilterSettings(settingsJSON),
|
||||
JsonSettingsDictionary.GetCopriHostUri(settingsJSON),
|
||||
JsonSettingsDictionary.GetPollingParameters(settingsJSON),
|
||||
JsonSettingsDictionary.GetMinimumLoggingLevel(settingsJSON),
|
||||
|
@ -93,7 +94,6 @@ namespace TINK
|
|||
JsonSettingsDictionary.GetConnectTimeout(settingsJSON),
|
||||
JsonSettingsDictionary.GetActiveGeolocationService(settingsJSON),
|
||||
JsonSettingsDictionary.GetCenterMapToCurrentLocation(settingsJSON),
|
||||
Xamarin.Forms.GoogleMaps.MapSpan.FromCenterAndRadius(new Xamarin.Forms.GoogleMaps.Position(47.680, 9.180), Xamarin.Forms.GoogleMaps.Distance.FromKilometers(2.9)),
|
||||
JsonSettingsDictionary.GetLogToExternalFolder(settingsJSON),
|
||||
JsonSettingsDictionary.GetIsSiteCachingOn(settingsJSON),
|
||||
JsonSettingsDictionary.GetActiveTheme(settingsJSON) ?? typeof(Themes.Konrad).FullName);
|
||||
|
@ -145,7 +145,7 @@ namespace TINK
|
|||
m_oModelRoot = new TinkApp(
|
||||
settings,
|
||||
store, // Manages user account
|
||||
(isConnected, activeUri, sessionCookie, mail, expiresAfter) => ConnectorFactory.Create(isConnected, activeUri, $"Meinkonrad/{appInfoService.Version}", sessionCookie, mail, expiresAfter),
|
||||
(isConnected, activeUri, sessionCookie, mail, expiresAfter) => ConnectorFactory.Create(isConnected, activeUri, $"sharee.bike/{appInfoService.Version}", sessionCookie, mail, expiresAfter),
|
||||
GeolocationServicesContainer,
|
||||
null, /* locksService */
|
||||
DependencyService.Get<ISmartDevice>(),
|
||||
|
@ -255,30 +255,6 @@ namespace TINK
|
|||
.CreateLogger();
|
||||
}
|
||||
|
||||
/// <param name="uri">The URI for the request.</param>
|
||||
/// <summary>Overriden to respond when the user initiates an app link request.</summary>
|
||||
protected override void OnAppLinkRequestReceived(Uri uri)
|
||||
{
|
||||
base.OnAppLinkRequestReceived(uri);
|
||||
if (uri.Host.ToLower() == "sharee.bike")
|
||||
{
|
||||
// Input e.g. sharee.bike/sharee/?lat=49.921&long=32.51
|
||||
Array segments = Array.ConvertAll(uri.Segments, segment => segment.Replace("/", "")).Skip(1).ToArray();
|
||||
if (uri.Query.Length > 0)
|
||||
{
|
||||
Dictionary<string, string> queryDict = uri.Query
|
||||
.Substring(1)
|
||||
.Split("&")
|
||||
.Select(query => query.Split('='))
|
||||
.ToDictionary(query => query.FirstOrDefault(), query => query.Skip(1).FirstOrDefault());
|
||||
}
|
||||
// segments == ["sharee"]
|
||||
// queryDict == [{["lat", "49.921"]}], {["long", "32.51"]}]
|
||||
// => Navigate and pass params depending on linkinput
|
||||
// If no custom navigation is configured, the app just opens as if the user opened it
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets the current logging level.</summary>
|
||||
/// <returns></returns>
|
||||
private static LogEventLevel GetCurrentLogEventLevel()
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<br />Version ACTIVE_APPNAME: <b>CURRENT_VERSION_TINKAPP</b>.
|
||||
<div class="content_title2">Entwickler</div>
|
||||
<div style=""></div>
|
||||
<br />Programmierung ACTIVE_APPNAME: O. Hauff, app@sharee.bike<br />
|
||||
<br />Programmierung ACTIVE_APPNAME: O. Hauff, o.hauff@sharee.bike.<br />
|
||||
<div class="content_title2">Verwendete Bibliotheken</div>
|
||||
<div style=""></div>
|
||||
<br /><table>
|
||||
|
|
|
@ -149,7 +149,7 @@ namespace TINK.View.Account
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -37,7 +37,6 @@
|
|||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
@ -85,12 +84,6 @@
|
|||
IsVisible="{Binding TariffDescription.AboEuroPerMonth, Converter={StaticResource Label_Converter}}"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"/>
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding TariffDescription.OperatorAgb}"
|
||||
IsVisible="{Binding TariffDescription.OperatorAgb, Converter={StaticResource Label_Converter}}"
|
||||
Grid.Row="5"
|
||||
Grid.ColumnSpan="3"/>
|
||||
</Grid>
|
||||
</StackLayout>
|
||||
</ContentView>
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
@ -97,12 +96,6 @@
|
|||
IsVisible="{Binding TariffDescription.AboEuroPerMonth, Converter={StaticResource Label_Converter}}"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"/>
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding TariffDescription.OperatorAgb}"
|
||||
IsVisible="{Binding TariffDescription.OperatorAgb, Converter={StaticResource Label_Converter}}"
|
||||
Grid.Row="5"
|
||||
Grid.ColumnSpan="3"/>
|
||||
</Grid>
|
||||
</StackLayout>
|
||||
</ContentView>
|
||||
|
|
|
@ -14,69 +14,58 @@
|
|||
<Frame>
|
||||
<StackLayout
|
||||
Orientation="Vertical">
|
||||
<!-- Title bar stack layout-->
|
||||
<StackLayout
|
||||
Orientation="Vertical">
|
||||
<Label
|
||||
HorizontalOptions="Center"
|
||||
FontAttributes="Bold"
|
||||
Text="{Binding StationDetailText}"/>
|
||||
</StackLayout>
|
||||
<!-- Center stack layout -->
|
||||
<StackLayout
|
||||
Orientation="Vertical"
|
||||
VerticalOptions="CenterAndExpand">
|
||||
<ListView
|
||||
x:Name="BikesAtStationListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
<Label
|
||||
<Label
|
||||
HorizontalOptions="Center"
|
||||
FontAttributes="Bold"
|
||||
Text="{Binding StationDetailText}"/>
|
||||
<ListView
|
||||
x:Name="BikesAtStationListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
<Label
|
||||
IsVisible="{Binding IsNoBikesAtStationVisible}"
|
||||
VerticalOptions="EndAndExpand"
|
||||
Text="{Binding NoBikesAtStationText}"/>
|
||||
</StackLayout>
|
||||
<!-- Status bar stack layout-->
|
||||
<StackLayout
|
||||
Orientation="Vertical">
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding ContactSupportHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
<Label
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding ContactSupportHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
<Label
|
||||
IsVisible="{Binding IsLoginRequiredHintVisible}"
|
||||
TextType="Html"
|
||||
Text="{Binding LoginRequiredHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
<StackLayout
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="20"
|
||||
Text="{Binding StatusInfoText}"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
HeightRequest="20"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="End">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
iOS="#2499CE" WinPhone="#2499CE" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
<StackLayout
|
||||
VerticalOptions="EndAndExpand"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="20"
|
||||
Text="{Binding StatusInfoText}"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
HeightRequest="20"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="End">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
iOS="#2499CE" WinPhone="#2499CE" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
|
|
|
@ -228,10 +228,7 @@ using TINK.View.MasterDetail;
|
|||
#if USCSHARP9
|
||||
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#else
|
||||
/// <summary> Displays user feedback popup.</summary>
|
||||
/// <param name="co2Saving"> Co2 saving information.</param>
|
||||
/// <returns>User feedback.</returns>
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(co2Saving));
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -88,7 +88,7 @@ namespace TINK.View.Contact
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#endif
|
||||
|
||||
#if USEFLYOUT
|
||||
|
|
|
@ -114,7 +114,7 @@ namespace TINK.View.Contact
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#endif
|
||||
|
||||
#if USEFLYOUT
|
||||
|
|
|
@ -12,14 +12,11 @@
|
|||
<Grid.RowDefinitions>
|
||||
<!-- Head and title row -->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--- Co2saving-->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--- checkbox and input elements-->
|
||||
<RowDefinition Height="*"/>
|
||||
<!--- ok button-->
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Head and title -->
|
||||
<Grid
|
||||
Padding="30"
|
||||
BackgroundColor="{DynamicResource primary-back-title-color}">
|
||||
|
@ -37,16 +34,7 @@
|
|||
</Image.Source>
|
||||
</Image>
|
||||
</Grid>
|
||||
<!-- Co2saving -->
|
||||
<Frame
|
||||
x:Name="Co2SavingFrame"
|
||||
Grid.Row="1">
|
||||
<Label
|
||||
x:Name="Co2SavingLabel"
|
||||
Text=""/>
|
||||
</Frame>
|
||||
<!-- Checkbox and input elements -->
|
||||
<ScrollView Grid.Row="2">
|
||||
<ScrollView Grid.Row="1">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
|
@ -89,9 +77,8 @@
|
|||
</StackLayout>
|
||||
</Grid>
|
||||
</ScrollView>
|
||||
<!-- Buttons -->
|
||||
<Button
|
||||
Grid.Row="3"
|
||||
Grid.Row="2"
|
||||
Clicked="OnOkClicked"
|
||||
Text="OK"/>
|
||||
</Grid>
|
||||
|
|
|
@ -7,15 +7,9 @@ namespace TINK.View
|
|||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class FeedbackPopup : Popup<FeedbackPopup.Result>
|
||||
{
|
||||
/// <summary> Constructs user feedback popup.</summary>
|
||||
/// <param name="co2Saving"> Co2 saving information.</param>
|
||||
public FeedbackPopup(string co2Saving = null)
|
||||
public FeedbackPopup()
|
||||
{
|
||||
InitializeComponent();
|
||||
if (string.IsNullOrEmpty(co2Saving))
|
||||
Co2SavingFrame.IsVisible = false;
|
||||
else
|
||||
Co2SavingLabel.Text = co2Saving;
|
||||
}
|
||||
|
||||
protected override FeedbackPopup.Result GetLightDismissResult()
|
||||
|
|
|
@ -138,7 +138,7 @@ namespace TINK.View.FindBike
|
|||
#if USCSHARP9
|
||||
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#else
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(co2Saving));
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -122,7 +122,7 @@ namespace TINK.View.Info.BikeInfo
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -116,7 +116,7 @@ namespace TINK.View.Login
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
xmlns:maps="clr-namespace:Xamarin.Forms.GoogleMaps;assembly=Xamarin.Forms.GoogleMaps"
|
||||
xmlns:bindings="clr-namespace:Xamarin.Forms.GoogleMaps.Bindings;assembly=Xamarin.Forms.GoogleMaps.Bindings"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.Map.MapPage"
|
||||
x:Class="TINK.View.Map.MapPage"
|
||||
Title="{x:Static resources:AppResources.MarkingMapPage}">
|
||||
<StackLayout>
|
||||
<Grid
|
||||
|
@ -22,24 +22,24 @@
|
|||
<Button
|
||||
x:Name="TINKButton"
|
||||
AutomationId ="FilterTINK_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCargoBike}"
|
||||
Text="TINK"
|
||||
Command="{Binding OnToggleKonradToTink}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
TextColor ="{Binding TinkColor}"
|
||||
VerticalOptions="Start"
|
||||
HorizontalOptions="StartAndExpand"
|
||||
Padding="10">
|
||||
WidthRequest="80">
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="KonradButton"
|
||||
AutomationId ="FilterKonrad_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCityBike}"
|
||||
Text="Konrad"
|
||||
Command="{Binding OnToggleTinkToKonrad}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
TextColor="{Binding KonradColor}"
|
||||
VerticalOptions="Start"
|
||||
HorizontalOptions="EndAndExpand"
|
||||
Padding="10">
|
||||
WidthRequest="80">
|
||||
</Button>
|
||||
</Grid>
|
||||
<StackLayout
|
||||
|
|
|
@ -117,7 +117,7 @@ namespace TINK.View.Map
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#endif
|
||||
|
||||
#if USEFLYOUT
|
||||
|
@ -139,11 +139,18 @@ namespace TINK.View.Map
|
|||
#if TRYNOTBACKSTYLE
|
||||
MapPageViewModel = new MapPageViewModel();
|
||||
#else
|
||||
MapPageViewModel = CreateMapPageViewModel();
|
||||
MapPageViewModel = new MapPageViewModel(
|
||||
App.ModelRoot,
|
||||
App.PermissionsService,
|
||||
App.BluetoothService,
|
||||
App.GeolocationServicesContainer.Active,
|
||||
(mapspan) => MyMap.MoveToRegion(mapspan),
|
||||
this,
|
||||
Navigation);
|
||||
#endif
|
||||
}
|
||||
catch (Exception exception)
|
||||
} catch (Exception exception)
|
||||
{
|
||||
|
||||
Log.ForContext<MapPage>().Error("Constructing map page view model failed. {Exception}", exception);
|
||||
return;
|
||||
}
|
||||
|
@ -164,7 +171,15 @@ namespace TINK.View.Map
|
|||
|
||||
try
|
||||
{
|
||||
ApplyCustomiOSStyling();
|
||||
if (Device.RuntimePlatform == Device.iOS)
|
||||
{
|
||||
TINKButton.BackgroundColor = Color.LightGray;
|
||||
TINKButton.BorderColor = Color.Black;
|
||||
TINKButton.Margin = new Thickness(10, 10, 10, 10);
|
||||
KonradButton.BackgroundColor = Color.LightGray;
|
||||
KonradButton.BorderColor = Color.Black;
|
||||
KonradButton.Margin = new Thickness(10, 10, 10, 10);
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
@ -186,9 +201,13 @@ namespace TINK.View.Map
|
|||
try
|
||||
{
|
||||
// Pre move and scanle maps to avoid initial display of map in Rome.
|
||||
PremoveAndScaleMap();
|
||||
Log.ForContext<MapPage>().Verbose("Moving and scaling map.");
|
||||
MapPageViewModel.MoveAndScale(
|
||||
(mapSpan) => MyMap.MoveToRegion(mapSpan),
|
||||
App.ModelRoot.Uris.ActiveUri,
|
||||
App.ModelRoot.GroupFilterMapPage);
|
||||
}
|
||||
catch (Exception exception)
|
||||
catch(Exception exception)
|
||||
{
|
||||
// Continue because a map not beeing moved/ scaled is no reason for aborting startup.
|
||||
Log.ForContext<MapPage>().Error("Moving and scaling map failed. {Exception}", exception);
|
||||
|
@ -206,49 +225,6 @@ namespace TINK.View.Map
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Premoves the Map to a certain location.
|
||||
/// </summary>
|
||||
private void PremoveAndScaleMap()
|
||||
{
|
||||
Log.ForContext<MapPage>().Verbose("Moving and scaling map.");
|
||||
MapPageViewModel.MoveAndScale(
|
||||
(mapSpan) => MyMap.MoveToRegion(mapSpan),
|
||||
App.ModelRoot.ActiveMapSpan);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Map Page's view model.
|
||||
/// </summary>
|
||||
private MapPageViewModel CreateMapPageViewModel()
|
||||
{
|
||||
Log.ForContext<MapPage>().Verbose("Constructing map page view model.");
|
||||
return new MapPageViewModel(
|
||||
App.ModelRoot,
|
||||
App.PermissionsService,
|
||||
App.BluetoothService,
|
||||
App.GeolocationServicesContainer.Active,
|
||||
(mapspan) => MyMap.MoveToRegion(mapspan),
|
||||
this,
|
||||
Navigation);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies iOS specific styling to branded Buttons.
|
||||
/// </summary>
|
||||
private void ApplyCustomiOSStyling()
|
||||
{
|
||||
if (Device.RuntimePlatform == Device.iOS)
|
||||
{
|
||||
TINKButton.BackgroundColor = Color.LightGray;
|
||||
TINKButton.BorderColor = Color.Black;
|
||||
TINKButton.Margin = new Thickness(10, 10, 10, 10);
|
||||
KonradButton.BackgroundColor = Color.LightGray;
|
||||
KonradButton.BorderColor = Color.Black;
|
||||
KonradButton.Margin = new Thickness(10, 10, 10, 10);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when pages is closed/ hidden.
|
||||
/// Stops update process.
|
||||
|
|
|
@ -89,10 +89,7 @@ namespace TINK.View.MiniSurvey
|
|||
#if USCSHARP9
|
||||
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#else
|
||||
/// <summary> Displays user feedback popup.</summary>
|
||||
/// <param name="co2Saving"> Co2 saving information.</param>
|
||||
/// <returns>User feedback.</returns>
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(co2Saving));
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -9,46 +9,41 @@
|
|||
<ResourceDictionary>
|
||||
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
</ContentPage.Resources>
|
||||
<ContentPage.Content>
|
||||
<Frame>
|
||||
<StackLayout
|
||||
Orientation="Vertical">
|
||||
<!-- Center stack layout -->
|
||||
<StackLayout
|
||||
VerticalOptions="CenterAndExpand"
|
||||
Orientation="Vertical">
|
||||
<ListView
|
||||
x:Name="MyBikesListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
<StackLayout>
|
||||
<ListView
|
||||
x:Name="MyBikesListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
<StackLayout
|
||||
VerticalOptions="EndAndExpand"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
IsVisible="{Binding IsNoBikesOccupiedVisible}"
|
||||
VerticalOptions="StartAndExpand"
|
||||
Text="{Binding NoBikesOccupiedText}"/>
|
||||
</StackLayout>
|
||||
<!-- Status bar stack layout-->
|
||||
<StackLayout
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="20"
|
||||
Text="{Binding StatusInfoText}"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
HeightRequest="20"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="End">
|
||||
IsVisible="{Binding IsRunning}"
|
||||
HeightRequest="20"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="End">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
iOS="#2499CE" WinPhone="#2499CE" />
|
||||
iOS="#2499CE" WinPhone="#2499CE" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
|
|
|
@ -163,10 +163,7 @@ namespace TINK.View.MyBikes
|
|||
#if USCSHARP9
|
||||
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#else
|
||||
/// <summary> Displays user feedback popup.</summary>
|
||||
/// <param name="co2Saving"> Co2 saving information.</param>
|
||||
/// <returns>User feedback.</returns>
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(co2Saving));
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -146,10 +146,7 @@ namespace TINK.View.Settings
|
|||
#if USCSHARP9
|
||||
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#else
|
||||
/// <summary> Displays user feedback popup.</summary>
|
||||
/// <param name="co2Saving"> Co2 saving information.</param>
|
||||
/// <returns>User feedback.</returns>
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#endif
|
||||
|
||||
#if USERFEEDBACKDLG_TRYOUT
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace TINK.View.WhatsNew.Agb
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -79,7 +79,7 @@ namespace TINK.View.WhatsNew
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -55,8 +55,8 @@ namespace TINK.ViewModel.MasterDetail
|
|||
}
|
||||
else if (type == typeof(TabbedPageInfo))
|
||||
{
|
||||
return AppResources.MarkingAbout;
|
||||
}
|
||||
return string.Format(AppResources.MarkingAbout, ContactPageViewModel.GetAppName(App.ModelRoot.Uris.ActiveUri));
|
||||
}
|
||||
else
|
||||
{
|
||||
return type.Name;
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace TINK.ViewModel.RootShell
|
|||
public bool IsSettingsPageVisible => App.ModelRoot.Uris.ActiveUri.Host.GetIsCopri()
|
||||
|| App.ModelRoot.ActiveUser.IsLoggedIn;
|
||||
|
||||
public string TabbedPageIngoTitle => AppResources.MarkingAbout;
|
||||
public string TabbedPageIngoTitle => string.Format(AppResources.MarkingAbout, ContactPageViewModel.GetAppName(App.ModelRoot.Uris.ActiveUri));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue