// удаление аккаунта
        private void DeleteAccountGBButton_Click(object sender, EventArgs e)
        {
            String           selectedAccountName;
            IAccountSettings result = userGoogleAccounts.SingleOrDefault(x => x.Name == GR4ComboBox.SelectedItem.ToString());

            if (SettingsManager.GetDetailsForAccount(loggedUser, result.ID) != null)
            {
                googleSheetsAccountSettings = (GoogleSheetsAccountSettings)SettingsManager.GetDetailsForAccount(loggedUser, result.ID);
            }
            if (GR4ComboBox.SelectedItem != null && (GR4ComboBox.SelectedItem.ToString() == googleSheetsAccountSettings.Name))
            {
                selectedAccountName = GR4ComboBox.SelectedItem.ToString();
            }
            else
            {
                selectedAccountName = String.Empty;
            }
            if (selectedAccountName != String.Empty)
            {
                Boolean deleteResult;

                if (DialogResult.Yes == MessageBox.Show(
                        String.Format("Delete this Account: {0}.", selectedAccountName), "Confirm", MessageBoxButtons.YesNo))
                {
                    if (googleSheetsAccountSettings.Owner)
                    {
                        if (DialogResult.Yes == MessageBox.Show(
                                String.Format("Delete this account for all users?", selectedAccountName), "Confirm", MessageBoxButtons.YesNo))
                        {
                            deleteResult = loggedUser.DeleteAccount(googleSheetsAccountSettings, true);
                        }
                        else
                        {
                            deleteResult = loggedUser.DeleteAccount(googleSheetsAccountSettings, false);
                        }
                    }
                    else
                    {
                        deleteResult = loggedUser.DeleteAccount(googleSheetsAccountSettings, false);
                    }

                    if (deleteResult)
                    {
                        groupBox4.Visible = false;
                        RefreshSettings();
                    }
                    else
                    {
                        MessageBox.Show("Error. Try later");
                    }
                }
            }
        }
        private void btnDeleteAccount_Click(object sender, EventArgs e)
        {
            String selectedAccountName;

            if (cmbAcconts.SelectedItem != null && (cmbAcconts.SelectedItem.ToString() == userDBFullAccount.Name))
            {
                selectedAccountName = cmbAcconts.SelectedItem.ToString();
            }
            else if (cmbSharedAccounts.SelectedItem != null && (cmbSharedAccounts.SelectedItem.ToString() == userDBFullAccount.Name))
            {
                selectedAccountName = cmbSharedAccounts.SelectedItem.ToString();
            }
            else
            {
                selectedAccountName = String.Empty;
            }

            if (selectedAccountName != String.Empty)
            {
                Boolean deleteResult;

                if (DialogResult.Yes == MessageBox.Show(
                        String.Format("Delete this Account: {0}.", selectedAccountName), "Confirm", MessageBoxButtons.YesNo))
                {
                    if (userDBFullAccount.Owner)
                    {
                        if (DialogResult.Yes == MessageBox.Show(
                                String.Format("Delete this account for all users?", selectedAccountName), "Confirm", MessageBoxButtons.YesNo))
                        {
                            deleteResult = loggedUser.DeleteAccount(userDBFullAccount, true);
                        }
                        else
                        {
                            deleteResult = loggedUser.DeleteAccount(userDBFullAccount, false);
                        }
                    }
                    else
                    {
                        deleteResult = loggedUser.DeleteAccount(userDBFullAccount, false);
                    }

                    if (deleteResult)
                    {
                        ClearAllForm();
                        RefreshSettingsAccountList();
                    }
                    else
                    {
                        MessageBox.Show("Oops! Error. Try later");
                    }
                }
            }
        }