rajeeshcv.com

Sharing my knowledge

Google Syntax highlighter test

Testing Google syntax highlighter plugin...

public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            if (provider != null)
            {
                editorService = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
            }

            if (editorService != null)
            {
                DockableItemCollection items = value as DockableItemCollection;
                if (items == null)
                {
                    items = new DockableItemCollection();
                }
                DockableCollectionEditor itemEditor = new DockableCollectionEditor(items, editorService);
                editorService.ShowDialog(itemEditor);
                value = itemEditor.Items;
                context.OnComponentChanged();
            }

            return value;
        }
I hope the above sample code is highlighted and formatted properly