File: HelloWorld.cs

package info (click to toggle)
gtk-sharp2 2.12.10-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 22,532 kB
  • ctags: 6,571
  • sloc: xml: 282,043; cs: 25,983; sh: 10,177; ansic: 2,922; makefile: 1,270; perl: 1,216
file content (32 lines) | stat: -rwxr-xr-x 607 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// HelloWorld.cs - GTK Window class Test implementation
//
// Author: Mike Kestner <mkestner@speakeasy.net>
//
// (c) 2001-2002 Mike Kestner

namespace GtkSamples {

	using Gtk;
	using Gdk;
	using System;

	public class HelloWorld  {

		public static int Main (string[] args)
		{
			Application.Init ();
			Gtk.Window win = new Gtk.Window ("Gtk# Hello World");
			win.DeleteEvent += new DeleteEventHandler (Window_Delete);
			win.ShowAll ();
			Application.Run ();
			return 0;
		}

		static void Window_Delete (object obj, DeleteEventArgs args)
		{
			Application.Quit ();
			args.RetVal = true;
		}

	}
}