GtkSharp/Source/Templates/GtkSharp.Template.CSharp/content/GtkSharp.Dialog.CSharp/Gtk_Dialog.cs

25 lines
559 B
C#
Raw Normal View History

2017-11-02 16:12:15 +00:00
using System;
using Gtk;
using UI = Gtk.Builder.ObjectAttribute;
namespace GtkNamespace
{
class Gtk_Dialog : Dialog
{
public Gtk_Dialog() : this(new Builder("Gtk_Dialog.glade")) { }
private Gtk_Dialog(Builder builder) : base(builder.GetRawOwnedObject("Gtk_Dialog"))
2017-11-02 16:12:15 +00:00
{
2017-11-02 21:13:53 +00:00
builder.Autoconnect(this);
2017-11-02 16:12:15 +00:00
DefaultResponse = ResponseType.Cancel;
2017-11-02 21:13:53 +00:00
Response += Dialog_Response;
2017-11-02 16:12:15 +00:00
}
2017-11-02 21:13:53 +00:00
private void Dialog_Response(object o, ResponseArgs args)
2017-11-02 16:12:15 +00:00
{
Hide();
}
}
}