Esempio n. 1
0
 function init()
 {
     $this->Application = $Application = new Mono("Gtk.Application");
     $Application->Init();
     $win = new Mono("Gtk.Window", "Hello");
     $win->add_DeleteEvent(new Mono("Gtk.DeleteEventHandler", mono_closure($this, "delete", mono('Gtk.DeleteEventHandler$Method'))));
     $btn = new Mono("Gtk.Button", "Show output from phpinfo()");
     $btn->add_Clicked(new Mono("System.EventHandler", mono_closure($this, "clicked", mono('System.EventHandler$Method'))));
     $win->Add($btn);
     $win->ShowAll();
 }
 function init()
 {
     $Application = $this->Application = mono("Gtk.Application");
     $Application->Init();
     $filew = $this->filew = new Mono("Gtk.FileSelection", "Open a file ...");
     $filew->add_DeleteEvent(new Mono("Gtk.DeleteEventHandler", mono_closure($this, "quit", mono('Gtk.DeleteEventHandler$Method'))));
     $b = $filew->get_OkButton();
     $b->add_Clicked(new Mono("System.EventHandler", mono_closure($this, "ok", mono('System.EventHandler$Method'))));
     $b = $filew->get_CancelButton();
     $b->add_Clicked(new Mono("System.EventHandler", mono_closure($this, "quit", mono('System.EventHandler$Method'))));
     $filew->set_Filename("penguin.png");
     $filew->Show();
 }