2019-05-24 03:19:45 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Bit.App.Pages
|
|
|
|
|
{
|
|
|
|
|
public partial class TwoFactorPage : BaseContentPage
|
|
|
|
|
{
|
|
|
|
|
private TwoFactorPageViewModel _vm;
|
|
|
|
|
|
|
|
|
|
public TwoFactorPage()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
_vm = BindingContext as TwoFactorPageViewModel;
|
|
|
|
|
_vm.Page = this;
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-27 16:28:38 +02:00
|
|
|
|
protected override void OnAppearing()
|
2019-05-24 03:19:45 +02:00
|
|
|
|
{
|
|
|
|
|
base.OnAppearing();
|
2019-05-27 16:28:38 +02:00
|
|
|
|
_vm.Init();
|
2019-05-24 03:19:45 +02:00
|
|
|
|
}
|
|
|
|
|
|
2019-05-27 16:28:38 +02:00
|
|
|
|
private async void Continue_Clicked(object sender, EventArgs e)
|
2019-05-24 03:19:45 +02:00
|
|
|
|
{
|
|
|
|
|
if(DoOnce())
|
|
|
|
|
{
|
2019-05-27 16:28:38 +02:00
|
|
|
|
await _vm.SubmitAsync();
|
2019-05-24 03:19:45 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-27 16:28:38 +02:00
|
|
|
|
private async void Methods_Clicked(object sender, EventArgs e)
|
2019-05-24 03:19:45 +02:00
|
|
|
|
{
|
|
|
|
|
if(DoOnce())
|
|
|
|
|
{
|
2019-05-27 16:28:38 +02:00
|
|
|
|
await _vm.AnotherMethodAsync();
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-05-24 03:19:45 +02:00
|
|
|
|
|
2019-05-27 16:28:38 +02:00
|
|
|
|
private async void ResendEmail_Clicked(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if(DoOnce())
|
|
|
|
|
{
|
|
|
|
|
await _vm.SendEmailAsync(true, true);
|
2019-05-24 03:19:45 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|