Exemple #1
0
 private void DeleteClick(object o, EventArgs e)
 {
     if (WhichSelected == -1)
     {
         return;
     }
     RequestSender.DeleteAccount(WhichSelected);
     list.Remove(list.Find(x => x.Id == whichSelected));
     accountListAdapter.NotifyDataSetChanged();
 }
Exemple #2
0
        private void DeleteAccount(object o, EventArgs e)
        {
            if (confirmationText.Text == confirmationWord)
            {
                RequestSender.DeleteAccount(RequestSender.ThisAccount().Id);
                Toast.MakeText(this, "Successfully deleted account", ToastLength.Long).Show();
                MainActivity.IsLoggedIn = false;

                Intent intent = new Intent();
                intent.PutExtra("DELETED", "data");
                SetResult(Result.Ok, intent);
                this.Finish();
            }
            else
            {
                Toast.MakeText(this, "Confirmation word doesn't match", ToastLength.Short).Show();
            }
        }