Example #1
0
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            if (!IsValid())
            {
                return;
            }

            TagProvider provider = (TagProvider)listBoxOptions.SelectedItem;
            EditTagForm tagForm  = new EditTagForm();

            tagForm.Provider = provider;
            DialogResult result = tagForm.ShowDialog(this);

            if (result == DialogResult.OK)
            {
                _manager.Save(tagForm.Provider);
                RefreshProviders(false);
                listBoxOptions.SelectedItem = tagForm.Provider;
            }
        }
Example #2
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;
                }
            }
        }
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            if (!IsValid())
                return;

            TagProvider provider = (TagProvider)listBoxOptions.SelectedItem;
            EditTagForm tagForm = new EditTagForm();
            tagForm.Provider = provider;
            DialogResult result = tagForm.ShowDialog(this);
            if (result == DialogResult.OK)
            {
                _manager.Save(tagForm.Provider);
                RefreshProviders(false);
                listBoxOptions.SelectedItem = tagForm.Provider;
            }
        }
        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;
            }

        }