Ejemplo n.º 1
0
        public static void addText(IEnumerable<Mp3Lib.Mp3File> mp3s, bool checkFirst)
        {
            var AF = new addtext();
            var newDataEX = new TagHandlerUpdate(mp3s.First());
            AF.titleExample = newDataEX.Title;
            AF.albumExample = newDataEX.Album;
            AF.artistExample = newDataEX.Artist;

            AF.ShowDialog();
            if (AF.result == null)
                return;

            foreach (var MF in mp3s)
            {
                var newData = new TagHandlerUpdate(MF);

                var orig = MF.TagHandler;

                if (AF.titleoptionb)
                {
                    newData.Title = StringExtras.AddText(newData.Title,AF.result, AF.isfront );
                }
                else if (AF.albumoptionb)
                {
                    newData.Album = StringExtras.AddText(newData.Album,AF.result, AF.isfront);
                }
                else if (AF.artistoptionb)
                {
                    newData.Artist = StringExtras.AddText(newData.Artist,AF.result, AF.isfront);
                }

                if (queryUserMakeChangesAndContinue(newData, MF, checkFirst) == false)
                    return;
            }
        }
Ejemplo n.º 2
0
        public static void addText(IEnumerable <Mp3Lib.Mp3File> mp3s, bool checkFirst)
        {
            var AF        = new addtext();
            var newDataEX = new TagHandlerUpdate(mp3s.First());

            AF.titleExample  = newDataEX.Title;
            AF.albumExample  = newDataEX.Album;
            AF.artistExample = newDataEX.Artist;

            AF.ShowDialog();
            if (AF.result == null)
            {
                return;
            }

            foreach (var MF in mp3s)
            {
                var newData = new TagHandlerUpdate(MF);

                var orig = MF.TagHandler;

                if (AF.titleoptionb)
                {
                    newData.Title = StringExtras.AddText(newData.Title, AF.result, AF.isfront);
                }
                else if (AF.albumoptionb)
                {
                    newData.Album = StringExtras.AddText(newData.Album, AF.result, AF.isfront);
                }
                else if (AF.artistoptionb)
                {
                    newData.Artist = StringExtras.AddText(newData.Artist, AF.result, AF.isfront);
                }

                if (queryUserMakeChangesAndContinue(newData, MF, checkFirst) == false)
                {
                    return;
                }
            }
        }