예제 #1
0
        public void Append(string text)
        {
            Execute.OnUIThread(() => {
                var lines = text.Split(_newLine, StringSplitOptions.None);

                for (int i = 0; i < lines.Length; i++)
                {
                    var line = lines[i];
                    if (!string.IsNullOrEmpty(line))
                    {
                        var run = new Run(line);
                        _paragraph.Inlines.Add(run);
                    }

                    if (i < lines.Length - 1)
                    {
                        _paragraph.Inlines.Add(new LineBreak());
                    }
                }

                if (_view != null)
                {
                    _view.StartScrollTimer();
                }
            });
        }
예제 #2
0
 protected override void OnViewLoaded(object view)
 {
     _view = (IOutputView)view;
     _view.StartScrollTimer();
 }