Пример #1
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            // Access the Property Browser's UI display service
            IWindowsFormsEditorService editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
            FieldDisplaySettings       instance      = ((FieldDisplaySettings)context.Instance);

            // display
            DBObjectFieldEditorDialog dialog = new DBObjectFieldEditorDialog(instance.Owner);

            editorService.ShowDialog(dialog);

            // update screen and return results
            instance.Owner.OnFieldPropertiesChanged();
            return(dialog.GetFieldList());
        }
Пример #2
0
        void OnEditRowsSelected(object sender, EventArgs args)
        {
            IFieldDisplaySettingsOwner instance = ((IFieldDisplaySettingsOwner)Control);

            DBObjectFieldEditorDialog dialog = new DBObjectFieldEditorDialog(instance);

            dialog.ShowDialog();

            // Change property value
            PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(FieldDisplaySettings))["FieldProperties"];

            RaiseComponentChanging(property);
            instance.FieldDisplaySettings.FieldProperties = dialog.GetFieldList();
            RaiseComponentChanged(property, null, instance.FieldDisplaySettings.FieldProperties);

            // update screen
            instance.OnFieldPropertiesChanged();
        }
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            // Access the Property Browser's UI display service
            IWindowsFormsEditorService editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
            FieldDisplaySettings instance = ((FieldDisplaySettings)context.Instance);

            // display
            DBObjectFieldEditorDialog dialog = new DBObjectFieldEditorDialog(instance.Owner);
            editorService.ShowDialog(dialog);

            // update screen and return results
            instance.Owner.OnFieldPropertiesChanged();
            return dialog.GetFieldList();
        }
        void OnEditRowsSelected(object sender, EventArgs args)
        {
            IFieldDisplaySettingsOwner instance = ((IFieldDisplaySettingsOwner)Control);

            DBObjectFieldEditorDialog dialog = new DBObjectFieldEditorDialog(instance);
            dialog.ShowDialog();

            // Change property value
            PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(FieldDisplaySettings))["FieldProperties"];
            RaiseComponentChanging(property);
            instance.FieldDisplaySettings.FieldProperties = dialog.GetFieldList();
            RaiseComponentChanged(property, null, instance.FieldDisplaySettings.FieldProperties);

            // update screen
            instance.OnFieldPropertiesChanged();
        }