[Mono-list] Gtk C# Hello World
Mike Kestner
mkestner@speakeasy.net
17 Sep 2001 08:48:42 -0500
--=-oqnPXixgTraPCXiLyT1j
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Sun, 2001-09-16 at 23:10, Miguel de Icaza wrote:
> (btw, you forgot to post the sample).
Attached this time, in case anyone wants to see what a Gtk# Hello World
looks like.
> One thing that might be beneficial for the project is to use the
> GObject arguments to minimize the code written. A lot of settings
> can be accessed through arguments, so you could minimize the number of
> Dllimports that you have to write.
Yep, this is in the plan. You probably make this suggestion because of
Window.Title's current implementation, but I had intended to go back and
redo it as read/write using g_object_get/set. Glad to see we're thinking
in the same direction.
Mike
--=-oqnPXixgTraPCXiLyT1j
Content-Type: text/x-c++
Content-Disposition: attachment; filename=HelloWorld.cs
Content-ID: <1000733862.29129.27.camel@notebook.localdomain>
Content-Transfer-Encoding: 7bit
// TestWindow.cs - GTK Window class Test implementation
//
// Author: Mike Kestner <mkestner@speakeasy.net>
//
// (c) 2001 Mike Kestner
namespace GtkSamples {
using GTK;
using System;
public class HelloWorld {
public static int Main (string[] args)
{
Application.Init (ref args);
Window win = new Window ("Gtk# Hello World");
win.Delete += new EventHandler (delete_cb);
win.Show ();
Application.Run ();
return 0;
}
static void delete_cb (object obj, EventArgs args)
{
Application.Quit ();
}
}
}
--=-oqnPXixgTraPCXiLyT1j--