public void InternalWrite(string text) { if (_isLoggingEnabled) { _logText.Append(text); if (null != _view) { _view.SetText(_logText.ToString()); } } }
private void OnTextChanged() { if (_view != null) { Execute.OnUIThread(() => _view.SetText(StringBuilder.ToString())); } }
protected override void OnViewLoaded(object view) { _view = (IOutputView)view; _view.SetText(StringBuilder.ToString()); _view.ScrollToEnd(); if (view is OutputView outputView) { outputView.Loaded += OnLoaded; outputView.Unloaded += OnUnloaded; } }
protected override void OnViewLoaded(object view) { _view = (IOutputView)view; if (_view == null) { throw new InvalidCastException(); } _view.SetText(_stringBuilder.ToString()); _view.ScrollToEnd(); base.OnViewLoaded(view); }
protected override void OnViewLoaded(object view) { _view = (IOutputView)view; _view.SetText(StringBuilder.ToString()); _view.ScrollToEnd(); if (view is OutputView outputView) { outputView.Loaded += OnLoaded; outputView.Unloaded += OnUnloaded; } LogWatcher.EnableRaisingEvents = true; }
public OutputViewModel() { _stringBuilder = new StringBuilder(); _writer = new OutputWriter(this); Observable.FromEventPattern <EventHandler, EventArgs>(h => TextChanged += h, h => TextChanged -= h) .Buffer(TimeSpan.FromSeconds(0.1), 1000) .Subscribe(_ => { if (_view != null) { Execute.OnUIThread(() => _view.SetText(_stringBuilder.ToString())); } }); }
protected override void OnViewLoaded(object view) { _view = (IOutputView) view; _view.SetText(_stringBuilder.ToString()); _view.ScrollToEnd(); }
protected override void OnViewLoaded(object view) { _view = (IOutputView)view; _view.SetText(_stringBuilder.ToString()); _view.ScrollToEnd(); }