Skip to content

Commit

Permalink
- Solucionados problemas de descarga de pictogramas desde la web de A…
Browse files Browse the repository at this point in the history
…RASAAC.

- Corregido el tamaño del texto en determinadas configuraciones de pantalla.
  • Loading branch information
Prieto Martinez committed Dec 2, 2019
0 parents commit 9c4b989
Show file tree
Hide file tree
Showing 179 changed files with 12,329 additions and 0 deletions.
105 changes: 105 additions & 0 deletions AcercaDe.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Activity
Version=7.8
@EndOfDesignText@
' Proyecto desarrollado por Javier Prieto Martínez como parte del TFG del Curso de Adaptación al Grado de Informática de la Universidad Internacional de la Rioja
' Este código fuente se ofrece con una licencia Creative Commons de tipo Reconocimiento-NoComercial-CompartirIgual 3.0 España (CC BY-NC-SA 3.0 ES)

#Region Activity Attributes
#FullScreen: True
#IncludeTitle: False
#End Region

Sub Process_Globals
End Sub

Sub Globals
Private Volver As Button
Private Logotipo As ImageView
Private Pictogramas As ImageView
Private Pictorario As Label
Private Programador As ImageView
Private TextoArasaac As Label
Private TextoAutor As Label
Private ParaTeo As Label
Private VersionApp As Label
Private VerVideo As Button
Private PulsaLosIconos As Label
End Sub

Sub Activity_Create(FirstTime As Boolean)
Dim cs1,cs2 As CSBuilder

Activity.LoadLayout("AcercaDe")

TextoAutor.Text=cs1.Initialize.Bold.Append("Aplicación: ").Pop.Append("Javier Prieto Martínez (www.ganso.org)").Append(CRLF).Bold.Append("Licencia: ").Pop.Append("CC (BY-NC-SA)")
TextoArasaac.Text=cs2.Initialize.Bold.Append("Pictogramas: ").Pop.Append("Sergio Palao").Append(CRLF).Bold.Append("Procedencia: ").Pop.Append("ARASAAC (www.arasaac.org)").Append(CRLF).Bold.Append("Licencia: ").Pop.Append("CC (BY-NC-SA)").Append(CRLF).Bold.Append("Propiedad: ").Pop.Append("Gobierno de Aragón")

'Ajusta cada caja a su altura
Dim SU As StringUtils
Do While SU.MeasureMultilineTextHeight(Pictorario,Pictorario.Text)>Pictorario.Height
Pictorario.TextSize=Pictorario.TextSize-1
Loop
Do While SU.MeasureMultilineTextHeight(TextoAutor,TextoAutor.Text)>TextoAutor.Height
TextoAutor.TextSize=TextoAutor.TextSize-1
Loop
Do While SU.MeasureMultilineTextHeight(TextoArasaac,TextoArasaac.Text)>TextoArasaac.Height
TextoArasaac.TextSize=TextoArasaac.TextSize-1
Loop
Do While SU.MeasureMultilineTextHeight(PulsaLosIconos,PulsaLosIconos.Text)>PulsaLosIconos.Height
PulsaLosIconos.TextSize=PulsaLosIconos.TextSize-1
Loop

' Dim GreatVives As Typeface
' GreatVives=Typeface.LoadFromAssets("GreatVibes-Regular.ttf")
' ParaTeo.Typeface=GreatVives

VersionApp.Text=Application.VersionName

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Sub Volver_Click
Activity.Finish
End Sub

Sub Programador_Click
Dim p As PhoneIntents
StartActivity(p.OpenBrowser("http://www.ganso.org"))
End Sub

Sub Pictogramas_Click
Dim p As PhoneIntents
StartActivity(p.OpenBrowser("http://www.arasaac.org"))
End Sub

Sub Logotipo_Click
Dim p As PhoneIntents
StartActivity(p.OpenBrowser("http://blog.ganso.org/proyectos/pictorario"))
End Sub

Sub VerVideo_Click
Dim p As PhoneIntents
'StartActivity(p.OpenBrowser("https://www.youtube.com/watch?v=cjTAGguz5H0"))
StartActivity(p.OpenBrowser("http://Bit.ly/VideoPictorario"))
End Sub

Sub VersionApp_Click
Msgbox2("Novedades de la versión:"&CRLF&CRLF&Starter.CambiosVersion,"Versión "&Application.VersionName,"Continuar","","",Null)
End Sub

