private void AppendTokenToNoteEnd(string token) { if (this.note.IsEmpty) { if (this.noteContentState == NoteContentState.Paragraph) { this.note.Append(new ParagraphTextNoteContentItem(token)); } else if (this.noteContentState == NoteContentState.List) { ListNoteContentItem listContent = new ListNoteContentItem(); listContent.Append(new PlainTextNoteContentItem(token)); this.note.Append(listContent); } return; } INoteContentItem lastItem = this.note.LastItem; PlainTextNoteContentItem lastPlainTextContent = lastItem as PlainTextNoteContentItem; if (lastPlainTextContent == null) { lastPlainTextContent = (lastItem as ListNoteContentItem).LastItem; } lastPlainTextContent.Append(token); }
public void Append(PlainTextNoteContentItem listItem) { this.listItems.Add(listItem); }