Version 3.0.290

This commit is contained in:
Oliver Hauff 2022-04-10 17:38:34 +02:00
parent af3c20ea1c
commit ad3cdbcadf
231 changed files with 14555 additions and 7798 deletions

View file

@ -17,7 +17,7 @@ using System.Threading;
using TINK.Model.Settings;
using Plugin.Permissions;
using TINK.Services.BluetoothLock.Crypto;
using TINK.Model.Services.Geolocation;
using TINK.Services.Geolocation;
using TINK.Services;
using System.Threading.Tasks;
using TINK.Services.Permissions;
@ -126,11 +126,12 @@ namespace TINK
IStore store = null;
var lastVersion = JsonSettingsDictionary.GetAppVersion(settingsJSON);
if (lastVersion > new Version(3, 0, 250))
if (new Version(3, 0, 290) <= lastVersion)
{
// App versions newer than 3.0.173 stored geolocation service in configuration.
// Force a switch to typeof(GeolocationService) for versions < 3.0.251
GeolocationServicesContainer.SetActive(settings.ActiveGeolocationService);
// Version 3.0.290: Geolocation service "GeolocationService" is no more supported.
// For this reasons a swich of geolocation service is forced when loading configurations from ealier versions.
LocationServicesContainer.SetActive(settings.ActiveGeolocationService);
}
store = new Store();
@ -148,23 +149,26 @@ namespace TINK
m_oModelRoot = new TinkApp(
settings,
store, // Manages user account
(isConnected, activeUri, sessionCookie, mail, expiresAfter) => ConnectorFactory.Create(isConnected, activeUri, new Repository.AppContextInfo(MERCHANTID, "LastenradBayern", appInfoService.Version), sessionCookie, mail, expiresAfter),
MERCHANTID,
GeolocationServicesContainer,
null, /* locksService */
DependencyService.Get<ISmartDevice>(),
specialFolders,
new Cipher(),
null, // Permissions, no more used.
isConnectedFunc: () => CrossConnectivity.Current.IsConnected,
connectorFactory: (isConnected, activeUri, sessionCookie, mail, expiresAfter) => ConnectorFactory.Create(isConnected, activeUri, new Repository.AppContextInfo(MERCHANTID, "LastenradBayern", appInfoService.Version), sessionCookie, mail, expiresAfter),
merchantId: MERCHANTID,
bluetoothService: BluetoothService, /* locksService */
locationPermissionsService: PermissionsService,
locationServicesContainer: LocationServicesContainer,
locksService: null,
device: DependencyService.Get<ISmartDevice>(),
specialFolder: specialFolders,
cipher: new Cipher(),
arendiCentral:
#if ARENDI
DependencyService.Get<ICentral>(),
#else
null,
#endif
isConnectedFunc: () => CrossConnectivity.Current.IsConnected,
postAction: (d, obj) => context.Post(d, obj),
currentVersion: appInfoService.Version,
lastVersion: JsonSettingsDictionary.GetAppVersion(settingsJSON),
lastVersion: lastVersion,
whatsNewShownInVersion: JsonSettingsDictionary.GetWhatsNew(settingsJSON) ?? settingsJSON.GetAppVersion());
Log.Debug("Main model successfully constructed.");
@ -311,25 +315,25 @@ namespace TINK
if (_PermissionsService != null)
return _PermissionsService;
_PermissionsService = new Services.Permissions.Essentials.Permissions();
_PermissionsService = new TINK.Services.Permissions.Essentials.Permissions();
return _PermissionsService;
}
}
/// <summary>
/// Service to manage bluetooth stack.
/// </summary>
/// <summary> Service to manage bluetooth stack.</summary>
public static Plugin.BLE.Abstractions.Contracts.IBluetoothLE BluetoothService => Plugin.BLE.CrossBluetoothLE.Current;
/// <summary>
/// Service container to manage geolocation services.
/// </summary>
public static IServicesContainer<IGeolocation> GeolocationServicesContainer { get; }
public static IServicesContainer<IGeolocation> LocationServicesContainer { get; }
= new ServicesContainerMutable<IGeolocation>(
new HashSet<IGeolocation> {
new LastKnownGeolocationService(DependencyService.Get<IGeolodationDependent>()),
new SimulatedGeolocationService(DependencyService.Get<IGeolodationDependent>()),
new GeolocationService(DependencyService.Get<IGeolodationDependent>()) },
new GeolocationAccuracyMediumService(DependencyService.Get<IGeolodationDependent>()),
new GeolocationAccuracyHighService(DependencyService.Get<IGeolodationDependent>()),
new GeolocationAccuracyBestService(DependencyService.Get<IGeolodationDependent>())},
Model.Settings.Settings.DefaultLocationService.FullName);
}
}