Sub Activity_KeyPress (KeyCode As Int)
If KeyCode = KeyCodes.KEYCODE_BACK Then 'Al pulsar atrás...
Sleep(0) 'No hace nada
End If
End Sub
32 changes: 32 additions & 0 deletions ArranqueAutomatico.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Service
Version=8.5
@EndOfDesignText@
' Proyecto desarrollado por Javier Prieto Martínez como parte del TFG del Curso de Adaptación al Grado de Informática de la Universidad Internacional de la Rioja
' Este código fuente se ofrece con una licencia Creative Commons de tipo Reconocimiento-NoComercial-CompartirIgual 3.0 España (CC BY-NC-SA 3.0 ES)

#Region Service Attributes
#StartAtBoot: True
#StartCommandReturnValue: android.app.Service.START_STICKY
#End Region

Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.

End Sub

Sub Service_Create

End Sub

Sub Service_Start (StartingIntent As Intent)
CallSub(Starter,"Cargar_Configuracion")
Service.StopAutomaticForeground 'Call this when the background task completes (if there is one)
End Sub

Sub Service_Destroy

End Sub
Binary file added AutoBackups/Backup 2019-03-18 13.34.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
36 changes: 36 additions & 0 deletions Avisos.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Service
Version=8.5
@EndOfDesignText@
' Proyecto desarrollado por Javier Prieto Martínez como parte del TFG del Curso de Adaptación al Grado de Informática de la Universidad Internacional de la Rioja
' Este código fuente se ofrece con una licencia Creative Commons de tipo Reconocimiento-NoComercial-CompartirIgual 3.0 España (CC BY-NC-SA 3.0 ES)

#Region Service Attributes
#StartAtBoot: False
#StartCommandReturnValue: android.app.Service.START_STICKY
#End Region

Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.

End Sub

Sub Service_Create
Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS
End Sub

Sub Service_Start (StartingIntent As Intent)
'Log( DateTime.Time(DateTime.Now) & ": Llamada al servicio Avisos")
Starter.SecuenciaActiva=Starter.ProximaAlarmaSeq
StartActivity("Visualizacion")
CallSubDelayed(Visualizacion,"AvisoActividad")
Service.StopAutomaticForeground 'Call this when the background task completes (if there is one)
'Log( DateTime.Time(DateTime.Now) & ": Fin del servicio Avisos")
End Sub

Sub Service_Destroy

End Sub
216 changes: 216 additions & 0 deletions Configuracion.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Activity
Version=8.5
@EndOfDesignText@
#Region Activity Attributes
#FullScreen: True
#IncludeTitle: False
#End Region

Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.

End Sub

Sub Globals
Private ActivarAlarmasCheck As CheckBox
Private ActivarAlarmasIcono As Label
Private ActivarAlarmasLabel As Label
Private ProtegerVisualizacionCheck As CheckBox
Private ProtegerVisualizacionIcono As Label
Private ProtegerVisualizacionLabel As Label
Private Titulo As Label
Private FormatoHorasButton As Button
Private FormatoHorasLabel As Label
Private ColoresRelojLabel As Label
Private BotonHoras As Button
Private BotonMinutos As Button
Private BotonSegundos As Button
Private BotonReiniciar As Button
Private BotonVolver As Button
Private PanelScroll As ScrollView
End Sub

Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Configuracion")

Dim Separador=10dip,Altura=80dip As Int

ActivarAlarmasCheck.Initialize("ActivarAlarmasCheck")
ActivarAlarmasIcono.Initialize("ActivarAlarmasIcono")
ActivarAlarmasLabel.Initialize("ActivarAlarmasLabel")
ProtegerVisualizacionCheck.Initialize("ProtegerVisualizacionCheck")
ProtegerVisualizacionIcono.Initialize("ProtegerVisualizacionIcono")
ProtegerVisualizacionLabel.Initialize("ProtegerVisualizacionLabel")
FormatoHorasButton.Initialize("FormatoHorasButton")
FormatoHorasLabel.Initialize("FormatoHorasLabel")
ColoresRelojLabel.Initialize("ColoresRelojLabel")
BotonHoras.Initialize("BotonHoras")
BotonMinutos.Initialize("BotonMinutos")
BotonSegundos.Initialize("BotonSegundos")
BotonReiniciar.Initialize("BotonReiniciar")
BotonVolver.Initialize("BotonVolver")

ActivarAlarmasLabel.Text="Activar alarmas"
ActivarAlarmasLabel.TextSize=16
ActivarAlarmasLabel.Gravity=Gravity.CENTER_VERTICAL

