Esempio n. 1
0
        private void OnDeleteAccountCommand()
        {
            Debug.WriteLine($"Attempting to delete account: {CurrentAccountName}");
            if (!UserPromptUtils.ActionPrompt(
                    String.Format(Resources.ManageAccountsDeleteAccountPromptMessage, CurrentAccountName),
                    Resources.ManageAccountsDeleteAccountPromptTitle,
                    actionCaption: Resources.UiDeleteButtonCaption))
            {
                Debug.WriteLine($"The user cancelled the deletion of the account.");
                return;
            }

            AccountsManager.DeleteAccount(CurrentUserAccount.UserAccount);
            // Refreshing everything.
            UserAccountsList = LoadUserCredentialsViewModel();
        }
Esempio n. 2
0
        private void OnDeleteAccountCommand()
        {
            ExtensionAnalytics.ReportCommand(CommandName.DeleteAccountCommand, CommandInvocationSource.Button);

            Debug.WriteLine($"Attempting to delete account: {CurrentAccountName}");
            if (!UserPromptUtils.YesNoPrompt(
                    String.Format(Resources.ManageAccountsDeleteAccountPromptMessage, CurrentAccountName),
                    Resources.ManageAccountsDeleteAccountPromptTitle))
            {
                ExtensionAnalytics.ReportEvent("DeleteAccountCommandCancelled", "Cancelled");
                Debug.WriteLine($"The user cancelled the deletion of the account.");
                return;
            }

            AccountsManager.DeleteAccount(CurrentUserAccount.UserAccount);
            // Refreshing everything.
            UserAccountsList = LoadUserCredentialsViewModel();
        }