public override object EditValue(System.ComponentModel.ITypeDescriptorContext context,
          IServiceProvider provider, object value)
        {
            // Get the component configuration dictionary
            ComponentConfigurationDictionary items = value as
                ComponentConfigurationDictionary;

            if(context == null || provider == null || context.Instance == null ||
              items == null)
                return base.EditValue(context, provider, value);

            using(ComponentConfigurationEditorDlg dlg =
              new ComponentConfigurationEditorDlg(items))
            {
                dlg.ShowDialog();
            }

            return value;
        }
Ejemplo n.º 2
0
        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context,
                                         IServiceProvider provider, object value)
        {
            // Get the component configuration dictionary
            ComponentConfigurationDictionary items = value as
                                                     ComponentConfigurationDictionary;

            if (context == null || provider == null || context.Instance == null ||
                items == null)
            {
                return(base.EditValue(context, provider, value));
            }

            using (ComponentConfigurationEditorDlg dlg =
                       new ComponentConfigurationEditorDlg(items))
            {
                dlg.ShowDialog();
            }

            return(value);
        }