Sub FillLevel (ID As Int )
Dim Table As Cursor
Table = Main.SQLDB.ExecQuery("Select * from DefBlindTableVal where defblindtable = " & ID )
ClearSVLevel
For i = 0 To Table.RowCount - 1
Table.Position=i
Dim PanelTMP As Panel
PanelTMP=LevelDesign(Table.GetInt2(0),PanellCount, Table)
svLevel.Panel.AddView(PanelTMP,0,(PanellCount-1)*PanellH ,svLevel.Width, PanellH)
PanellCount=PanellCount+1
Next
End Sub
Sub ClearSVLevel
Dim i As Int
For i = svLevel.Panel.NumberOfViews-1 To 0 Step -1
svLevel.Panel.RemoveViewAt(i)
Next
PanellCount=1
End Sub
Sub LevelDesign (IDPanel As Int, Order As Int, ActualRow As Cursor ) As Panel
Dim pnlLevelTMP As Panel
Dim lblOrder As Label
Dim LabelW As Int : LabelW = 30
Dim TextH, TextW As Int : TextW = 100 : TextH = 40
pnlLevelTMP.Initialize("pnlLevel")
pnlLevelTMP.Tag=IDPanel
lblOrder.Initialize("lblOrder")
pnlLevelTMP.AddView(lblOrder,5dip,5dip,LabelW,Main.BLabelH)
lblOrder.TextSize=Main.BLabelFS
lblOrder.Text=Order
txtSB.Initialize("txtSB")
pnlLevelTMP.AddView(txtSB,lblOrder.Left+lblOrder.Width+Main.ObjDist , _
lblOrder.Top, TextW, TextH)
txtSB.Gravity=Gravity.CENTER
txtSB.Tag=IDPanel
txtSB.InputType= txtSB.INPUT_TYPE_PHONE
If ActualRow.IsInitialized Then
txtSB.Text = ActualRow.GetString("SB")
End If
txtBB.Initialize("txtBB")
pnlLevelTMP.AddView(txtBB,txtSB.Left+txtSB.Width+2*Main.ObjDist , _
lblOrder.Top, TextW, TextH)
txtBB.Gravity=Gravity.CENTER
txtBB.Tag=IDPanel
txtBB.InputType= txtBB.INPUT_TYPE_PHONE
If ActualRow.IsInitialized Then
txtBB.Text = ActualRow.GetString("BB")
End If
txtAnte.Initialize("txtAnte")
pnlLevelTMP.AddView(txtAnte,txtBB.Left+txtBB.Width+2*Main.ObjDist , _
lblOrder.Top, TextW, TextH)
txtAnte.Gravity=Gravity.CENTER
txtAnte.Tag=IDPanel
txtAnte.InputType= txtAnte.INPUT_TYPE_PHONE
If ActualRow.IsInitialized Then
txtAnte.Text = ActualRow.GetString("Ante")
End If
txtTime.Initialize("txtTime")
pnlLevelTMP.AddView(txtTime,txtAnte.Left+txtAnte.Width+2*Main.ObjDist , _
lblOrder.Top, TextW, TextH)
txtTime.Gravity=Gravity.CENTER
txtTime.Tag=IDPanel
txtTime.InputType= txtTime.INPUT_TYPE_PHONE
If ActualRow.IsInitialized Then
txtTime.Text = ActualRow.GetString("Time")
End If
txtPause.Initialize("txtPause")
pnlLevelTMP.AddView(txtPause,txtTime.Left+txtTime.Width+2*Main.ObjDist , _
lblOrder.Top, TextW, TextH)
txtPause.Gravity=Gravity.CENTER
txtPause.Tag=IDPanel
txtPause.InputType= txtPause.INPUT_TYPE_PHONE
If ActualRow.IsInitialized Then
txtPause.Text = ActualRow.GetString("Pause")
Else
txtPause.Text = 0
End If
Return pnlLevelTMP
End Sub