public void EditTag(string filename) { Mp3File mp3File = null; try { // create mp3 file wrapper; open it and read the tags mp3File = new Mp3File(filename); } catch (Exception e) { ExceptionMessageBox.Show(_form, e, "Error Reading Tag"); return; } // create dialog and give it the ID3v2 block for editing // this is a bit sneaky; it uses the edit dialog straight out of TagScanner.exe as if it was a dll. TagEditor.ID3AdapterEdit id3Edit = new TagEditor.ID3AdapterEdit(mp3File); if (id3Edit.ShowDialog() == System.Windows.Forms.DialogResult.OK) { try { using (new CursorKeeper(Cursors.WaitCursor)) { mp3File.Update(); } } catch (Exception e) { ExceptionMessageBox.Show(_form, e, "Error Writing Tag"); } } }
public void EditTag(string filename) { Mp3File mp3File = null; try { // create mp3 file wrapper; open it and read the tags mp3File = new Mp3File(filename); } catch (Exception e) { ExceptionMessageBox.Show(_form, e, "Error Reading Tag"); return; } // create dialog and give it the ID3v2 block for editing // this is a bit sneaky; it uses the edit dialog straight out of TagScanner.exe as if it was a dll. TagEditor.ID3AdapterEdit id3Edit = new TagEditor.ID3AdapterEdit(mp3File); if (id3Edit.ShowDialog() == System.Windows.Forms.DialogResult.OK) { try { using( new CursorKeeper(Cursors.WaitCursor) ) { mp3File.Update(); } } catch (Exception e) { ExceptionMessageBox.Show(_form, e, "Error Writing Tag"); } } }