Example #1
0
 public AddStaticPartForm(string pageText)
 {
     InitializeComponent();
     PageText      = pageText;
     _htmlDesigner = new HTMLDesignControl(pageText);
     this.designerBox.Controls.Add(_htmlDesigner.GetMainToolStrip());
     this.designerBox.Controls.Add(_htmlDesigner.GetHtmlPanel());
     this._htmlDesigner.SetHtmlPanel().BringToFront();
     btnOK.Click += new EventHandler(btnOK_Click);
 }
Example #2
0
        protected override Control BuildMainControl(MainControlType type)
        {
            Control control = null;
            switch (type)
            {
                case MainControlType.BuildNumberControl:
                    {
                        control = new BuildNumberControl();
                        ((BuildNumberControl)control).PageName = AutoAttribute.PageName;
                        break;
                    }
                case MainControlType.ProjectPartControl:
                    {
                        control = new ProjectPartControl();
                        break;
                    }
                case MainControlType.ProductImage:
                    {
                        control = new ProductImage();
                        ((ProductImage)control).IsBigImageTag = AutoAttribute.IsBigImage;
                        break;
                    }
                case MainControlType.ProductProperty:
                    {
                        control = new ProductProperty();
                        break;
                    }
                case MainControlType.DepartmentNameControl:
                    {
                        control = new DepartmentNameControl();
                        break;
                    }
                case MainControlType.Department:
                    {
                        control = new Department();
                        break;
                    }
                case MainControlType.HTMLDesignControl:
                    {
                        HTMLDesignControl designControl = new HTMLDesignControl("");
                        designControl.Controls.Add(designControl.GetMainToolStrip());
                        designControl.Controls.Add(designControl.GetHtmlPanel());
                        designControl.SetHtmlPanel().BringToFront();
                        designControl.Size = new System.Drawing.Size(650, 150);
                        control = designControl;
                        break;
                    }
                case MainControlType.BiddingAgent:
                    {
                        control = new BiddingAgent(AutoAttribute.MainControlBindingFile);
                        break;
                    }
                default:
                    {
                        control = base.BuildMainControl(type);
                        break;
                    }
            }

            return control;
        }