2016-05-03 00:50:16 +03:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Bit.App.Abstractions;
|
2016-05-07 20:42:09 +03:00
|
|
|
|
using Bit.App.Resources;
|
2016-05-03 00:50:16 +03:00
|
|
|
|
using Xamarin.Forms;
|
|
|
|
|
using XLabs.Ioc;
|
|
|
|
|
|
|
|
|
|
namespace Bit.App.Pages
|
|
|
|
|
{
|
|
|
|
|
public class SettingsPage : ContentPage
|
|
|
|
|
{
|
|
|
|
|
private ListView _listView = new ListView();
|
|
|
|
|
|
|
|
|
|
public SettingsPage()
|
|
|
|
|
{
|
|
|
|
|
var authService = Resolver.Resolve<IAuthService>();
|
|
|
|
|
|
|
|
|
|
var logoutButton = new Button
|
|
|
|
|
{
|
2016-05-07 20:42:09 +03:00
|
|
|
|
Text = AppResources.LogOut,
|
2016-05-03 00:50:16 +03:00
|
|
|
|
Command = new Command(() =>
|
|
|
|
|
{
|
|
|
|
|
authService.LogOut();
|
|
|
|
|
Application.Current.MainPage = new LoginNavigationPage();
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var stackLayout = new StackLayout { };
|
|
|
|
|
stackLayout.Children.Add(logoutButton);
|
|
|
|
|
|
2016-05-07 20:42:09 +03:00
|
|
|
|
Title = AppResources.Settings;
|
2016-05-03 00:50:16 +03:00
|
|
|
|
Content = stackLayout;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|