public override object EditValue( ITypeDescriptorContext context, IServiceProvider provider, object value) { ICaptionRandomizer current; using (CaptionColorChooser frm = new CaptionColorChooser()) { // Set currently objects to the form. frm.Randomizer = (ICaptionRandomizer)value; frm.contextInstance = context.Instance as KrbTabControl; if (frm.ShowDialog() == DialogResult.OK) current = frm.Randomizer; else current = (ICaptionRandomizer)value; } return current; }
public override object EditValue( System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, object value) { ICaptionRandomizer current; using (CaptionColorChooser frm = new CaptionColorChooser()) { // Set currently objects to the form. frm.Randomizer = (ICaptionRandomizer)value; frm.contextInstance = context.Instance as KRBTabControl; if (frm.ShowDialog() == DialogResult.OK) { current = frm.Randomizer; } else { current = (ICaptionRandomizer)value; } } return(current); }