Exemplo n.º 1
0
        private void SplitTextWithChordsToTextAndChords()
        {
            if (TextWithChords.Count == 0)
            {
                return;
            }
            StringBuilder chords = new StringBuilder();
            StringBuilder text   = new StringBuilder();

            foreach (TextLineWithChords textLineWithChords in TextWithChords)
            {
                chords.AppendLine(textLineWithChords.Chords);
                text.AppendLine(textLineWithChords.TextLine);
            }

            if (!String.IsNullOrWhiteSpace(Text) && !Text.Equals(text.ToString()))
            {
                Text      = TekstowoHelper.DeleteStartAndEndEmptyLines(text.ToString());
                Song.Text = Text;
            }


            if (!String.IsNullOrWhiteSpace(Chords) && !Chords.Equals(chords.ToString()))
            {
                Chords      = chords.ToString();
                Song.Chords = Chords;
            }
        }