mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-16 15:16:34 +01:00
60 lines
2.1 KiB
C#
60 lines
2.1 KiB
C#
using System.Globalization;
|
|
using ShareeBike.ViewModel;
|
|
using ShareeBike.ViewModel.LegalInformation;
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Xaml;
|
|
|
|
namespace ShareeBike.View.LegalInformation
|
|
{
|
|
[XamlCompilation(XamlCompilationOptions.Compile)]
|
|
public partial class LegalInformationPage : TabbedPage
|
|
{
|
|
public LegalInformationPageViewModel ViewModel { get; }
|
|
|
|
public LegalInformationPage()
|
|
{
|
|
InitializeComponent();
|
|
|
|
ViewModel = new LegalInformationPageViewModel(
|
|
App.ModelRoot.NextActiveUri.Host,
|
|
App.ModelRoot.ResourceUrls.GtcResourcePath,
|
|
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);
|
|
this.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>");
|
|
|
|
PrivacyWebView.Navigating += WebViewHelper.SelectDisplayTarget;
|
|
PrivacyWebView.Navigated += (sender, ev) => WebViewHelper.HandleError(
|
|
sender,
|
|
ev,
|
|
"<html><b>Kann Datenschutzinformationen nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>");
|
|
|
|
GtcWebView.Navigating += WebViewHelper.SelectDisplayTarget;
|
|
GtcWebView.Navigated += (sender, ev) => WebViewHelper.HandleError(
|
|
sender,
|
|
ev,
|
|
"<html><b>Kann allgemeine Geschäftsbedingungen nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>");
|
|
|
|
ImpressWebView.Navigating += WebViewHelper.SelectDisplayTarget;
|
|
ImpressWebView.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();
|
|
}
|
|
}
|
|
}
|