Пример #1
0
        public OutputViewModel()
        {
            _stringBuilder = new StringBuilder();
            _writer = new OutputWriter(this);

            Observable.FromEventPattern<EventHandler, EventArgs>(h => TextChanged += h, h => TextChanged -= h)
                .Throttle(TimeSpan.FromSeconds(1))
                .Subscribe(_ =>
                {
                    if (_view != null)
                        Execute.OnUIThread(() => _view.SetText(_stringBuilder.ToString()));
                });
        }
Пример #2
0
 public OutputViewModel()
 {
     DisplayName = Resources.OutputDisplayName;
     _stringBuilder = new StringBuilder();
     _writer = new OutputWriter(this);
 }
Пример #3
0
 public OutputViewModel()
 {
     DisplayName = "Output";
     _stringBuilder = new StringBuilder();
     _writer = new OutputWriter(this);
 }