Skip to content

Instantly share code, notes, and snippets.

@vcsjones
Created October 24, 2013 13:26
Show Gist options
  • Save vcsjones/7137301 to your computer and use it in GitHub Desktop.
Save vcsjones/7137301 to your computer and use it in GitHub Desktop.
open FSharp.Charting
open System
type ChartApplicationContext() as this =
inherit System.Windows.Forms.ApplicationContext()
do
let handler = new ConsoleCancelEventHandler(fun o e -> this.ExitThread())
Console.CancelKeyPress.AddHandler(handler)
[<EntryPoint>]
let main argv =
printfn "%A" argv
Chart.Line([ for x in 0 .. 10 -> x, x*x ]).ShowChart()
let context = new ChartApplicationContext()
System.Windows.Forms.Application.Run(context)
0 // return an integer exit code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment