// project created on 7/14/2007 at 1:07 AM using Gtk; using System; class MainClass { static void Main() { Application.Init(); HBox hbox = new HBox(); Button btn = new Button("Hello World"); btn.Clicked += new EventHandler(hello); Button btn_close = new Button("Close"); btn_close.Clicked += new EventHandler(exit); hbox.PackStart(btn); hbox.PackEnd(btn_close); Window window = new Window("helloworld"); window.DeleteEvent += delete_event; window.Add(hbox); window.ShowAll(); Application.Run(); } static void delete_event(object obj, DeleteEventArgs args) { Application.Quit(); } static void hello(object obj, EventArgs args) { Console.WriteLine("Hello World"); } static void exit(object obj, EventArgs args) { Application.Quit(); } }