35 lines
782 B
C#
35 lines
782 B
C#
|
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;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|