ProtegerVisualizacionLabel.Text="Proteger aplicación"
ProtegerVisualizacionLabel.TextSize=16
ProtegerVisualizacionLabel.Gravity=Gravity.CENTER_VERTICAL

FormatoHorasLabel.Text="Formato horario"
FormatoHorasLabel.TextSize=16
FormatoHorasLabel.Gravity=Gravity.CENTER_VERTICAL

ActivarAlarmasCheck.Checked=Starter.AlarmasActivadas
ActivarAlarmasCheck.Gravity=Gravity.CENTER

ProtegerVisualizacionCheck.Checked=Starter.AplicacionProtegida
ProtegerVisualizacionCheck.Gravity=Gravity.CENTER

ColoresRelojLabel.Text="Colores del reloj (horario, minutero y segundero)"
ColoresRelojLabel.TextSize=16
ColoresRelojLabel.Gravity=Gravity.CENTER_VERTICAL

BotonHoras.Color=Starter.ColorHoras
BotonMinutos.Color=Starter.ColorMinutos
BotonSegundos.Color=Starter.ColorSegundos

If Starter.Formato24h==True Then
FormatoHorasButton.Text="24 horas"
Else
FormatoHorasButton.Text="12 horas"
End If
FormatoHorasButton.TextSize=20
FormatoHorasButton.Gravity=Gravity.CENTER

BotonReiniciar.Text="Reiniciar configuración"
BotonReiniciar.TextSize=20
BotonReiniciar.Gravity=Gravity.CENTER

BotonVolver.Text="Volver a la portada"
BotonVolver.TextSize=20
BotonVolver.Gravity=Gravity.CENTER

ActivarAlarmasIcono.SetBackgroundImage(LoadBitmap(File.DirAssets,"alarma.png"))
ProtegerVisualizacionIcono.SetBackgroundImage(LoadBitmap(File.DirAssets,"llave.png"))

PanelScroll.Panel.AddView(ActivarAlarmasLabel,10dip,0,100%X-2*Altura-4*Separador,Altura)
PanelScroll.Panel.AddView(ActivarAlarmasIcono,ActivarAlarmasLabel.Left+ActivarAlarmasLabel.Width+Separador,ActivarAlarmasLabel.Top,Altura,Altura)
PanelScroll.Panel.AddView(ActivarAlarmasCheck,ActivarAlarmasIcono.Left+ActivarAlarmasIcono.Width+Separador,ActivarAlarmasIcono.Top,Altura,Altura)

PanelScroll.Panel.AddView(ProtegerVisualizacionLabel,ActivarAlarmasLabel.Left,ActivarAlarmasLabel.Top+ActivarAlarmasLabel.Height+Separador,ActivarAlarmasLabel.Width,ActivarAlarmasLabel.Height)
PanelScroll.Panel.AddView(ProtegerVisualizacionIcono,ProtegerVisualizacionLabel.Left+ProtegerVisualizacionLabel.Width+Separador,ProtegerVisualizacionLabel.Top,Altura,Altura)
PanelScroll.Panel.AddView(ProtegerVisualizacionCheck,ProtegerVisualizacionIcono.Left+ProtegerVisualizacionIcono.Width+Separador,ProtegerVisualizacionLabel.Top,Altura,ProtegerVisualizacionLabel.Height)

PanelScroll.Panel.AddView(FormatoHorasLabel,ProtegerVisualizacionLabel.Left,ProtegerVisualizacionLabel.Top+ProtegerVisualizacionLabel.Height+Separador,ProtegerVisualizacionLabel.Width,ProtegerVisualizacionLabel.Height)
PanelScroll.Panel.AddView(FormatoHorasButton,ProtegerVisualizacionIcono.Left,FormatoHorasLabel.Top,100%X-ProtegerVisualizacionIcono.Left-Separador,FormatoHorasLabel.Height)

PanelScroll.Panel.AddView(ColoresRelojLabel,FormatoHorasLabel.Left,FormatoHorasLabel.Top+FormatoHorasLabel.Height+Separador,FormatoHorasLabel.Width,FormatoHorasLabel.Height)

Dim TamBotonesColores=(100%X-ColoresRelojLabel.Left-ColoresRelojLabel.Width-4*Separador)/3 As Int
PanelScroll.Panel.AddView(BotonHoras,ColoresRelojLabel.Left+ColoresRelojLabel.Width+Separador,ColoresRelojLabel.Top,TamBotonesColores,TamBotonesColores)
PanelScroll.Panel.AddView(BotonMinutos,BotonHoras.Left+BotonHoras.Width+Separador,ColoresRelojLabel.Top,TamBotonesColores,TamBotonesColores)
PanelScroll.Panel.AddView(BotonSegundos,BotonMinutos.Left+BotonMinutos.Width+Separador,ColoresRelojLabel.Top,TamBotonesColores,TamBotonesColores)

