Esempio n. 1
0
        internal DetailsTemplatesEditor()
        {
            this.InitializeComponent();
            this.serviceContainer = new ServiceContainer();
            ServicedContainer servicedContainer = new ServicedContainer(this.serviceContainer);

            this.templatePage      = new DetailsTemplatesPropertyPage(this.serviceContainer);
            this.templatePage.Dock = DockStyle.Fill;
            this.propertyGrid      = new PropertyGrid();
            this.propertyGrid.CommandsVisibleIfAvailable = false;
            this.propertyGrid.Dock = DockStyle.Fill;
            this.toolbox           = new Toolbox(this.templatePage.TemplateSurface);
            this.toolbox.Dock      = DockStyle.Fill;
            this.splitContainer2.Panel1.TabIndex = 1;
            this.splitContainer2.Panel2.TabIndex = 2;
            this.splitContainer2.Panel1.Controls.Add(this.toolbox);
            this.splitContainer2.Panel2.Controls.Add(this.templatePage);
            this.splitContainer1.Panel2.Controls.Add(this.propertyGrid);
            this.splitContainer1.Panel1.TabIndex = 0;
            this.splitContainer1.Panel2.TabIndex = 3;
            this.serviceContainer.AddService(typeof(IToolboxService), this.toolbox);
            this.serviceContainer.AddService(typeof(PropertyGrid), this.propertyGrid);
            this.serviceContainer.AddService(typeof(UIService), base.ShellUI);
            servicedContainer.Add(this.propertyGrid);
            servicedContainer.Add(this.toolbox);
            this.templatePage.TemplateSurface.ExchangeForm = this;
        }
Esempio n. 2
0
        public void ShowModeless(IServiceProvider parentProvider, Control owner)
        {
            ServiceContainer serviceContainer = new ServiceContainer(parentProvider);

            serviceContainer.AddService(typeof(IUIService), new UIService(this));
            ServicedContainer servicedContainer = new ServicedContainer(serviceContainer);

            servicedContainer.Add(this, this.GetHashCode().ToString());
            this.restoreAfterModeless = (owner ?? (parentProvider as Control));
            if (owner == null)
            {
                base.Show();
                return;
            }
            base.Show(owner);
        }