Skip to content

Instantly share code, notes, and snippets.

@vivainio
Created July 14, 2018 15:40
Show Gist options
  • Save vivainio/e3831fe36468c218d19b51af266bfc4d to your computer and use it in GitHub Desktop.
Save vivainio/e3831fe36468c218d19b51af266bfc4d to your computer and use it in GitHub Desktop.
module MathMan.Main
open System
open System.Windows.Forms
open MathManDesign
open TrivialBehind
type MathManBehind(ui: MathManUi) =
let mutable counter = 0;
do
ui.button1.Click.Add <| fun _ ->
counter <- counter + 1
ui.label1.Text <- sprintf "Lorem ipsum %d" counter
let registerBehinds() =
TrivialBehinds.RegisterBehind<MathManUi, MathManBehind>()
[<EntryPoint; STAThread>]
let main argv =
Application.EnableVisualStyles()
Application.SetCompatibleTextRenderingDefault(false)
registerBehinds()
use form = new MathManForm()
Application.Run(form)
0 // return an integer exit code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment