Dim mc As WinForm.TextBox = e.Form.Controls("TextBox9")
Dim mcs As String = mc.text
For Each c As WinForm.Control In e.Form.Controls(""& mcs &"").children
e.Form.removeControl(c.name)
Next
DataTables("临时").DeleteFor("[批次] = '"& mcs &"'")
Dim bl As Double = 1220 / 345
Dim chang As WinForm.TextBox = e.Form.Controls("TextBox1")
Dim kuan As WinForm.TextBox = e.Form.Controls("TextBox2")
Dim hd As WinForm.TextBox = e.Form.Controls("TextBox3")
Dim sd As WinForm.TextBox = e.Form.Controls("TextBox4")
Dim sc As WinForm.TextBox = e.Form.Controls("TextBox6")
Dim hc As WinForm.TextBox = e.Form.Controls("TextBox7")
Dim jk As WinForm.TextBox = e.Form.Controls("TextBox8")
Dim cf As WinForm.ComboBox = e.Form.Controls("ComboBox2")
Dim zybb As WinForm.TextBox = e.Form.Controls("TextBox13")
Dim x As Integer = jk.text
If cf.text = "横裁" Then
Dim i As Integer
Dim y As Integer
Dim nr As String
Dim jw As WinForm.TextBox = e.Form.Controls("TextBox14")
Dim nr3 As String
For y = 1 To sd.text
For i = 1 To hd.text
Dim x1 As Double = chang.text / bl
Dim x2 As Double = kuan.text / bl
Dim wzx As Double = (x + (i - 1) * (kuan.text + x)) / bl
Dim wzy As Double = (x + (y - 1) * (chang.text + x)) / bl
Dim xy As Integer = (y - 1) * hd.text + i
Dim mcs1 As String = mcs & xy
Dim Panel1 As WinForm.Panel
Panel1 = e.Form.CreateControl(""& mcs1 &"", ControlTypeEnum.Panel)
Panel1.SetBounds(wzx, wzy, x2, x1)
e.Form.Controls(""& mcs &"").AddControl(Panel1)
e.Form.Controls(""& mcs1 &"").BackColor = Color.Orangered
Dim lbl As WinForm.Label
lbl = e.Form.CreateControl(""& mcs1 &"", ControlTypeEnum.Label)
Dim gg1 As String = chang.text & "*" & kuan.text
lbl.Text = gg1
lbl.Left = x2 / 2 - 30
lbl.Top = x1 / 2 - 15
e.Form.Controls(""& mcs1 &"").AddControl(lbl)
nr = "" & vbcrlf & "Dim rt"& mcs1 &" As New prt.RenderText" & vbcrlf & "Dim gg"& mcs1 &" As String = "" "& chang.text &"*"& kuan.text &" "" " & vbcrlf & " rt"& mcs1 &".Text = gg"& mcs1 &" "& vbcrlf &" rt"& mcs1 &".Width = "& kuan.text &" / 10" & vbcrlf & "rt"& mcs1 &".Height = "& chang.text &" / 10" & vbcrlf & "rt"& mcs1 &".Style.Borders.All = New prt.Linedef(0.5, Color.Red) " & vbcrlf & "rt"& mcs1 &".Style.TextAlignHorz = prt.AlignHorzEnum.Center" & vbcrlf & " rt"& mcs1 &".Style.TextAlignVert = prt.AlignVertEnum.Center" & vbcrlf & "rt"& mcs1 &".X = 0.4 + ("& i &" - 1) * ("& kuan.text &" + 4) / 10" & vbcrlf & "rt"& mcs1 &".y = 0.4 + ("& y &" - 1) * ("& chang.text &" + 4) / 10" & vbcrlf & "ra"& mcs &".Children.Add(rt"& mcs1 &")" & vbcrlf & ""
zybb.text = zybb.text & nr
Next
Dim sy As Double = hc.text - hd.text * kuan.text - (hd.text + 1) * x
Dim xsy As Double = (x + (hd.text * (kuan.text + x))) / bl
Dim ysy As Double = (x + (y - 1) * (chang.text + x)) / bl
Dim x3 As Single
Dim x4 As Single
x3 = sy / bl
x4 = chang.text / bl
Dim xy1 As Single = hd.text * sd.text + y
Dim mcs2 As String = mcs & xy1
Dim Panel2 As WinForm.Panel
Panel2 = e.Form.CreateControl(""& mcs2 &"", ControlTypeEnum.Panel)
Panel2.SetBounds(xsy, ysy, x3, x4)
e.Form.Controls(""& mcs &"").AddControl(Panel2)
e.Form.Controls(""& mcs2 &"").BackColor = Color.Orange
nr = "" & vbcrlf & "Dim ra"& mcs2 &" As New prt.RenderArea" & vbcrlf & "ra"& mcs2 &".Width = "& sy &" / 10" & vbcrlf & "ra"& mcs2 &".Height = "& chang.text &" / 10" & vbcrlf & "ra"& mcs2 &".X = "& hd.text &" * ("& kuan.text &" + "& x &") / 10" & vbcrlf & "ra"& mcs2 &".y = ("& y &" - 1) * ("& chang.text &" + "& x &") / 10" & vbcrlf & ""
zybb.text = zybb.text & nr
nr3 = ""& vbcrlf & "ra"& mcs &".Children.Add(ra"& mcs2 &")"
jw.text = jw.text & nr3
Next
Dim sy2 As Double = sc.text - sd.text * chang.text - (sd.text + 1) * x
Dim xsy2 As Double = x / bl
Dim ysy2 As Double = (x + sd.text * (chang.text + x)) / bl
Dim x5 As Single
Dim x6 As Single
x5 = hc.text / bl
x6 = sy2 / bl
Dim xy2 As Single = hd.text * sd.text + sd.text + 1
Dim mcs3 As String = mcs & xy2
Dim Panel3 As WinForm.Panel
Panel3 = e.Form.CreateControl(""& mcs3 &"", ControlTypeEnum.Panel)
Panel3.SetBounds(xsy2, ysy2, x5, x6)
e.Form.Controls(""& mcs &"").AddControl(Panel3)
e.Form.Controls(""& mcs3 &"").BackColor = Color.Orange
nr = "" & vbcrlf & "Dim ra"& mcs3 &" As New prt.RenderArea" & vbcrlf & "ra"& mcs3 &".Width = "& hc.text &" / 10" & vbcrlf & "ra"& mcs3 &".Height = "& sy2 &" / 10 " & vbcrlf & " ra"& mcs3 &".X = 0 " & vbcrlf & "ra"& mcs3 &".y = "& sd.text &" * ("& chang.text &" + "& x &") / 10" & vbcrlf & ""
zybb.text = zybb.text & nr
nr3 = ""& vbcrlf & "ra"& mcs &".Children.Add(ra"& mcs3 &")"
jw.text = jw.text & nr3
End If
会生成代码的主体部分