Exemplo n.º 1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            EditTagForm tagForm = new EditTagForm();

            tagForm.Provider = new TagProvider();
            DialogResult result = tagForm.ShowDialog(this);

            if (result == DialogResult.OK)
            {
                TagProvider provider = tagForm.Provider;
                _manager.Save(provider);
                RefreshProviders(false);
                listBoxOptions.SelectedItem = provider;

                if (_context != null)
                {
                    _context.CurrentProvider = provider;
                }
            }
        }