private void btnRemove_Click(object sender, System.EventArgs e) { if (lstGenres.SelectedItems.Count != 0) { if (_genresService.Remove((lstGenres.SelectedItems[0].Tag as Genre).Id)) { lstGenres.Items.Remove(lstGenres.SelectedItems[0]); MetroMessageBox.Show(this, $"Жанр удалён", "Справка", MessageBoxButtons.OK, MessageBoxIcon.Information); UpdateCounter(); } } }