private void DeleateAccount(object sender, RoutedEventArgs e) { MessageBoxResult resoult = MessageBox.Show("Are you sure?", "Statment", MessageBoxButton.YesNo); if (resoult == MessageBoxResult.Yes) { _readUser.Remove(_userId); File.Delete(_dirToUser); Close(); MessageBox.Show("Your account has been deleted successfully", "Statment"); } }