Snippets in category Event-driven
Form changing color
Windows Forms tutorial showing how to create form with button and how to register an event handler. When the button is clicked, the form changes its background color.
29 people like this
Posted: 1 years ago by Tomas PetricekCreating objects with events
This snippet shows how to create objects with events in F#. It shows both simple event (to be used from F#) and a .NET compatible event with specific delegate type.
53 people like this
Posted: 1 years ago by Tomas PetricekF# impl of SelectMany and TakeUntil from Rx
F# implementation of SelectMany and TakeUntil (from Rx) on F# events
13 people like this
Posted: 1 years ago by Ankur DhamaAsync to IObservable
Wraps an Async as an IObservable to allow easier consumption by other .NET languages. Many thanks to desco for his help: http://cs.hubfs.net/forums/thread/16545.aspx
3 people like this
Posted: 1 years ago by Ryan RileyMerge two events in one event to move over a list
Merge two events in one event to move over a list. Can be used to implement a wizard / slider mechanism
11 people like this
Posted: 1 years ago by Ankur DhamaDisposable computation builder
Computation builder that provides easy way of constructing IDisposable objects. It supports elegant composition of disposable objects using 'do!' which can be used for example when working with 'IObservable' type.
27 people like this
Posted: 1 years ago by Tomas PetricekObservable.Subject
The Subject<T> type implements both IObserver<T> and IObservable<T>. It is functionally equivalent to the type of the same name in the Reactive Extensions (Rx) library.
13 people like this
Posted: 1 years ago by Phillip TrelfordResource cleanup event combinator
Declares an event combinator 'Event.using' that automatically releases resources allocated by a previous event occurence. Each event occurence creates a value using a function specified by the user and automatically calls 'Dispose' when generating a new value.
2 people like this
Posted: 1 years ago by Tomas PetricekReplaySubject
The ReplaySubject<T> type implements both IObserver<T> and IObservable<T>. It is functionally equivalent to the class of the same name in the Reactive Extensions (Rx) library with a replay buffer of a specified size .
1 people like this
Posted: 11 months ago by Phillip Trelford
Still Mouse Click Event
Detects a mouse down then up event without a move.
3 people like this
Posted: 10 months ago by Phillip TrelfordStill Mouse Click Event Using Scan
Detects a mouse down then up event without a move.
1 people like this
Posted: 10 months ago by Zach BrayBasic WinForms drag and drop
Quick example of using drag-n-drop with WinForms.
3 people like this
Posted: 9 months ago by MichaelGGRx CombineLatest for list of IObservable<'a> to IObservable<'a array>.
Rx CombineLatest for list of IObservable<'a> to IObservable<'a array>.
12 people like this
Posted: 9 months ago by Ankur DhamaCreating observable using Async.StartDisposable
Implements a simple Async.StartDisposable extension that can be used to easily create IObservable values from F# asynchronous workflows. The method starts an asynchronous workflow and returns IDisposable that cancels the workflow when disposed.
4 people like this
Posted: 8 months ago by Tomas PetricekSliding window for Observable
Implements the Observable.windowed function that creates an observable returning a sliding window. The function is an observable version of Seq.observable. The implementation uses a simple F# agent that keeps partial windows and sends them to an observer.
3 people like this
Posted: 8 months ago by Tomas PetricekSimple Reactive Extensions Example
Subject is a class that implements both IObservable<'T> and IObserver<'T>
5 people like this
Posted: 6 months ago by Tuomas HietanenObservable Async Subject
Simple Async Observable Subject<'T> based on MailboxProcessor. Type declaration is more ML like, but the idea is represented in a simple way!
4 people like this
Posted: 5 months ago by Fahad