mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-24 16:16:27 +01:00
60 lines
2 KiB
C#
60 lines
2 KiB
C#
using System.Globalization;
|
|
using TINK.ViewModel;
|
|
using TINK.ViewModel.Info;
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Xaml;
|
|
|
|
namespace TINK.View.Info
|
|
{
|
|
[XamlCompilation(XamlCompilationOptions.Compile)]
|
|
public partial class InfoPage : TabbedPage
|
|
{
|
|
public InfoPageViewModel ViewModel { get; }
|
|
|
|
public InfoPage()
|
|
{
|
|
InitializeComponent();
|
|
|
|
ViewModel = new InfoPageViewModel(
|
|
App.ModelRoot.NextActiveUri.Host,
|
|
App.ModelRoot.ResourceUrls.AgbResourcePath,
|
|
App.ModelRoot.ResourceUrls.PrivacyResourcePath,
|
|
App.ModelRoot.ResourceUrls.ImpressResourcePath,
|
|
App.ModelRoot.IsSiteCachingOn,
|
|
resourceName => ViewModelResourceHelper.GetSource(resourceName),
|
|
() => App.ModelRoot.GetConnector(App.ModelRoot.GetIsConnected()).Query,
|
|
resourceUrls => App.ModelRoot.ResourceUrls = resourceUrls);
|
|
TabbedInfoPage.BindingContext = ViewModel;
|
|
|
|
InfoLicenses.Navigating += WebViewHelper.SelectDisplayTarget;
|
|
InfoLicenses.Navigated += (sender, ev) => WebViewHelper.HandleError(
|
|
sender,
|
|
ev,
|
|
"<html><b>Kann Lizenzinformationen nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>");
|
|
|
|
InfoDatenschutz.Navigating += WebViewHelper.SelectDisplayTarget;
|
|
InfoDatenschutz.Navigated += (sender, ev) => WebViewHelper.HandleError(
|
|
sender,
|
|
ev,
|
|
"<html><b>Kann Datenschutzinformationen nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>");
|
|
|
|
InfoABG.Navigating += WebViewHelper.SelectDisplayTarget;
|
|
InfoABG.Navigated += (sender, ev) => WebViewHelper.HandleError(
|
|
sender,
|
|
ev,
|
|
"<html><b>Kann allgemeine Geschäftsbedingungen nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>");
|
|
|
|
InfoImpressum.Navigating += WebViewHelper.SelectDisplayTarget;
|
|
InfoImpressum.Navigated += (sender, ev) => WebViewHelper.HandleError(
|
|
sender,
|
|
ev,
|
|
"<html><b>Kann Impressum nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>");
|
|
}
|
|
|
|
/// <summary> Called when page is shown. </summary>
|
|
protected override void OnAppearing()
|
|
{
|
|
ViewModel.OnAppearing();
|
|
}
|
|
}
|
|
}
|