Ejemplo n.º 1
0
            public Record(Attr_C attr)
            {
                // label_1
                this.value1.Dock      = System.Windows.Forms.DockStyle.Fill;
                this.value1.Name      = attr.value1_Text;
                this.value1.Text      = attr.value1_Text;
                this.value1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

                //label_2
                this.value2.Dock      = System.Windows.Forms.DockStyle.Fill;
                this.value2.Name      = attr.value2_Text;
                this.value2.Text      = attr.value2_Text;
                this.value2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;


                this.vContainer.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Inset;
                //储存列的数量,没有实际意义
                this.vContainer.ColumnCount = 2;
                //储存行的数量,没有实际意义
                this.vContainer.RowCount = 1;
                //添加行
                this.vContainer.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
                //添加列
                this.vContainer.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, attr.value1_Percent));
                this.vContainer.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, attr.value2_Percent));
                //添加组件到列 (列,行)
                this.vContainer.Controls.Add(this.value1, 0, 0);
                this.vContainer.Controls.Add(this.value2, 1, 0);
                //控件信息
                this.vContainer.Margin = new System.Windows.Forms.Padding(0);
                this.vContainer.Name   = "单条记录";

                this.vContainer.Size = new System.Drawing.Size(attr.width, attr.height);                  //大小
            }
Ejemplo n.º 2
0
 public New_Window(Attr_C attr)
 {
     this.AutoSize      = attr.autoSize;
     this.Font          = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.components    = new System.ComponentModel.Container();
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize    = new System.Drawing.Size(attr.width, attr.height);           //窗口大小
     this.Name          = attr.Name;
     this.Text          = attr.Text;
     this.StartPosition = attr.StartPosition;
 }
Ejemplo n.º 3
0
 public Controls_FlpList(Attr_C attr)
 {
     this.Selected_Index         = 0;
     this.attr                   = attr;
     this.Flp_list.Dock          = attr.dock;          //指定的位置和控件停靠的方式。
     this.Flp_list.AutoSize      = attr.autoSize;      //自动适应子元素最大宽度
     this.Flp_list.FlowDirection = attr.flowDirection; //控件排序方向
     this.Flp_list.Location      = new System.Drawing.Point(attr.location_X, attr.location_X);
     this.Flp_list.Margin        = new System.Windows.Forms.Padding(0);
     this.Flp_list.Name          = "FlowLayoutPanel 列表";
     this.Flp_list.Size          = new System.Drawing.Size(attr.width, attr.height);
 }