public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
		{
			Polygon lc = context.Instance as Polygon;
			if (lc == null)
				return value;

			if (value == null)
				value = new PointF[0];

			PolygonEditor form = new PolygonEditor(lc.GetPolygonImage());
			form.PointsFromPolygon((PointF[])value);
			if (form.ShowDialog() == DialogResult.OK) {
				return form.GetFinalPoints();
			}

			return value;
		}
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            Polygon lc = context.Instance as Polygon;

            if (lc == null)
            {
                return(value);
            }

            if (value == null)
            {
                value = new PointF[0];
            }

            PolygonEditor form = new PolygonEditor(lc.GetPolygonImage());

            form.PointsFromPolygon((PointF[])value);
            if (form.ShowDialog() == DialogResult.OK)
            {
                return(form.GetFinalPoints());
            }

            return(value);
        }