![](https://blogimg.goo.ne.jp/user_image/2c/88/15fbaf2340b43acac413f12bface83a4.png)
参考
using System;
using Gtk;
using Glade;
class DemoWindow {
void on_button1_clicked(object o, EventArgs e)
{
Console.WriteLine("Clicked!");
}
public DemoWindow ()
{
Glade.XML gui = new Glade.XML("./project1.glade","window1","");
gui.Autoconnect (this);
}
}
class GtkSharpDemo {
static void Main()
{
Gtk.Application.Init();
DemoWindow dw = new DemoWindow();
Gtk.Application.Run();
}
}
mcs -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0 demo.cs して、
$ mono demo.exe で起動します。
編集
using System;
using Gtk;
using Glade;
class DemoWindow {
void on_button1_clicked(object o, EventArgs e)
{
Console.WriteLine("Clicked!");
}
public DemoWindow ()
{
Glade.XML gui = new Glade.XML("./project1.glade","window1","");
gui.Autoconnect (this);
}
}
class GtkSharpDemo {
static void Main()
{
Gtk.Application.Init();
DemoWindow dw = new DemoWindow();
Gtk.Application.Run();
}
}
mcs -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0 demo.cs して、
$ mono demo.exe で起動します。
編集