Ryujinx-GtkSharp/Source/Workload/GtkSharp.Workload.Template.FSharp/content/GtkSharp.Application.FSharp/MainWindow.fs
Trung Nguyen 60376ae510
feat: GtkSharp net6 workload (#351)
* feat: GtkSharp net6 workload

* feat(Workload): GtkSharp template packs

* chore: Support .NET SDK 6.0.300

And also changed the build script to target SDK bands.

* build: Workload install and uninstall targets
2022-05-29 10:55:50 +02:00

25 lines
713 B
Forth

namespace GtkNamespace
open Gtk
type MainWindow (builder : Builder) as this =
inherit Window(builder.GetRawOwnedObject("MainWindow"))
let mutable _label1 : Label = null
let mutable _button1 : Button = null
let mutable _counter = 0;
do
_label1 <- builder.GetObject("_label1") :?> Label
_button1 <- builder.GetObject("_button1") :?> Button
this.DeleteEvent.Add(fun _ ->
Application.Quit()
)
_button1.Clicked.Add(fun _ ->
_counter <- _counter + 1
_label1.Text <- "Hello World! This button has been clicked " + _counter.ToString() + " time(s)."
)
new() = new MainWindow(new Builder("MainWindow.glade"))