Add a TerminalScheduler, refactor things

This commit is contained in:
Artyom
2020-10-01 13:35:18 +03:00
parent 7b199e8379
commit 6d3f8ffb96
5 changed files with 118 additions and 70 deletions

View File

@@ -1,11 +1,13 @@
using System;
using System.Reactive.Concurrency;
using ReactiveUI;
using Terminal.Gui;
namespace ReactiveExample {
public static class Program {
static void Main (string [] args) {
Application.Init (); // A hacky way to enable instant UI updates.
Application.MainLoop.AddTimeout(TimeSpan.FromSeconds(0.1), a => true);
Application.Init ();
RxApp.MainThreadScheduler = TerminalScheduler.Default;
RxApp.TaskpoolScheduler = TaskPoolScheduler.Default;
Application.Run (new LoginView (new LoginViewModel ()));
}
}