Beispiel #1
0
 public void EndEdit()
 {
     Editor.Save(this.Markdown);
     Viewer.Load(this.Markdown);
     _inEdit = false;
     Backend.Activate(Viewer);
 }
Beispiel #2
0
        public void StartEdit()
        {
            Backend.Activate(Editor);
            Editor.Load(this.Markdown);
            var vidget = Editor as IVidget;

            if (vidget != null)
            {
                vidget.SetFocus();
            }
            _inEdit = true;
        }
Beispiel #3
0
 public void Load(Stream stream)
 {
     this.Markdown   = new MemoryStream();
     stream.Position = 0;
     stream.CopyTo(this.Markdown);
     stream.Position        = 0;
     this.Markdown.Position = 0;
     if (Backend.IsEmpty)
     {
         Backend.Activate(Viewer);
     }
     Viewer.Load(Markdown);
     Editor.Load(Markdown);
 }