public void CheckBD(string path) { tagLibrary = TagLib.ReadFromFile(path); var tags = TagLib.GetAllTags(tagLibrary).OrderBy(x => x); foreach (var tag in tags) { BDBox.Items.Add(tag); } }
private void AddToBDBut_Click(object sender, RoutedEventArgs e) { if (BDBox.SelectedIndex != -1) { var parent = BDBox.SelectedItem.ToString(); tagLibrary.Add(new string[] { parent, ChildBox.Text }); TagLib.WriteToFile(tagLibrary, bdPath); CheckBD(bdPath); } else { System.Windows.MessageBox.Show("Выберите предка!"); } }
private void AddAll(string tag) { var toUse = TagLib.TagsToWrite(tagLibrary, tag); Rescan(); List <FileInfo> toTag = new List <FileInfo>(checkedImages); foreach (var curTag in toUse) { FileProcessor.AddTag(toTag, curTag); Rescan(); toTag.Clear(); toTag = new List <FileInfo>(checkedImages); } }