|
|
@ -14,38 +14,25 @@ namespace BookAStar.Pages.UserProfile
|
|
|
|
|
|
|
|
|
|
|
|
public partial class AccountChooserPage : ContentPage
|
|
|
|
public partial class AccountChooserPage : ContentPage
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public ICommand RemoteSettingsRefreshCommand { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public AccountChooserPage ()
|
|
|
|
public AccountChooserPage ()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
InitializeComponent ();
|
|
|
|
InitializeComponent ();
|
|
|
|
|
|
|
|
|
|
|
|
AccountListView.ItemsSource = MainSettings.AccountList;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.Musical = MainSettings.Musical;
|
|
|
|
|
|
|
|
this.Environ = MainSettings.Environ;
|
|
|
|
|
|
|
|
this.BindingContext = this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AddAccountBtn.Clicked += AddAccountBtn_Clicked;
|
|
|
|
AddAccountBtn.Clicked += AddAccountBtn_Clicked;
|
|
|
|
|
|
|
|
|
|
|
|
// avatarImage.
|
|
|
|
|
|
|
|
//RemoveAccountBouton.Clicked += RemoveAccountBouton_Clicked;
|
|
|
|
//RemoveAccountBouton.Clicked += RemoveAccountBouton_Clicked;
|
|
|
|
|
|
|
|
|
|
|
|
AccountListView.ItemSelected += Accounts_ItemSelected;
|
|
|
|
AccountListView.ItemSelected += Accounts_ItemSelected;
|
|
|
|
DumpParam = new RelayGesture((g, x) =>
|
|
|
|
// MainSettings.UserChanged += MainSettings_UserChanged;
|
|
|
|
{
|
|
|
|
|
|
|
|
if (g.GestureType == GestureType.Swipe && g.Direction == Directionality.Left)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
RemoveAccount();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
// Should be useless
|
|
|
|
|
|
|
|
private void MainSettings_UserChanged(object sender, EventArgs e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
AccountListView.SelectedItem = MainSettings.CurrentUser;
|
|
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public RelayGesture DumpParam { get; set; }
|
|
|
|
|
|
|
|
public ObservableCollection<User> Accounts { get; private set; }
|
|
|
|
|
|
|
|
public Dictionary<string, double> Musical { get; private set; }
|
|
|
|
|
|
|
|
public Dictionary<string, double> Environ { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Accounts_ItemSelected(object sender, SelectedItemChangedEventArgs e)
|
|
|
|
private void Accounts_ItemSelected(object sender, SelectedItemChangedEventArgs e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var user = e.SelectedItem as User;
|
|
|
|
var user = e.SelectedItem as User;
|
|
|
@ -68,7 +55,6 @@ namespace BookAStar.Pages.UserProfile
|
|
|
|
protected override void OnAppearing()
|
|
|
|
protected override void OnAppearing()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
base.OnAppearing();
|
|
|
|
base.OnAppearing();
|
|
|
|
AccountListView.SelectedItem = MainSettings.CurrentUser;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void AddAccountBtn_Clicked(object sender, EventArgs e)
|
|
|
|
private void AddAccountBtn_Clicked(object sender, EventArgs e)
|
|
|
|