I don't have understand the  Responsive Application "Lesson" at
http://www.mono-project.com/Responsive_Applications
Why OnButtonClick() Code Freeze the GUI?
and how i could correct it?

using Gtk;
using System;
using System.Threading;

public class Responsive {
   private static Gtk.Button button;
   public static void Main() {
       Gtk.Application.Init();
       Window win = new Window("Prova");
       button = new Gtk.Button("Start Hard Work");
       button.Clicked += new EventHandler(OnButtonClick);
       win.Add(button);
       win.ShowAll();
       Gtk.Application.Run();
   }

   private static void OnButtonClick (object obj, EventArgs args) {
       Gtk.Application.Invoke (delegate {
           Thread.Sleep(1800 + 3600);
           button.Label = "End Hard Work";
       });
   }
}
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to