2002-02-15 11:15:11 +00:00
|
|
|
// HelloWorld.cs - GTK Window class Test implementation
|
2001-09-16 23:15:56 +00:00
|
|
|
//
|
|
|
|
// Author: Mike Kestner <mkestner@speakeasy.net>
|
|
|
|
//
|
2002-03-27 01:24:56 +00:00
|
|
|
// (c) 2001-2002 Mike Kestner
|
2001-09-16 23:15:56 +00:00
|
|
|
|
|
|
|
namespace GtkSamples {
|
|
|
|
|
2001-09-19 11:37:15 +00:00
|
|
|
using Gtk;
|
2001-12-04 19:34:26 +00:00
|
|
|
using Gdk;
|
2001-09-16 23:15:56 +00:00
|
|
|
using System;
|
|
|
|
|
|
|
|
public class HelloWorld {
|
|
|
|
|
|
|
|
public static int Main (string[] args)
|
|
|
|
{
|
2002-03-26 01:29:43 +00:00
|
|
|
Application.Init ();
|
2002-05-02 23:29:33 +00:00
|
|
|
Gtk.Window win = new Gtk.Window ("Gtk# Hello World");
|
2002-07-16 23:14:35 +00:00
|
|
|
win.DeleteEvent += new DeleteEventHandler (Window_Delete);
|
2002-02-15 01:08:57 +00:00
|
|
|
win.ShowAll ();
|
2001-09-16 23:15:56 +00:00
|
|
|
Application.Run ();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2002-07-16 23:14:35 +00:00
|
|
|
static void Window_Delete (object obj, DeleteEventArgs args)
|
2001-09-16 23:15:56 +00:00
|
|
|
{
|
|
|
|
Application.Quit ();
|
2003-11-20 01:10:46 +00:00
|
|
|
args.RetVal = true;
|
2001-09-16 23:15:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|