Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Latest commit

 

History

History
29 lines (23 loc) · 772 Bytes

Readme.md

File metadata and controls

29 lines (23 loc) · 772 Bytes

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