示例#1
0
        private void Button_Lyrics_OK_Click(object sender, RoutedEventArgs e)
        {
            int SelectedIndex = DataListBox.SelectedIndex;

            if (SelectedIndex < 0 || SelectedIndex > SongList.Count - 1)
            {
                return;
            }

            ID3v2 id3v2 = new ID3v2(SongList[SelectedIndex].SongPath, true);

            if (id3v2.TextWithLanguageFrames.Count > 0)
            {
                id3v2.TextWithLanguageFrames.Clear();
            }

            id3v2.TextWithLanguageFrames.Add(new ID3.ID3v2Frames.TextFrames.TextWithLanguageFrame("USLT", 0, Textbox_EditLyrics.Text, "", TextEncodings.UTF_16, "eng"));
            SongList[SelectedIndex].SongLyrics = Textbox_EditLyrics.Text;
            id3v2.Save();
            DataListBox.SelectedIndex = -1;
            DataListBox.SelectedIndex = SelectedIndex;

            Sb5.Begin();
            DataListBox.IsEnabled = true;
        }
示例#2
0
 private void Button_Lyrics_Cancel_Click(object sender, RoutedEventArgs e)
 {
     DataListBox.IsEnabled = true;
     Sb5.Begin();
 }