buypeeb-cs/AddItemDialogue.cs

35 lines
782 B
C#
Raw Normal View History

2020-09-01 09:58:35 +00:00
using System;
using Gtk;
using UI = Gtk.Builder.ObjectAttribute;
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;
}
}
}