31 lines
739 B
C#
31 lines
739 B
C#
using Gtk;
|
|
|
|
namespace Buypeeb {
|
|
internal class AddItemDialogue : Dialog {
|
|
private readonly Entry entryURL;
|
|
private readonly Entry entryName;
|
|
|
|
public AddItemDialogue() : this(new Builder("add.glade")) {
|
|
}
|
|
|
|
private AddItemDialogue(Builder builder) : base(builder.GetObject("DialogueAdd").Handle) {
|
|
Title = "Add item";
|
|
builder.Autoconnect(this);
|
|
entryURL = (Entry) builder.GetObject("EntryAddURL");
|
|
entryName = (Entry) builder.GetObject("EntryAddName");
|
|
DeleteEvent += Window_Shutdown;
|
|
}
|
|
|
|
private static void Window_Shutdown(object sender, DeleteEventArgs args) {
|
|
Application.Quit();
|
|
}
|
|
|
|
public string GetURL() {
|
|
return entryURL.Text;
|
|
}
|
|
|
|
public string GetName() {
|
|
return entryName.Text;
|
|
}
|
|
}
|
|
}
|