internal ColorArrayItem(Color c, ColorArrayForm _parent) { color = c; parent = _parent; if (parent == null) { throw new ArgumentNullException("_parent can not null!"); } }
public override object EditValue( ITypeDescriptorContext context, IServiceProvider provider, object value) { IColorArrayEditorCaller caller = null; if (context.Instance is IColorArrayEditorCaller) { caller = (IColorArrayEditorCaller)context.Instance; } ColorArrayForm f = new ColorArrayForm((Color[])value, "", caller); if (f.ShowDialog() == DialogResult.OK) { return(f.GetColorArray()); } return(base.EditValue(context, provider, value)); }