public static void trimText(IEnumerable <Mp3Lib.Mp3File> mp3s, bool checkFirst) { var newDataEX = new TagHandlerUpdate(mp3s.First()); var TF = new trimform(); TF.titleExample = newDataEX.Title; TF.albumExample = newDataEX.Album; TF.artistExample = newDataEX.Artist; TF.ShowDialog(); if (TF.result == -1) { return; } foreach (var MF in mp3s) { var newData = new TagHandlerUpdate(MF); var orig = MF.TagHandler; if (TF.titleoptionb) { newData.Title = StringExtras.ApplyTrim(newData.Title, TF.isfront, TF.result); } else if (TF.albumoptionb) { newData.Album = StringExtras.ApplyTrim(newData.Album, TF.isfront, TF.result); } else if (TF.artistoptionb) { newData.Artist = StringExtras.ApplyTrim(newData.Artist, TF.isfront, TF.result); } if (queryUserMakeChangesAndContinue(newData, MF, checkFirst) == false) { return; } } }
public static void trimText(IEnumerable<Mp3Lib.Mp3File> mp3s, bool checkFirst) { var newDataEX = new TagHandlerUpdate(mp3s.First()); var TF = new trimform(); TF.titleExample = newDataEX.Title; TF.albumExample = newDataEX.Album; TF.artistExample = newDataEX.Artist; TF.ShowDialog(); if (TF.result == -1) return; foreach (var MF in mp3s) { var newData = new TagHandlerUpdate(MF); var orig = MF.TagHandler; if (TF.titleoptionb) { newData.Title = StringExtras.ApplyTrim(newData.Title, TF.isfront, TF.result); } else if (TF.albumoptionb) { newData.Album = StringExtras.ApplyTrim(newData.Album, TF.isfront, TF.result); } else if (TF.artistoptionb) { newData.Artist = StringExtras.ApplyTrim(newData.Artist, TF.isfront, TF.result); } if (queryUserMakeChangesAndContinue(newData, MF, checkFirst) == false) return; } }