Example #1
0
 public override void Init(CarFormEx carform)
 {
     base.Init(carform);
     GroupBox box = new GroupBox {
         Text = "参数设置",
         Dock = DockStyle.Fill
     };
     carform.pnlContainer.Controls.Add(box);
     TableLayoutPanel tb = new TableLayoutPanel {
         Dock = DockStyle.Fill,
         RowCount = 1,
         ColumnCount = 2
     };
     tb.RowStyles.Clear();
     tb.ColumnStyles.Clear();
     tb.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single;
     for (int i = 0; i < 1; i++)
     {
         RowStyle rowStyle = new RowStyle {
             Height = 25f,
             SizeType = SizeType.Absolute
         };
         ColumnStyle columnStyle = new ColumnStyle {
             Width = 113f,
             SizeType = SizeType.Absolute
         };
         tb.RowStyles.Add(rowStyle);
         tb.ColumnStyles.Add(columnStyle);
     }
     Label con = new Label {
         Text = "通道类型:",
         TextAlign = ContentAlignment.MiddleRight,
         Dock = DockStyle.Fill
     };
     this.SetControl(tb, con, 0, 0);
     StarNetTextBox box2 = new StarNetTextBox {
         Name = "txtip",
         MaxLength = 100,
         Width = 160,
         Dock = DockStyle.Left,
         DestinationMarshalByRefObject = this.cmd,
         PropertyName = "RepeatTimes",
         PropertyType = System.Type.GetType("System.Int32")
     };
     this.SetControl(tb, box2, 0, 1);
     box.Controls.Add(tb);
 }