/// <summary> /// 初始化时间选项 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Freg_Rule_Load(object sender, EventArgs e) { for (int i = 0; i < 12; i++) { time time = new time(); time.row(i, sel.getDFregid(rowDFreg.i).Tables[0].Rows[0][4].ToString()); time.Location = new Point(22, 21 * i + 10); time.Name = "time" + i; panel1.Controls.Add(time); } for (int i = 12; i < 24; i++) { time time = new time(); time.row(i, sel.getDFregid(rowDFreg.i).Tables[0].Rows[0][4].ToString()); time.Location = new Point(22, 21 * (i - 12) + 10); panel2.Controls.Add(time); } }
private void Time_Text_Load(object sender, EventArgs e) { for (int i = 0; i < 12; i++) { time time = new time(); time.row(i, addDFreg.j); time.Location = new Point(22, 21 * i + 10); time.Name = "time" + i; panel1.Controls.Add(time); } for (int i = 12; i < 24; i++) { time time = new time(); time.row(i, addDFreg.j); time.Location = new Point(22, 21 * (i - 12) + 10); panel2.Controls.Add(time); } }