public void DoDesignerLayout(pF.pDesigner.IpDesigner designer, EbControl serialized_ctrl)
 {
     this.EbControl = serialized_ctrl;
     this.Name      = serialized_ctrl.Name;
     this.Dock      = System.Windows.Forms.DockStyle.Fill;
     this.Text      = serialized_ctrl.Label;
 }
Ejemplo n.º 2
0
 public void DoDesignerLayout(pF.pDesigner.IpDesigner designer, EbControlContainer serialized_ctrl)
 {
     ((designer.ActiveDesignSurface as IDesignSurfaceExt).RootComponent as EbReportPanel).EbControlContainer = serialized_ctrl;
     foreach (EbControl c in serialized_ctrl.Controls)
     {
         var ctrl = designer.ActiveDesignSurface.CreateControl(Type.GetType(c.TargetType)) as System.Windows.Forms.Control;
         (ctrl as IEbControl).DoDesignerLayout(designer, c);
     }
 }
        public void DoDesignerLayout(pF.pDesigner.IpDesigner designer, EbControl serialized_ctrl)
        {
            this.EbControl = serialized_ctrl;
            this.Name      = serialized_ctrl.Name;
            this.Text      = serialized_ctrl.Label;

            if (this.EbControl.CellPositionColumn > 0 && this.EbControl.CellPositionRow > 0)
            {
                this.Dock = DockStyle.Fill;
            }
            else
            {
                this.Location = new System.Drawing.Point(this.EbControl.Left, this.EbControl.Top);
                this.Size     = new System.Drawing.Size(this.EbControl.Width, this.EbControl.Height);
            }
        }
        public void DoDesignerLayout(pF.pDesigner.IpDesigner designer, EbControl serialized_ctrl)
        {
            this.EbControl = serialized_ctrl;
            this.Name      = serialized_ctrl.Name;
            this.Dock      = DockStyle.Fill;
            this.Text      = serialized_ctrl.Label;

            //foreach (EbDataGridViewColumn col in (serialized_ctrl as EbDataGridView).Columns)
            //{
            //    this.Columns.Add(new DataGridViewTextBoxColumn
            //    {
            //        Name = col.Name,
            //        HeaderText = col.Label,
            //        Width = col.Width
            //    });
            //}
        }
Ejemplo n.º 5
0
        public void DoDesignerLayout(pF.pDesigner.IpDesigner designer, EbControlContainer serialized_ctrl)
        {
            this.EbControlContainer = serialized_ctrl;
            this.Name = serialized_ctrl.Name;
            this.Dock = System.Windows.Forms.DockStyle.Fill;

            this.SuspendLayout();
            this.ColumnCount = 0;
            this.RowCount    = 0;
            this.ColumnStyles.Clear();
            this.RowStyles.Clear();

            foreach (EbTableLayoutColumn c in (serialized_ctrl as EbTableLayout).Columns)
            {
                this.ColumnStyles.Add(new ColumnStyle {
                    SizeType = SizeType.Percent, Width = c.Width
                });
            }

            foreach (EbTableRow r in (serialized_ctrl as EbTableLayout).Rows)
            {
                this.RowStyles.Add(new RowStyle {
                    SizeType = SizeType.Percent, Height = r.Height
                });
            }

            this.ColumnCount = (serialized_ctrl as EbTableLayout).Columns.Count;
            this.RowCount    = (serialized_ctrl as EbTableLayout).Rows.Count;

            if (serialized_ctrl.Controls != null)
            {
                foreach (EbControl c in serialized_ctrl.Controls)
                {
                    var ctrl = designer.ActiveDesignSurface.CreateControl(Type.GetType(c.TargetType)) as System.Windows.Forms.Control;
                    ctrl.Parent = this;
                    this.SetCellPosition(ctrl, new TableLayoutPanelCellPosition(c.CellPositionColumn, c.CellPositionRow));
                    (ctrl as IEbControl).DoDesignerLayout(designer, c);
                }
            }

            this.ResumeLayout(true);
        }
 public void DoDesignerLayout(pF.pDesigner.IpDesigner designer, EbControl serialized_ctrl)
 {
     this.EbControl        = serialized_ctrl;
     this.EbControl.Parent = this;
     this.DoDesignerRefresh();
 }
        //[ProtoBuf.ProtoMember(1)]
        //[Browsable(false)]
        //public IEbControl[] Controls2
        //{
        //    get
        //    {
        //        IEbControl[] ca = new IEbControl[this.Controls.Count];
        //        this.Controls.CopyTo(ca, 0);
        //        return ca;
        //    }
        //    set
        //    {
        //        foreach (IEbControl c in value)
        //            this.Controls.Add((Control)c);
        //    }
        //}

        public void DoDesignerLayout(pF.pDesigner.IpDesigner designer, EbObject serialized_ctrl)
        {
            //var ctrl = designer.ActiveDesignSurface.CreateControl(this.GetType(), this.Size, this.Location) as System.Windows.Forms.Control;
            //ctrl.Name = this.Name;
        }