mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 10:36:30 +01:00
51 lines
1.5 KiB
C#
51 lines
1.5 KiB
C#
using Serilog;
|
|
using TINK.ViewModel;
|
|
using TINK.ViewModel.Contact;
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Xaml;
|
|
|
|
namespace TINK.View.Contact
|
|
{
|
|
[XamlCompilation(XamlCompilationOptions.Compile)]
|
|
public partial class FeesAndBikesPage : TabbedPage
|
|
{
|
|
public FeesAndBikesPageViewModel ViewModel { get; }
|
|
|
|
public FeesAndBikesPage()
|
|
{
|
|
InitializeComponent();
|
|
|
|
/// Info about renting.
|
|
InfoRentBikeWebView.Navigating += WebViewHelper.SelectDisplayTarget;
|
|
|
|
InfoRentBikeWebView.Navigated += (sender, ev) => WebViewHelper.HandleError(
|
|
sender,
|
|
ev,
|
|
"<html><b>Kann Mietinformationen nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>");
|
|
|
|
/// Info about types of bikes.
|
|
InfoTypesOfBikesWebView.Navigating += WebViewHelper.SelectDisplayTarget;
|
|
|
|
InfoTypesOfBikesWebView.Navigated += (sender, ev) => WebViewHelper.HandleError(
|
|
sender,
|
|
ev,
|
|
"<html><b>Kann Radinformationen nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>");
|
|
|
|
ViewModel = new FeesAndBikesPageViewModel(
|
|
App.ModelRoot.NextActiveUri.Host,
|
|
App.ModelRoot.ResourceUrls.FeesResourcePath,
|
|
App.ModelRoot.ResourceUrls.BikesResourcePath,
|
|
App.ModelRoot.IsSiteCachingOn,
|
|
() => App.ModelRoot.GetConnector(App.ModelRoot.GetIsConnected()).Query,
|
|
resourceUrls => App.ModelRoot.ResourceUrls = resourceUrls);
|
|
|
|
BindingContext = ViewModel;
|
|
}
|
|
|
|
/// <summary> Called when page is shown. </summary>
|
|
protected override void OnAppearing()
|
|
{
|
|
ViewModel.OnAppearing();
|
|
}
|
|
}
|
|
}
|