private void PrepareTextToAddChords() { TextWithChords.Clear(); string[] text = Text.Split(Environment.NewLine.ToCharArray()); for (int i = 0; i < text.Length; i++) { TextWithChords.Add(new TextLineWithChords() { Chords = "", TextLine = text[i] }); } }
private void PrepareTextWithChordsList() { TextWithChords.Clear(); string[] chords = Chords.Split(Environment.NewLine.ToCharArray()); string[] text = Text.Split(Environment.NewLine.ToCharArray()); for (int i = 0; i < text.Length; i++) { TextWithChords.Add(new TextLineWithChords() { Chords = chords.ElementAtOrDefault(i) == null || String.IsNullOrWhiteSpace(chords[i]) ? "" : chords[i], TextLine = text[i] }); } }