Ryujinx-GtkSharp/sample/ButtonApp.cs
Mike Kestner f774796311 2004-02-10 Mike Kestner <mkestner@ximian.com>
* gconf/GConf.PropertyEditors/PropertyEditorColorPicker.cs :
	nuke a GnomeSharp.
	* generator/Signal.cs : move eventhandlers and args into the
	base namespace instead of a *Sharp namespace.
	* sample/*.cs : nuke using *Sharp.

svn path=/trunk/gtk-sharp/; revision=22956
2004-02-10 20:35:40 +00:00

42 lines
857 B
C#
Executable File

// ButtonApp.cs - Gtk.Button class Test implementation
//
// Author: Mike Kestner <mkestner@speakeasy.net>
//
// (c) 2001-2002 Mike Kestner
namespace GtkSamples {
using Gtk;
using System;
using System.Drawing;
public class ButtonApp {
public static int Main (string[] args)
{
Application.Init ();
Window win = new Window ("Button Tester");
win.DefaultSize = new Size (200, 150);
win.DeleteEvent += new DeleteEventHandler (Window_Delete);
Button btn = new Button ("Click Me");
btn.Clicked += new EventHandler (btn_click);
win.Add (btn);
win.ShowAll ();
Application.Run ();
return 0;
}
static void btn_click (object obj, EventArgs args)
{
Console.WriteLine ("Button Clicked");
}
static void Window_Delete (object obj, DeleteEventArgs args)
{
Application.Quit ();
args.RetVal = true;
}
}
}