private void FrmPubRemark_Load(object sender, EventArgs e) { var list = WeixinRobot.GetList(); int left = 20; int top = 25; foreach (var item in list) { CheckBox box = new CheckBox(); box.AutoSize = true; box.Text = item.Name; box.TabIndex = 2; box.Tag = item; box.Checked = true; box.Anchor = AnchorStyles.Left; box.Left = left; box.Top = top; left += box.Width + 25; gbxRobot.Controls.Add(box); } }
private void LoadRobot() { dvList.DataSource = WeixinRobot.GetList(); }