SlowLogicBoy / Eto.Rx

Reactive extensions for Eto.Forms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Eto.Rx

Reactive extensions for Eto.Forms (adds observables for Eto events.)

Example usage:

Instead of

var txt = new TextBox();
txt.KeyUp += (s, e) => {
    if(e.KeyData != (Keys.Control | Keys.C)) return;
    Console.WriteLine("'Control + C' was pressed");
};

you can do:

var txt = new TextBox();
txt.Events().KeyUp
    .Select(k => k.KeyData)
    .Where(k => k == (Keys.Control | Keys.C))
    .Subscribe(k => Console.WriteLine("'Control + C' was pressed"));

Generated using ReactiveUI EventBuilder

Usage

  1. Copy Eto.Rx.cs file to your project.
  2. Add Eto.Forms and System.Reactive.Linq nugets to your project

About

Reactive extensions for Eto.Forms

License:MIT License


Languages

Language:C# 100.0%