buypeeb-cs/AddItemDialogue.cs

33 lines
728 B
C#

using Gtk;
namespace Buypeeb {
class AddItemDialogue : Dialog {
private Entry EntryURL;
private Entry EntryName;
public AddItemDialogue() : this(new Builder("add.glade")) { }
private AddItemDialogue(Builder builder) : base(builder.GetObject("DialogueAdd").Handle) {
this.Title = "Add item";
builder.Autoconnect(this);
this.EntryURL = (Entry)builder.GetObject("EntryAddURL");
this.EntryName = (Entry)builder.GetObject("EntryAddName");
DeleteEvent += Window_Shutdown;
}
private void Window_Shutdown(object sender, DeleteEventArgs args) {
Application.Quit();
}
public string GetURL() {
return this.EntryURL.Text;
}
public string GetName() {
return this.EntryName.Text;
}
}
}