public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if ((provider != null) && (((IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService))) != null)) { var form = new SelectTag(); if (form.ShowDialog() == DialogResult.OK) { value = form.SelectedTag; } } return(value); }
private void buttonSearch_Click(object sender, EventArgs e) { try { var form = new SelectTag(); var dialog = form.ShowDialog(); if (dialog == DialogResult.OK) { pin.Tag = form.SelectedTag; } pinProperties.Refresh(); } catch (Exception ex) { MessageBox.Show(ex.StackTrace); } }