PanelScroll.Panel.AddView(BotonReiniciar,Separador,ColoresRelojLabel.Top+ColoresRelojLabel.Height+Separador,100%X-2*Separador,Altura)

PanelScroll.Panel.AddView(BotonVolver,Separador,BotonReiniciar.Top+BotonReiniciar.Height+Separador,100%X-2*Separador,Altura)

PanelScroll.Panel.Height=BotonVolver.Top+BotonVolver.Height+Separador

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub Activity_KeyPress (KeyCode As Int)
If KeyCode = KeyCodes.KEYCODE_BACK Then 'Al pulsar atrás...
Sleep(0) 'No hace nada
End If
End Sub

Sub ProtegerVisualizacionCheck_CheckedChange(Checked As Boolean)
Starter.AplicacionProtegida=ProtegerVisualizacionCheck.Checked
If Starter.AplicacionProtegida==True Then
Msgbox2("Para liberar la protección, hacer:"&CRLF&CRLF&"UNA PULSACIÓN CORTA"&CRLF&" seguida de"&CRLF&"UNA PULSACIÓN LARGA"&CRLF&CRLF&"Sobre el icono del candado del resto de pantallas.","IMPORTANTE:"&CRLF&"Aplicación protegida","Aceptar","","",LoadBitmap(File.DirAssets,"candado.png"))
End If
CallSub(Starter,"Guardar_Configuracion")
End Sub

Sub BotonHoras_Click
Dim DialogoColor As ColorPickerDialog
Dim Resultado As Int

DialogoColor.RGB=Starter.ColorHoras
Resultado=DialogoColor.Show("Color del horario","Seleccionar","Cancelar","", Null)
If Resultado=DialogResponse.POSITIVE Then
Starter.ColorHoras=DialogoColor.RGB
BotonHoras.Color=DialogoColor.RGB
CallSub(Starter,"Guardar_Configuracion")
End If
End Sub

Sub BotonMinutos_Click
Dim DialogoColor As ColorPickerDialog
Dim Resultado As Int

DialogoColor.RGB=Starter.ColorMinutos
Resultado=DialogoColor.Show("Color del minutero","Seleccionar","Cancelar","", Null)
If Resultado=DialogResponse.POSITIVE Then
Starter.ColorMinutos=DialogoColor.RGB
BotonMinutos.Color=DialogoColor.RGB
CallSub(Starter,"Guardar_Configuracion")
End If
End Sub

Sub BotonSegundos_Click
Dim DialogoColor As ColorPickerDialog
Dim Resultado As Int

DialogoColor.RGB=Starter.ColorSegundos
Resultado=DialogoColor.Show("Color del segundero","Seleccionar","Cancelar","", Null)
If Resultado=DialogResponse.POSITIVE Then
Starter.ColorSegundos=DialogoColor.RGB
BotonSegundos.Color=DialogoColor.RGB
CallSub(Starter,"Guardar_Configuracion")
End If
End Sub

Sub BotonVolver_Click
Activity.Finish
End Sub

Sub ActivarAlarmasCheck_CheckedChange(Checked As Boolean)
Starter.AlarmasActivadas=ActivarAlarmasCheck.Checked
CallSub(Starter,"Guardar_Configuracion")
End Sub

Sub FormatoHorasButton_Click
Starter.Formato24h=Not(Starter.Formato24h)
If Starter.Formato24h==True Then
FormatoHorasButton.Text="24 horas"
Else
FormatoHorasButton.Text="12 horas"
End If
CallSub(Starter,"Guardar_Configuracion")
End Sub

Sub BotonReiniciar_Click
If Msgbox2("Se borrarán todas las secuencias creadas y se dejará solo la de ejemplo, y se reiniciará toda la configuración."&CRLF&CRLF& _
"¿Está seguro de que desea hacer esto?","Borrar toda la configuración","Sí","","No",Null)==DialogResponse.POSITIVE Then
CallSub(Starter,"Inicializar_Con_Ejemplo")
CallSub(Starter,"BorrarPictogramas")
CallSub(Starter,"Guardar_Configuracion")
Activity.Finish
End If
End Sub
Loading

0 comments on commit 9c4b989

Please sign in to comment.