예제 #1
0
        public Task RemoveAccountAsync(Account account)
        {
            Accounts.Remove(account);
            AccountIndex = 0;

            SaveAccounts();

            account.DeleteAccountData();
            return account.LogoutAsync();
        }
예제 #2
0
 public void SetCurrentAccount(Account account)
 {
     if (account == null)
     {
         AccountIndex = 0;
     }
     else
     {
         AccountIndex = Accounts.IndexOf(account);
     }
 }
 private void ShowRange(Account currentAccount)
 {
     rangeNumbers.SelectedItem = (int)currentAccount.Info.Range.TotalDays;
 }
 private void ShowNotifications(Account currentAccount)
 {
     switch (currentAccount.Info.Notifications)
     {
         case NotificationOptions.Always:
             OptionNotifyEveryTime.IsChecked = true;
             break;
         case NotificationOptions.FirstOnly:
             OptionNotifyFirstTime.IsChecked = true;
             break;
         case NotificationOptions.Never:
             OptionNotifyNever.IsChecked = true;
             break;
         default:
             throw new NotImplementedException(currentAccount.Info.Notifications.ToString());
     }
 }
 private void ShowFrequency(Account currentAccount)
 {
     freqNumbers.SelectedItem = currentAccount.Info.Frequency;
 }