}//工程设置确定 private void SelectNext(FormSetpara FormSetparaDig) { FormSetparaDig.Close(); FormCheckMain fcm = new FormCheckMain(m_hookHelper); fcm.Show(this); }
/// <summary> /// 加载工程设置界面 /// </summary> public void ShowSetpara() { FormSetpara FormSetparaDig = new FormSetpara(); ConnectDB db = new ConnectDB(); DataTable dt = db.GetDataBySql("select * from GISDATA_REGINFO"); DataRow[] dr = dt.Select("1=1"); for (int i = 0; i < dr.Length; i++) { Label lb = new Label(); lb.Location = new System.Drawing.Point(75, 70 + 60 * (i + 1) - 30); lb.Text = dr[i]["REG_ALIASNAME"].ToString() + ":"; lb.Name = "lable" + i.ToString(); lb.AutoSize = true; TextBox tx = new TextBox(); tx.Location = new System.Drawing.Point(75, 70 + 30 * 2 * (i + 1)); tx.Size = new System.Drawing.Size(400, 25); tx.Tag = dr[i]["ID"].ToString(); tx.Name = dr[i]["REG_ALIASNAME"].ToString(); string tablename = dr[i]["REG_NAME"].ToString(); Button bt = new Button(); bt.Location = new System.Drawing.Point(500, 70 + 30 * 2 * (i + 1)); bt.Text = "浏览"; bt.Name = dr[i]["REG_ALIASNAME"].ToString() + "Add"; bt.Click += (se, a) => addFile(tx, tablename); FormSetparaDig.Controls.Add(lb); FormSetparaDig.Controls.Add(tx); FormSetparaDig.Controls.Add(bt); } Button btok = new Button(); btok.Location = new System.Drawing.Point(410, 70 + 30 * 2 * (dr.Length + 1)); btok.Text = "确定"; btok.Click += (se, a) => SelectOk(FormSetparaDig); Button btok1 = new Button(); btok1.Location = new System.Drawing.Point(500, 70 + 30 * 2 * (dr.Length + 1)); btok1.Text = "下一步"; btok1.Click += (se, a) => SelectNext(FormSetparaDig); FormSetparaDig.Controls.Add(btok); FormSetparaDig.Controls.Add(btok1); FormSetparaDig.Show(this); }
//工程设置确定 private void SelectOk(FormSetpara FormSetparaDig) { FormSetparaDig.Close(); }//工程设置确定