private void Delete(Element element) { var accountElement = element as AccountElement; if (accountElement == null) return; //Remove the designated username _accountsService.Remove(accountElement.Account); if (_accountsService.ActiveAccount != null && _accountsService.ActiveAccount.Equals(accountElement.Account)) { _applicationService.DeactivateUser(); } SetCancelButton(); }
private void Delete(Element element) { var e = element as StringElement; if (e != null) ViewModel.Files.Remove(e.Caption); }