private void RemoveSelectedToolStripMenuItemClick(object sender, EventArgs e) { if (_lbxEntries.SelectedItem == null) { return; } RBFLibrary.RemoveEntry(_lbxEntries.SelectedItem as RBFLibEntry); }
private static void AddToLibrary(string[] tags, string[] tagGroups, AttribInfo info) { RBFLibEntry entry = new RBFLibEntry(); entry.Values = new List <AttributeValue>(); entry.Submenu = info.Category; entry.TagGroups = tagGroups ?? new string[0]; entry.Tags = tags ?? new string[0]; entry.Values.Add(info.Value); entry.Name = info.Value.Key; RBFLibrary.RemoveEntry(entry.Name); RBFLibrary.AddEntry(entry); }
private void EditTagsToolStripMenuItemClick(object sender, EventArgs e) { if (_lbxEntries.SelectedItem == null) { return; } var entry = _lbxEntries.SelectedItem as RBFLibEntry; var dlg = new TagEditor { Tags = { Lines = entry.Tags }, TagGroups = entry.TagGroups }; if (dlg.ShowDialog() != DialogResult.OK) { return; } entry.Tags = dlg.Tags.Lines; RBFLibrary.RemoveEntry(entry); RBFLibrary.AddEntry(entry); }