Exemplo n.º 1
0
        public WArticle() :
            base(Gtk.WindowType.Toplevel)
        {
            this.Build();

            Dictionary <string, ulong> dict = new Dictionary <string, ulong>();

            foreach (Categoria c in CategoryDAO.GetAll())
            {
                dict.Add(c.Name, c.Id);
                cbCategory.AppendText(c.Name);
            }
        }
Exemplo n.º 2
0
        public WCategoria(Categoria categoria) :
            base(Gtk.WindowType.Toplevel)
        {
            Build();

            entryName.Text = categoria.Name ?? "";

            btExit.Clicked += (sender, e) => Destroy();

            btOk.Clicked += (sender, e) => {
                Categoria c = new Categoria(entryName.Text, categoria.Id);
                CategoryDAO.Save(c);
                Destroy();
            };
        }