2019-05-14 19:05:30 +03:00
|
|
|
|
using Bit.App.Resources;
|
|
|
|
|
using System;
|
2019-03-28 03:12:44 +03:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Xamarin.Forms;
|
2019-03-29 00:10:10 +03:00
|
|
|
|
using Xamarin.Forms.Xaml;
|
2019-03-28 03:12:44 +03:00
|
|
|
|
|
2019-03-29 00:10:10 +03:00
|
|
|
|
namespace Bit.App.Pages
|
2019-03-28 03:12:44 +03:00
|
|
|
|
{
|
2019-05-14 18:53:41 +03:00
|
|
|
|
public partial class SettingsPage : BaseContentPage
|
2019-03-28 03:12:44 +03:00
|
|
|
|
{
|
2019-05-14 16:09:35 +03:00
|
|
|
|
private SettingsPageViewModel _vm;
|
|
|
|
|
|
2019-03-29 06:52:33 +03:00
|
|
|
|
public SettingsPage()
|
2019-03-28 03:12:44 +03:00
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2019-05-14 16:09:35 +03:00
|
|
|
|
_vm = BindingContext as SettingsPageViewModel;
|
|
|
|
|
_vm.Page = this;
|
2019-03-28 03:12:44 +03:00
|
|
|
|
}
|
2019-05-14 18:53:41 +03:00
|
|
|
|
|
2019-05-14 19:05:30 +03:00
|
|
|
|
private async void RowSelected(object sender, SelectedItemChangedEventArgs e)
|
2019-05-14 18:53:41 +03:00
|
|
|
|
{
|
|
|
|
|
((ListView)sender).SelectedItem = null;
|
|
|
|
|
if(!DoOnce())
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(!(e.SelectedItem is SettingsPageListItem item))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-14 19:05:30 +03:00
|
|
|
|
if(item.Name == AppResources.Sync)
|
|
|
|
|
{
|
|
|
|
|
await Navigation.PushModalAsync(new NavigationPage(new SyncPage()));
|
|
|
|
|
}
|
2019-05-15 00:02:24 +03:00
|
|
|
|
else if(item.Name == AppResources.Folders)
|
|
|
|
|
{
|
|
|
|
|
await Navigation.PushModalAsync(new NavigationPage(new FoldersPage()));
|
|
|
|
|
}
|
2019-05-15 16:14:49 +03:00
|
|
|
|
else if(item.Name == AppResources.About)
|
|
|
|
|
{
|
|
|
|
|
await _vm.AboutAsync();
|
|
|
|
|
}
|
2019-05-15 19:54:48 +03:00
|
|
|
|
else if(item.Name == AppResources.HelpAndFeedback)
|
|
|
|
|
{
|
|
|
|
|
_vm.Help();
|
|
|
|
|
}
|
|
|
|
|
else if(item.Name == AppResources.FingerprintPhrase)
|
|
|
|
|
{
|
|
|
|
|
await _vm.FingerprintAsync();
|
|
|
|
|
}
|
2019-05-14 18:53:41 +03:00
|
|
|
|
}
|
2019-03-28 03:12:44 +03:00
|
|
|
|
}
|
|
|
|
|
}
|