Esempio n. 1
0
        private void ShowDesignerActionUI(object sender, DesignerTransactionCloseEventArgs e)
        {
            DesignerActionUIService service = (DesignerActionUIService)this.GetService(typeof(DesignerActionUIService));

            if (service != null)
            {
                service.ShowUI(this.Component);
            }
            IDesignerHost host = (IDesignerHost)this.GetService(typeof(IDesignerHost));

            if (host != null)
            {
                host.TransactionClosed -= new DesignerTransactionCloseEventHandler(this.ShowDesignerActionUI);
            }
        }
Esempio n. 2
0
        public virtual void InitializeNewComponent(IDictionary defaultValues)
        {
            DesignerActionUIService service = (DesignerActionUIService)this.GetService(typeof(DesignerActionUIService));

            if ((service != null) && service.ShouldAutoShow(this.Component))
            {
                IDesignerHost host = (IDesignerHost)this.GetService(typeof(IDesignerHost));
                if ((host != null) && host.InTransaction)
                {
                    host.TransactionClosed += new DesignerTransactionCloseEventHandler(this.ShowDesignerActionUI);
                }
                else
                {
                    service.ShowUI(this.Component);
                }
            }
            this.OnSetComponentDefaults();
        }