Files
Mariana/B4A/C_Recordatorio.bas
Jose Alberto Guerra Ugalde 896ce0519f - VERSION 5.06.24
- Se Agregó un switch para activar/descativar la geocerca, solo se puede modficar dentro del almacen y requiere contraseña de supervisor de un solo uso.
- Se agregaron recordatorios de "Envío de venta", a las 10:30, 13:00 y 15:30 y por cada uno de esos horarios, 10, 5, 1 minutos antes.
2025-06-25 17:45:19 -06:00

84 lines
2.5 KiB
QBasic

B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=12.8
@EndOfDesignText@
Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
Dim panelSombra As Panel 'Panel de sombra.
Dim panelActual As Panel
Private Root2 As B4XView
Private b_Aceptar As Button
End Sub
'You can add more parameters here.
Public Sub Initialize (Root1 As B4XView) As Object
Root = Root1
Return Me
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
'load the layout to Root
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Sub agregaPanelRecordatorio (vRoot As B4XView) 'ignore
' vRoot.GetAllViewsRecursive
For Each v As B4XView In vRoot.GetAllViewsRecursive
' Log("Tag: " & v.Tag)
If v.Tag.As(String) = "panelSombra" Then
Log("--> " & v.tag)
v.RemoveViewFromParent
End If
Next
Try
Private su As StringUtils
panelSombra.Initialize("panelSombra")
panelSombra.Tag = "panelSombra"
Private cd As ColorDrawable
cd.Initialize(Colors.ARGB(125, 98, 98, 98), 0)
panelSombra.Background = cd
Private panelX As Panel 'Panel de la pregunta.
panelX.Initialize("pMsg")
panelActual = panelX
Private lbl As Label 'Etiqueta de la pregunta.
lbl.Initialize("")
Private cs As CSBuilder
cs.Initialize
lbl.Text = cs.bold.color(Colors.red).append("¡¡ATENCION!!").pop.pop.bold.Append(CRLF & CRLF & "Recuerda enviar tu venta.").PopAll
lbl.TextSize = 18
lbl.Gravity = Gravity.CENTER_HORIZONTAL
lbl.Left = (vRoot.Width / 2) - (lbl.Width/2)
lbl.TextColor = Colors.Black
cd.Initialize2(Colors.white, 20, 1, Colors.Gray) 'Borde y esquinas redondeadas del panel de la pregunta.
panelX.Background = cd
panelSombra.AddView(panelX, 100, 20%y, 80%x, 120dip)
panelX.Left = (vRoot.Width / 2) - (panelX.Width / 2)
vRoot.AddView(panelSombra, 0, 0, 100%x, 100%y) 'add the panel to the layout
panelX.AddView(lbl, 20dip, 20dip, (panelX.Width * 0.9), 40dip) 'Agregamos la etiqueta al panel.
lbl.Height = panelX.Height - 5
panelSombra.Width = vRoot.Width
panelSombra.Height = vRoot.Height
panelSombra.Elevation = 100
panelSombra.BringToFront
Catch
Log(LastException)
End Try
End Sub
'Oculta el panel de la pregunta.
Sub ocultPanelRecordatorio
If panelSombra.IsInitialized Then panelSombra.RemoveView
End Sub
Sub panelSombra_Click
If panelSombra.IsInitialized Then panelSombra.RemoveView
End Sub