Example #1
0
            internal StyleEditorForm(CollectionEditor editor, bool isRowCollection) : base(editor)
            {
                this.editor          = (StyleCollectionEditor)editor;
                this.isRowCollection = isRowCollection;
                this.InitializeComponent();
                this.HookEvents();
                DesignerUtils.ApplyListViewThemeStyles(this.columnsAndRowsListView);
                base.ActiveControl = this.columnsAndRowsListView;
                this.tlp           = base.Context.Instance as TableLayoutPanel;
                this.tlp.SuspendLayout();
                this.deleteList = new ArrayList();
                IDesignerHost service = this.tlp.Site.GetService(typeof(IDesignerHost)) as IDesignerHost;

                if (service != null)
                {
                    this.tlpDesigner = service.GetDesigner(this.tlp) as TableLayoutPanelDesigner;
                    this.compSvc     = service.GetService(typeof(IComponentChangeService)) as IComponentChangeService;
                }
                this.rowStyleProp = TypeDescriptor.GetProperties(this.tlp)["RowStyles"];
                this.colStyleProp = TypeDescriptor.GetProperties(this.tlp)["ColumnStyles"];
                this.tlpDesigner.SuspendEnsureAvailableStyles();
            }
 internal StyleEditorForm(CollectionEditor editor, bool isRowCollection)
     : base(editor)
 {
     this.editor = (StyleCollectionEditor) editor;
     this.isRowCollection = isRowCollection;
     this.InitializeComponent();
     this.HookEvents();
     DesignerUtils.ApplyListViewThemeStyles(this.columnsAndRowsListView);
     base.ActiveControl = this.columnsAndRowsListView;
     this.tlp = base.Context.Instance as TableLayoutPanel;
     this.tlp.SuspendLayout();
     this.deleteList = new ArrayList();
     IDesignerHost service = this.tlp.Site.GetService(typeof(IDesignerHost)) as IDesignerHost;
     if (service != null)
     {
         this.tlpDesigner = service.GetDesigner(this.tlp) as TableLayoutPanelDesigner;
         this.compSvc = service.GetService(typeof(IComponentChangeService)) as IComponentChangeService;
     }
     this.rowStyleProp = TypeDescriptor.GetProperties(this.tlp)["RowStyles"];
     this.colStyleProp = TypeDescriptor.GetProperties(this.tlp)["ColumnStyles"];
     this.tlpDesigner.SuspendEnsureAvailableStyles();
 }