reacctive ui form

This commit is contained in:
2019-05-04 14:17:22 +02:00
parent 6795fc01f5
commit e5ae6b39fe
8 changed files with 154 additions and 2 deletions

View File

@ -22,7 +22,7 @@ namespace WindowsFormsAppReact
private void Button1_Click(object sender, EventArgs e)
{
Subject.ObserveOn(SynchronizationContext.Current).Subscribe((i) =>
Subject.Sample(TimeSpan.FromMilliseconds(20)).ObserveOn(SynchronizationContext.Current).Subscribe((i) =>
{
label1.Text = i.ToString();
});
@ -36,7 +36,7 @@ namespace WindowsFormsAppReact
{
Task.Run(() =>
{
for (int i = 0; i < 100; i++)
for (int i = 0; i < 10000000000; i++)
{
Subject.OnNext(i);
}