/// <summary> /// Removes the tag from its image. The tag will still remain in the main collection of tags. /// </summary> /// <param name="sender"></param> /// <param name="eventArgs"></param> private void Tag_RemoveRequested(object sender, EventArgs eventArgs) { var tag = (Tag)sender; CurrentTags.Remove(tag); RegisterTagEvents(tag, false); }
private void closeCurrentTagToolStripMenuItem_Click(object sender, EventArgs e) { if (CurrentTag == null) { return; } tagEditorPanel.Controls.Clear(); if (currentTagsComboBox.Items.Count > 0) { currentTagsComboBox.Items.RemoveAt(currentTagsComboBox.SelectedIndex); } if (!CurrentTags.ContainsKey(CurrentTag.Index)) { return; } CurrentTags.Remove(CurrentTag.Index); }
/// <summary> /// Removes the given tag from the list of selected tags. /// </summary> /// <param name="parameter">The tag to remove, as a string.</param> public void RemoveTag(object parameter) { CurrentTags.Remove(parameter as string); }