private void button_Click(object sender, EventArgs e)
        {
            using (CompositeEditorDialog dialog = new CompositeEditorDialog())
            {
                if (_arrayProperty != null)
                {
                    dialog.Text = string.IsNullOrEmpty(_arrayProperty.Name) ? Resources.Properties : string.Format(Resources.PropertiesOf, _arrayProperty.Name);
                    dialog.SetArrayProperty(_arrayProperty, _object);
                }
                else if (_structProperty != null)
                {
                    dialog.Text = string.IsNullOrEmpty(_structProperty.Name) ? Resources.Properties : string.Format(Resources.PropertiesOf, _structProperty.Name);
                    dialog.SetStructProperty(_structProperty, _object);
                }

                dialog.ShowDialog();

                update();

                if (dialog.IsModified)
                {
                    OnValueChanged(new DesignerPropertyInfo());
                }
            }
        }
        private void button_Click(object sender, EventArgs e)
        {
            using(CompositeEditorDialog dialog = new CompositeEditorDialog()) {
                if (_arrayProperty != null) {
                    dialog.Text = string.IsNullOrEmpty(_arrayProperty.Name) ? Resources.Properties : string.Format(Resources.PropertiesOf, _arrayProperty.Name);
                    dialog.SetArrayProperty(_arrayProperty, _object);

                } else if (_structProperty != null) {
                    dialog.Text = string.IsNullOrEmpty(_structProperty.Name) ? Resources.Properties : string.Format(Resources.PropertiesOf, _structProperty.Name);
                    dialog.SetStructProperty(_structProperty, _object);
                }

                dialog.ShowDialog();

                update();

                if (dialog.IsModified)
                {
                    OnValueChanged(new DesignerPropertyInfo());
                }
            }
        }