private void ActionActivated(object sender, EventArgs a) { Gtk.Action action = sender as Gtk.Action; MessageDialog md; md = new MessageDialog(this, DialogFlags.DestroyWithParent, MessageType.Info, ButtonsType.Close, "You activated action: \"{0}\" of type \"{1}\"", action.Name, action.GetType()); md.Run(); md.Destroy(); }
static void OnActivate(object obj, EventArgs args) { Gtk.Action action = (Gtk.Action)obj; Console.WriteLine("Action {0} (type={1}) activated", action.Name, action.GetType().FullName); }