View file

@ -72,7 +72,7 @@ namespace TINK.View.Account
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
/// <summary>
/// Displays an action sheet.

View file

@ -56,10 +56,15 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label
Text=
"{x:Static resources:AppResources.MessageBikesManagementTariffDescriptionTariffHeader}"
FontAttributes="Bold"/>
<Label
Text=
"{Binding TariffDescription.Header}"
Grid.ColumnSpan="3"
Grid.Column="1"
Grid.ColumnSpan="2"
FontAttributes="Bold"/>
<Label
Text="{x:Static resources:AppResources.MessageBikesManagementTariffDescriptionFreeTimePerSession}"

View file

@ -97,7 +97,7 @@ namespace TINK.View.BikesAtStation
model.SelectedStation,
() => model.GetIsConnected(),
(isConnected) => model.GetConnector(isConnected),
App.GeolocationServicesContainer.Active,
App.LocationServicesContainer.Active,
model.LocksServices.Active,
model.Polling,
(url) => DependencyService.Get<IExternalBrowserService>().OpenUrl(url),
@ -184,7 +184,7 @@ namespace TINK.View.BikesAtStation
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
#if USEFLYOUT

View file

@ -1,10 +1,12 @@
using System;
using Serilog;
using System;
using System.Threading.Tasks;
using TINK.Model.Device;
#if USEFLYOUT
using TINK.View.MasterDetail;
#endif
using TINK.ViewModel.Info;
using Xamarin.Essentials;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
@ -17,16 +19,36 @@ namespace TINK.View.Contact
public partial class ContactPage : ContentPage, IViewService
#endif
{
public ContactPage ()
{
InitializeComponent ();
/// <summary> View model to notify view model if page appears. </summary>
private ContactPageViewModel ViewModel { get; set; }
ContactPageView.BindingContext = new ContactPageViewModel(
App.ModelRoot.SelectedStation,
App.ModelRoot.Uris.ActiveUri,
public ContactPage()
{
InitializeComponent();
ViewModel = new ContactPageViewModel(App.ModelRoot.Uris.ActiveUri,
AppInfo.Name,
() => App.CreateAttachment(),
() => DependencyService.Get<IExternalBrowserService>().OpenUrl(DependencyService.Get<IAppInfo>().StoreUrl),
this);
() => DependencyService.Get<IExternalBrowserService>().OpenUrl(DependencyService.Get<IAppInfo>().StoreUrl),
this);
ContactPageView.BindingContext = ViewModel;
}
/// <summary> Invoked when page is shown. </summary>
protected async override void OnAppearing()
{
try
{
Log.ForContext<ContentPage>().Verbose("OnAppearing...");
await ViewModel.OnAppearing(App.ModelRoot.SelectedStation);
}
catch (Exception exception)
{
Log.ForContext<ContentPage>().Error("Invoking OnAppearing on view model failed. {Exception}", exception);
return;
}
}
/// <summary> Displays alert message.</summary>
@ -35,10 +57,10 @@ namespace TINK.View.Contact
/// <param name="details">Detailed error description.</param>
/// <param name="cancel">Type of buttons.</param>
public async Task DisplayAdvancedAlert(
string title,
string message,
string details,
string cancel)
string title,
string message,
string details,
string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", cancel);
/// <summary> Displays detailed alert message.</summary>
@ -49,7 +71,7 @@ namespace TINK.View.Contact
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
#if USEFLYOUT
public void ShowPage(ViewTypes p_oType, string title = null)
@ -78,17 +100,19 @@ namespace TINK.View.Contact
public async Task PushAsync(ViewTypes typeOfPage)
{
#if USEFLYOUT
if (!(Activator.CreateInstance(typeOfPage.GetViewType()) is IDetailPage detailPage))
var page = Activator.CreateInstance(typeOfPage.GetViewType()) as IDetailPage;
#else
var page = Activator.CreateInstance(typeOfPage.GetViewType());
#endif
if (page == null)
{
await Task.CompletedTask;
return;
}
// Set reference to navigation object to be able to show page on newly shown detailPage.
detailPage.NavigationMasterDetail = NavigationMasterDetail;
await Navigation.PushAsync((Page)detailPage);
#if USEFLYOUT
page.NavigationMasterDetail = NavigationMasterDetail;
#endif
await Navigation.PushAsync((Page)page);
}
#if USCSHARP9

View file

@ -9,6 +9,7 @@ using Xamarin.Forms.Xaml;
namespace TINK.View.Contact
{
using Serilog;
using TINK.Model;
using TINK.ViewModel.Contact;
[XamlCompilation(XamlCompilationOptions.Compile)]
@ -55,7 +56,7 @@ namespace TINK.View.Contact
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
/// <summary>
/// Displays alert message.
@ -140,7 +141,7 @@ namespace TINK.View.Contact
App.ModelRoot,
App.PermissionsService,
App.BluetoothService,
App.GeolocationServicesContainer.Active,
App.LocationServicesContainer.Active,
(mapspan) => MyMap.MoveToRegion(mapspan),
this,
Navigation);

View file

@ -7,12 +7,16 @@
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackLayout>
<WebView x:Name="ManageAccount"
<WebView x:Name="ManageAccount"
HeightRequest="1400"
WidthRequest="1000"
Source="{Binding Uri}" />
</StackLayout>
<ActivityIndicator
x:Name="ActivityIndicatorLoading"
HeightRequest="100"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"/>
</Grid>
</ContentPage.Content>
</ContentPage>

View file

@ -1,4 +1,5 @@
using TINK.Model.Device;
using Serilog;
using TINK.Model.Device;
using TINK.ViewModel.Login;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
@ -6,17 +7,20 @@ using Xamarin.Forms.Xaml;
namespace TINK.View.CopriWebView
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class ManageAccountPage : ContentPage
{
public ManageAccountPage ()
{
InitializeComponent ();
public partial class ManageAccountPage : ContentPage
{
public ManageAccountPage()
{
InitializeComponent();
ManageAccount.Navigating += (sender, ev) =>
{
if (!ev.Url.ToUpper().EndsWith(".PDF"))
{
// Stay inside web view except for downloading pdf- files.
this.IsEnabled = false;
ActivityIndicatorLoading.IsVisible = true;
ActivityIndicatorLoading.IsRunning = true;
return;
}
@ -25,12 +29,23 @@ namespace TINK.View.CopriWebView
ManageAccount.Navigated += (sender, ev) =>
{
if (ev.Result == WebNavigationResult.Success) return;
if (ev.Result == WebNavigationResult.Success)
{
this.IsEnabled = true;
ActivityIndicatorLoading.IsVisible = false;
ActivityIndicatorLoading.IsRunning = false;
return;
}
Log.ForContext<ManageAccountPage>().Error("Navigation did not succeed.{@Event}{@Sender}", ev, sender);
ManageAccount.Source = new HtmlWebViewSource
{
Html = "<html><b>Kann persönliche Daten nicht anzeigen/ verwalten!</b><br>Verbindung mit Internet ok?</html>"
};
this.IsEnabled = true;
ActivityIndicatorLoading.IsVisible = false;
ActivityIndicatorLoading.IsRunning = false;
};
ManageAccount.BindingContext = new ManageAccountViewModel(

View file

@ -7,12 +7,15 @@
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackLayout>
<WebView x:Name="PasswordForgottenWebView"
<WebView x:Name="PasswordForgottenWebView"
HeightRequest="1400"
WidthRequest="1000"
Source="{Binding Uri}" />
</StackLayout>
<ActivityIndicator
x:Name="ActivityIndicatorLoading"
HeightRequest="100"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"/>
</Grid>
</ContentPage.Content>
</ContentPage>

View file

@ -1,4 +1,5 @@

using Serilog;
using TINK.ViewModel.CopriWebView;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
@ -6,20 +7,38 @@ using Xamarin.Forms.Xaml;
namespace TINK.View.CopriWebView
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class PasswordForgottenPage : ContentPage
{
public PasswordForgottenPage ()
{
InitializeComponent ();
public partial class PasswordForgottenPage : ContentPage
{
public PasswordForgottenPage()
{
InitializeComponent();
PasswordForgottenWebView.Navigating += (sender, ev) =>
{
this.IsEnabled = false;
ActivityIndicatorLoading.IsVisible = true;
ActivityIndicatorLoading.IsRunning = true;
};
PasswordForgottenWebView.Navigated += (sender, ev) =>
{
if (ev.Result == WebNavigationResult.Success) return;
if (ev.Result == WebNavigationResult.Success)
{
this.IsEnabled = true;
ActivityIndicatorLoading.IsVisible = false;
ActivityIndicatorLoading.IsRunning = false;
return;
}
Log.ForContext<PasswordForgottenPage>().Error("Navigation did not succeed. {@Event}", ev);
PasswordForgottenWebView.Source = new HtmlWebViewSource
{
Html = "<html><b>Kann Passwort vergessen Seite nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>"
};
this.IsEnabled = true;
ActivityIndicatorLoading.IsVisible = false;
ActivityIndicatorLoading.IsRunning = false;
};
PasswordForgottenWebView.BindingContext = new PasswordForgottonViewModel(

View file

@ -7,12 +7,15 @@
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackLayout>
<WebView x:Name="RegisterView"
HeightRequest="1400"
WidthRequest="1000"
Source="{Binding Uri}" />
</StackLayout>
<WebView x:Name="RegisterView"
HeightRequest="1400"
WidthRequest="1000"
Source="{Binding Uri}" />
<ActivityIndicator
x:Name="ActivityIndicatorLoading"
HeightRequest="100"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"/>
</Grid>
</ContentPage.Content>
</ContentPage>

View file

@ -1,4 +1,5 @@

using Serilog;
using TINK.Model.Device;
using TINK.ViewModel.CopriWebView;
using Xamarin.Forms;
@ -7,22 +8,40 @@ using Xamarin.Forms.Xaml;
namespace TINK.View.CopriWebView
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class RegisterPage : ContentPage
{
public RegisterPage()
{
public partial class RegisterPage : ContentPage
{
public RegisterPage()
{
DependencyService.Get<IWebView>().ClearCookies();
InitializeComponent();
RegisterView.Navigating += (sender, ev) =>
{
this.IsEnabled = false;
ActivityIndicatorLoading.IsVisible = true;
ActivityIndicatorLoading.IsRunning = true;
};
RegisterView.Navigated += (sender, ev) =>
{
if (ev.Result == WebNavigationResult.Success) return;
if (ev.Result == WebNavigationResult.Success)
{
this.IsEnabled = true;
ActivityIndicatorLoading.IsVisible = false;
ActivityIndicatorLoading.IsRunning = false;
return;
}
Log.ForContext<RegisterPage>().Error("Navigation did not succeed. {@Event}", ev);
RegisterView.Source = new HtmlWebViewSource
{
Html = "<html><b>Kann Anmeldeseite nicht anzeigen</b>!<br>Verbindung mit Internet ok?</html>"
};
this.IsEnabled = true;
ActivityIndicatorLoading.IsVisible = false;
ActivityIndicatorLoading.IsRunning = false;
};
RegisterView.BindingContext = new RegisterPageViewModel(

View file

@ -2,6 +2,7 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using TINK.Model;
using TINK.Model.Device;
using TINK.ViewModel.FindBike;
using Xamarin.CommunityToolkit.Extensions;
@ -46,7 +47,7 @@ namespace TINK.View.FindBike
Device.RuntimePlatform,
() => model.GetIsConnected(),
(isConnected) => model.GetConnector(isConnected),
App.GeolocationServicesContainer.Active,
App.LocationServicesContainer.Active,
model.LocksServices.Active,
model.Stations,
model.Polling,
@ -104,7 +105,7 @@ namespace TINK.View.FindBike
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
/// <summary>
/// Displays alert message.

View file

@ -55,7 +55,7 @@ namespace TINK.View.Info.BikeInfo
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
/// <summary>
/// Displays alert message.

View file

@ -63,7 +63,7 @@ namespace TINK.View.Login
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
#if USEFLYOUT
/// <summary>

View file

@ -9,6 +9,7 @@ using Xamarin.Forms.Xaml;
namespace TINK.View.Map
{
using Serilog;
using TINK.Model;
using TINK.ViewModel.Map;
[XamlCompilation(XamlCompilationOptions.Compile)]
@ -61,7 +62,7 @@ namespace TINK.View.Map
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
/// <summary>
/// Displays alert message.
@ -234,7 +235,7 @@ namespace TINK.View.Map
App.ModelRoot,
App.PermissionsService,
App.BluetoothService,
App.GeolocationServicesContainer.Active,
App.LocationServicesContainer.Active,
(mapspan) => MyMap.MoveToRegion(mapspan),
this,
Navigation);

View file

@ -53,7 +53,7 @@ namespace TINK.View.MiniSurvey
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
/// <summary>
/// Displays alert message.

View file

@ -11,6 +11,7 @@ using Xamarin.Forms.Xaml;
namespace TINK.View.MyBikes
{
using Serilog;
using TINK.Model;
using TINK.Model.Device;
using TINK.ViewModel.MyBikes;
using Xamarin.CommunityToolkit.Extensions;
@ -63,7 +64,7 @@ namespace TINK.View.MyBikes
Device.RuntimePlatform,
() => model.GetIsConnected(),
(isConnected) => model.GetConnector(isConnected),
App.GeolocationServicesContainer.Active,
App.LocationServicesContainer.Active,
model.LocksServices.Active,
model.Stations,
model.Polling,
@ -135,7 +136,7 @@ namespace TINK.View.MyBikes
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
/// <summary>
/// Displays alert message.

View file

@ -91,6 +91,7 @@
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent
Title="{x:Static resources:AppResources.MarkingFeedbackAndContact}"
Route="ContactPage"
ContentTemplate="{DataTemplate contact:ContactPage}">
<ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconContact}" Color="Black" FontFamily="FA-S" />

View file

@ -10,12 +10,14 @@
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<Image
HeightRequest="140"
Aspect="AspectFit"
Source="sharee_no_background.png" />
HeightRequest="140"
Grid.RowSpan="2"
Aspect="AspectFit"
Source="sharee_no_background.png"/>
<Label
HorizontalOptions="CenterAndExpand"
FontSize="Large"
FontAttributes="Bold"
Grid.Row="1"
Text="{Binding MasterDetailMenuTitlte}"/>
<Label
@ -23,6 +25,6 @@
FontSize="Micro"
HorizontalTextAlignment="Center"
Grid.Row="2"
Text="gefördert vom Bayrischen Staatministerium für Wohnen, Bau und Verkehr"/>
Text="gefördert vom Bayerischen Staatministerium für Wohnen, Bau und Verkehr"/>
</Grid>
</ContentView>

View file

@ -30,7 +30,7 @@ namespace TINK.View.Settings
m_oViewModel = new SettingsPageViewModel(
l_oModel,
App.GeolocationServicesContainer,
App.LocationServicesContainer,
this);
BindingContext = m_oViewModel;
@ -65,7 +65,7 @@ namespace TINK.View.Settings
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
/// <summary> Displays alert message.</summary>
/// <param name="p_strTitle">Title of message.</param>

View file

@ -43,7 +43,7 @@ namespace TINK.View.WhatsNew.Agb
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
/// <summary> Invoked when page is shown. </summary>
protected async override void OnAppearing()

View file

@ -48,7 +48,7 @@ namespace TINK.View.WhatsNew
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
public Task PopModalAsync()
{