I'm trying reactive-framework in a win-form.
IObservable<IEvent<MouseEventArgs>> mouseMoves = Observable.FromEvent<MouseEventArgs>(this, "MouseMove");
IObservable<IEvent<MouseEventArgs>> mouseDowns = Observable.FromEvent<MouseEventArgs>(this, "MouseDown");
IObservable<IEvent<MouseEventArgs>> mouseUps = Observable.FromEvent<MouseEventArgs>(this, "MouseUp");
var pointChanges = mouseMoves.Zip(mouseMoves.Skip(1), (prev, post) => new { Prev = prev, Post = post });
var mouseDrags = from d in mouseDowns
from p in pointChanges.TakeUntil(mouseUps)
select p;
I want to filter the mouseDrags, only those MouseUps more than 1 second after MouseDowns are needed. How?