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);
        }
Exemplo n.º 2
0
 public void Append(INoteContentItem item)
 {
     this.noteContent.Add(item);
 }