sharee.bike-App/LastenradBayern/TINK/View/CopriWebView/PasswordForgottenPage.xaml.cs

49 lines
1.7 KiB
C#
Raw Normal View History

2021-11-07 19:42:59 +01:00

2022-04-10 17:38:34 +02:00
using Serilog;
2021-11-07 19:42:59 +01:00
using TINK.ViewModel.CopriWebView;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TINK.View.CopriWebView
{
[XamlCompilation(XamlCompilationOptions.Compile)]
2022-04-10 17:38:34 +02:00
public partial class PasswordForgottenPage : ContentPage
{
public PasswordForgottenPage()
{
InitializeComponent();
PasswordForgottenWebView.Navigating += (sender, ev) =>
{
this.IsEnabled = false;
ActivityIndicatorLoading.IsVisible = true;
ActivityIndicatorLoading.IsRunning = true;
};
2021-11-07 19:42:59 +01:00
PasswordForgottenWebView.Navigated += (sender, ev) =>
{
2022-04-10 17:38:34 +02:00
if (ev.Result == WebNavigationResult.Success)
{
this.IsEnabled = true;
ActivityIndicatorLoading.IsVisible = false;
ActivityIndicatorLoading.IsRunning = false;
return;
}
2021-11-07 19:42:59 +01:00
2022-04-10 17:38:34 +02:00
Log.ForContext<PasswordForgottenPage>().Error("Navigation did not succeed. {@Event}", ev);
2021-11-07 19:42:59 +01:00
PasswordForgottenWebView.Source = new HtmlWebViewSource
{
Html = "<html><b>Kann Passwort vergessen Seite nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>"
};
2022-04-10 17:38:34 +02:00
this.IsEnabled = true;
ActivityIndicatorLoading.IsVisible = false;
ActivityIndicatorLoading.IsRunning = false;
2021-11-07 19:42:59 +01:00
};
PasswordForgottenWebView.BindingContext = new PasswordForgottonViewModel(
Model.TinkApp.MerchantId,
App.ModelRoot.NextActiveUri.Host);
}
}
}