Exemplo n.º 1
0
        private void InternalLoadCategories()
        {
            _categories.Items.Clear();

            // Load al the categories
            foreach (string name in PhotoInfo.GetCatList())
            {
                _categories.Items.Add(name);
            }
        }
Exemplo n.º 2
0
        private void _OK_Click(object sender, System.EventArgs e)
        {
            string[] cats = PhotoInfo.GetCatList();
            foreach (string cat in cats)
            {
                if (cat == _name.Text)
                {
                    MessageBox.Show(this, Loc.Get("Category already exists"), Loc.Get("Error"));
                    return;
                }
            }

            PhotoInfo.AddCategory(_name.Text);

            DialogResult = DialogResult.OK;
            this.Close();
        }