[Monodevelop-patches-list] r1368 - trunk/md-website/tutorials
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sun Apr 4 06:30:08 EDT 2004
Author: deboald
Date: 2004-04-04 06:30:08 -0400 (Sun, 04 Apr 2004)
New Revision: 1368
Modified:
trunk/md-website/tutorials/helloworld.aspx
Log:
This was way wrong :) oops
Modified: trunk/md-website/tutorials/helloworld.aspx
===================================================================
--- trunk/md-website/tutorials/helloworld.aspx 2004-04-04 07:36:41 UTC (rev 1367)
+++ trunk/md-website/tutorials/helloworld.aspx 2004-04-04 10:30:08 UTC (rev 1368)
@@ -17,34 +17,39 @@
<pre class="code">
using System;
using Gtk;
-using GtkSharp;
public class MyWindow : Window {
- static GLib.GType type;
- static Gtk.Button button;
-
- static MyWindow ()
+ static GLib.GType gtype;
+ Button button;
+
+ public static new GLib.GType GType
{
- type = RegisterGType (typeof (MyWindow));
- button = new Button();
- button.Clicked += new EventHandler(button_Clicked);
+ get
+ {
+ if (gtype == GLib.GType.Invalid)
+ gtype = RegisterGType (typeof (MyWindow));
+ return gtype;
+ }
}
-
- public MyWindow () : base (type)
+
+ public MyWindow () : base (GType)
{
+ button = new Button("This is a button.");
+ button.Clicked += new EventHandler(button_Clicked);
+
this.Title = "MyWindow";
this.SetDefaultSize (400, 300);
- this.DeleteEvent += new DeleteEventHandler (OnMyWindowDelete);
+ this.DeleteEvent += new DeleteEventHandler (MyWindow_Delete);
this.Add(button);
this.ShowAll ();
}
-
- void OnMyWindowDelete (object o, DeleteEventArgs args)
+
+ void MyWindow_Delete (object o, DeleteEventArgs args)
{
Application.Quit ();
}
-
- static void button_Clicked (object obj, EventArgs args)
+
+ void button_Clicked (object obj, EventArgs args)
{
Console.WriteLine("Hello World");
Application.Quit ();
More information about the Monodevelop-patches-list
mailing list