public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { frmSelProjType fSel = new frmSelProjType(); fSel.lvTemplates.Items[Convert.ToInt32(GetTypeEx(value.ToString()))].Selected = true; DialogResult result = fSel.ShowDialog(); short newtype = Convert.ToInt16(fSel.lvTemplates.SelectedIndices[0]); fSel.Dispose(); fSel = null; if (result == DialogResult.Cancel) { return(value); } else { return(GetTypeEx(newtype)); } }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { frmSelProjType fSel = new frmSelProjType(); fSel.lvTemplates.Items[Convert.ToInt32(GetTypeEx(value.ToString()))].Selected = true; DialogResult result = fSel.ShowDialog(); short newtype = Convert.ToInt16(fSel.lvTemplates.SelectedIndices[0]); fSel.Dispose(); fSel = null; if (result == DialogResult.Cancel) return value; else return GetTypeEx(newtype); }