mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-23 15:46:29 +01:00
51 lines
No EOL
1.4 KiB
C#
51 lines
No EOL
1.4 KiB
C#
|
|
using System.Globalization;
|
|
using Serilog;
|
|
using TINK.ViewModel.CopriWebView;
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Xaml;
|
|
|
|
namespace TINK.View.CopriWebView
|
|
{
|
|
[XamlCompilation(XamlCompilationOptions.Compile)]
|
|
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)
|
|
{
|
|
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(
|
|
Model.TinkApp.MerchantId,
|
|
CultureInfo.CurrentUICulture.TwoLetterISOLanguageName,
|
|
App.ModelRoot.NextActiveUri.Host);
|
|
}
|
|
}
|
|
} |