Implement Overtime Guard workflow and localization

This commit is contained in:
2026-06-16 18:51:42 +02:00
parent 9142b3695e
commit 501ea4f661
34 changed files with 4821 additions and 2444 deletions

8
.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
build-b4a.log
install-b4a.log
run-b4a.log
emulator-*.png
Objects/b4a_orologio_marcatempo.apk
Objects/bin/temp.ap_
Objects/classes.dex
Objects/d8_arguments.txt

View File

@@ -12,7 +12,7 @@ Sub Class_Globals
Private clockDiameter As Float ' Diametro dell'orologio (in pixel) Private clockDiameter As Float ' Diametro dell'orologio (in pixel)
Private centerX As Float ' Coordinata X del centro dell'orologio Private centerX As Float ' Coordinata X del centro dell'orologio
Private centerY As Float ' Coordinata Y del centro dell'orologio Private centerY As Float ' Coordinata Y del centro dell'orologio
Private intervals As List ' Lista degli intervalli da disegnare Private segments As List ' Segmenti cronologici registrati
' Parametri di spessore ' Parametri di spessore
Private quadrantStrokeWidth As Float = 5dip Private quadrantStrokeWidth As Float = 5dip
@@ -21,40 +21,64 @@ Sub Class_Globals
Private intervalArcStrokeWidth As Float = 5dip Private intervalArcStrokeWidth As Float = 5dip
Private hourHandStrokeWidth As Float = 8dip Private hourHandStrokeWidth As Float = 8dip
Private minuteHandStrokeWidth As Float = 5dip Private minuteHandStrokeWidth As Float = 5dip
Private intervals As List Private baseDurationMs As Long
Private activeDurationMs As Long
Private activeColor As Int
Private activeIsPause As Boolean
Private hasActiveSegment As Boolean
End Sub End Sub
' Inizializza l'orologio ' Inizializza l'orologio
Public Sub Initialize(ParentPanel As Panel, PercentageOfWidth As Float) Public Sub Initialize(ParentPanel As Panel, PercentageOfWidth As Float)
pnlClock = ParentPanel pnlClock = ParentPanel
cvsClock.Initialize(pnlClock) cvsClock.Initialize(pnlClock)
intervals.Initialize segments.Initialize
Dim interval As Map baseDurationMs = 12 * DateTime.TicksPerHour
interval.Initialize
interval.Put("startHour", 8)
interval.Put("startMinute", 0)
interval.Put("endHour", 12)
interval.Put("endMinute", 0)
interval.Put("color", Colors.Magenta)
interval.Put("radius",(clockDiameter/2 +25dip))
interval.Put("strokeWidth", 5dip)
interval.Put("period", "mattino")
intervals.Add(interval)
interval.Initialize
interval.Put("startHour", 13)
interval.Put("startMinute", 0)
interval.Put("endHour", 17)
interval.Put("endMinute", 0)
interval.Put("color", Colors.Green)
interval.Put("radius", (clockDiameter/2 )+25dip)
interval.Put("strokeWidth", 5dip)
interval.Put("period", "pomeriggio")
intervals.Add(interval)
SetClockSize(PercentageOfWidth) SetClockSize(PercentageOfWidth)
End Sub End Sub
' Imposta la durata piena del quadrante. Le pause gialle vengono aggiunte a parte.
Public Sub SetBaseDuration(DurationMs As Long)
baseDurationMs = DurationMs
DrawClock
End Sub
' Rimuove tutti i segmenti registrati.
Public Sub ClearSegments
If segments.IsInitialized = False Then segments.Initialize
segments.Clear
hasActiveSegment = False
activeDurationMs = 0
DrawClock
End Sub
' Aggiunge un segmento concluso.
Public Sub AddSegment(DurationMs As Long, SegmentColor As Int, IsPause As Boolean)
If DurationMs <= 0 Then Return
Dim segment As Map
segment.Initialize
segment.Put("duration", DurationMs)
segment.Put("color", SegmentColor)
segment.Put("pause", IsPause)
segments.Add(segment)
DrawClock
End Sub
' Imposta il segmento in corso, non ancora concluso.
Public Sub SetActiveSegment(DurationMs As Long, SegmentColor As Int, IsPause As Boolean)
activeDurationMs = Max(0, DurationMs)
activeColor = SegmentColor
activeIsPause = IsPause
hasActiveSegment = activeDurationMs > 0
DrawClock
End Sub
Public Sub ClearActiveSegment
hasActiveSegment = False
activeDurationMs = 0
DrawClock
End Sub
' Imposta la dimensione dell'orologio come percentuale della larghezza del pannello ' Imposta la dimensione dell'orologio come percentuale della larghezza del pannello
Public Sub SetClockSize(PercentageOfWidth As Float) Public Sub SetClockSize(PercentageOfWidth As Float)
clockDiameter = pnlClock.Width * PercentageOfWidth / 100 clockDiameter = pnlClock.Width * PercentageOfWidth / 100
@@ -90,14 +114,12 @@ Public Sub DrawClock
' Disegna il cerchio esterno ' Disegna il cerchio esterno
cvsClock.DrawCircle(centerX, centerY, clockDiameter / 2, Colors.Black, False, quadrantStrokeWidth) cvsClock.DrawCircle(centerX, centerY, clockDiameter / 2, Colors.Black, False, quadrantStrokeWidth)
' Disegna i segmenti di lavoro / pausa / straordinario
DrawSegments
' Disegna le tacche delle ore e dei minuti ' Disegna le tacche delle ore e dei minuti
DrawTicks DrawTicks
' Disegna gli intervalli
For Each interval As Map In intervals
DrawInterval(interval.Get("startHour"), interval.Get("startMinute"), interval.Get("endHour"), interval.Get("endMinute"), interval.Get("color"), interval.Get("radius"), interval.Get("strokeWidth"))
Next
' Disegna le lancette ' Disegna le lancette
Dim now As Long = DateTime.Now Dim now As Long = DateTime.Now
Dim Hours As Int = DateTime.GetHour(now) Mod 12 Dim Hours As Int = DateTime.GetHour(now) Mod 12
@@ -120,6 +142,51 @@ Public Sub DrawClock
pnlClock.Invalidate pnlClock.Invalidate
End Sub End Sub
Private Sub DrawSegments
If segments.IsInitialized = False Then Return
Dim totalPauseMs As Long = 0
Dim totalRecordedMs As Long = 0
For Each segment As Map In segments
Dim duration As Long = segment.Get("duration")
totalRecordedMs = totalRecordedMs + duration
If segment.Get("pause") = True Then totalPauseMs = totalPauseMs + duration
Next
If hasActiveSegment Then
totalRecordedMs = totalRecordedMs + activeDurationMs
If activeIsPause Then totalPauseMs = totalPauseMs + activeDurationMs
End If
Dim totalDisplayMs As Long = Max(baseDurationMs, totalRecordedMs)
If totalDisplayMs <= 0 Then Return
Dim startAngle As Float = -90
Dim radius As Float = clockDiameter / 2 - 22dip
For Each segment As Map In segments
Dim sweepAngle As Float = 360 * segment.Get("duration") / totalDisplayMs
DrawPieSegment(startAngle, sweepAngle, segment.Get("color"), radius)
startAngle = startAngle + sweepAngle
Next
If hasActiveSegment Then
Dim activeSweepAngle As Float = 360 * activeDurationMs / totalDisplayMs
DrawPieSegment(startAngle, activeSweepAngle, activeColor, radius)
End If
End Sub
Private Sub DrawPieSegment(startAngle As Float, sweepAngle As Float, color As Int, radius As Float)
If sweepAngle <= 0 Then Return
Dim steps As Int = Max(2, Ceil(sweepAngle / 4))
Dim path As B4XPath
path.Initialize(centerX, centerY)
For i = 0 To steps
Dim angle As Float = startAngle + sweepAngle * i / steps
Dim x As Float = centerX + radius * CosD(angle)
Dim y As Float = centerY + radius * SinD(angle)
path.LineTo(x, y)
Next
path.LineTo(centerX, centerY)
cvsClock.DrawPath(path, color, True, 0)
End Sub
' Disegna una singola lancetta ' Disegna una singola lancetta
Private Sub DrawHand(x As Float, y As Float, length As Float, angle As Float, width As Float, color As Int) Private Sub DrawHand(x As Float, y As Float, length As Float, angle As Float, width As Float, color As Int)
Dim endX As Float = x + length * CosD(angle) Dim endX As Float = x + length * CosD(angle)
@@ -152,43 +219,6 @@ Private Sub DrawTicks
Next Next
End Sub End Sub
' Aggiunge un intervallo da disegnare
Public Sub AddInterval(startHour As Int, startMinute As Int, endHour As Int, endMinute As Int, tipo As String)
Dim interval As Map
interval.Initialize
interval.Put("startHour", startHour)
interval.Put("startMinute", startMinute)
interval.Put("endHour", endHour)
interval.Put("endMinute", endMinute)
Select tipo.ToLowerCase
Case "mattino"
interval.Put("color", Colors.Blue)
interval.Put("radius", clockDiameter / 2 - 15dip)
interval.Put("strokeWidth", intervalArcStrokeWidth)
Case "pomeriggio"
interval.Put("color", Colors.Green)
interval.Put("radius", clockDiameter / 2 - 25dip)
interval.Put("strokeWidth", intervalArcStrokeWidth)
Case Else
Log("Tipo di intervallo non riconosciuto: " & tipo)
Return
End Select
intervals.Add(interval)
DrawClock
End Sub
' Disegna un intervallo sul quadrante
Private Sub DrawInterval(startHour As Int, startMinute As Int, endHour As Int, endMinute As Int, color As Int, radius As Float, strokeWidth As Float)
Dim startAngle As Float = (startHour Mod 12 + startMinute / 60) * 30 - 90
Dim endAngle As Float = (endHour Mod 12 + endMinute / 60) * 30 - 90
Dim sweepAngle As Float = endAngle - startAngle
If sweepAngle < 0 Then sweepAngle = sweepAngle + 360
Dim path As B4XPath
path.InitializeArc(centerX, centerY, radius, startAngle, sweepAngle)
cvsClock.DrawPath(path, color, False, strokeWidth)
End Sub
' Aggiorna l'orologio ogni secondo ' Aggiorna l'orologio ogni secondo
Public Sub StartClock Public Sub StartClock
Dim timer As Timer Dim timer As Timer

292
Localization.bas Normal file
View File

@@ -0,0 +1,292 @@
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=StaticCode
Version=13
@EndOfDesignText@
Sub Process_Globals
Private translations As Map
Private currentLanguage As String
Private initialized As Boolean
End Sub
Public Sub Initialize
If initialized Then Return
translations.Initialize
LoadLanguage("en", CreateEnglishMap)
LoadLanguage("it", CreateItalianMap)
LoadLanguage("fr", CreateFrenchMap)
LoadLanguage("de", CreateGermanMap)
LoadLanguage("es", CreateSpanishMap)
currentLanguage = NormalizeLanguage(DetectDeviceLanguage)
initialized = True
End Sub
Public Sub T(Key As String) As String
If initialized = False Then Initialize
Dim languageMap As Map = translations.Get(currentLanguage)
If languageMap.IsInitialized And languageMap.ContainsKey(Key) Then Return languageMap.Get(Key)
Dim fallback As Map = translations.Get("en")
If fallback.IsInitialized And fallback.ContainsKey(Key) Then Return fallback.Get(Key)
Return Key
End Sub
Public Sub CurrentLanguageCode As String
If initialized = False Then Initialize
Return currentLanguage
End Sub
Private Sub LoadLanguage(Code As String, Values As Map)
translations.Put(Code, Values)
End Sub
Private Sub NormalizeLanguage(Code As String) As String
Code = Code.ToLowerCase
Select True
Case Code.StartsWith("it")
Return "it"
Case Code.StartsWith("fr")
Return "fr"
Case Code.StartsWith("de")
Return "de"
Case Code.StartsWith("es")
Return "es"
Case Else
Return "en"
End Select
End Sub
Private Sub DetectDeviceLanguage As String
Dim context As JavaObject
context.InitializeContext
Dim resources As JavaObject = context.RunMethod("getResources", Null)
Dim configuration As JavaObject = resources.RunMethod("getConfiguration", Null)
Dim locale As JavaObject = configuration.GetField("locale")
Dim code As String = locale.RunMethod("getLanguage", Null)
If code <> "" Then Return code
Dim jo As JavaObject
jo.InitializeStatic("java.util.Locale")
locale = jo.RunMethod("getDefault", Null)
Return locale.RunMethod("getLanguage", Null)
End Sub
Private Sub CreateEnglishMap As Map
Dim m As Map
m.Initialize
m.Put("app_title", "Overtime Guard")
m.Put("start", "Start")
m.Put("end", "End")
m.Put("pause", "Pause")
m.Put("end_pause", "End pause")
m.Put("stats", "Stats")
m.Put("config", "Config")
m.Put("bg", "Bg")
m.Put("statistics", "Statistics")
m.Put("close", "Close")
m.Put("work_start", "Work start")
m.Put("pause_start", "Pause start")
m.Put("pause_end", "Pause end")
m.Put("work_end", "Work end")
m.Put("set_config", "Set config")
m.Put("reset_config", "Reset config")
m.Put("clear_today", "Clear today")
m.Put("date", "Date")
m.Put("work", "Work")
m.Put("pause_col", "Pause")
m.Put("overtime", "Overtime")
m.Put("totals", "Totals")
m.Put("manual_mode", "Manual mode")
m.Put("auto_recording", "Auto: recording...")
m.Put("auto_paused", "Auto: paused...")
m.Put("auto_stopped", "Auto: stopped...")
m.Put("use_hhmm", "Use HH:MM times.")
m.Put("times_order", "Times must be in order.")
m.Put("work_exceed", "Configured work cannot exceed 8 hours.")
m.Put("auto_enabled", "Automatic config enabled.")
m.Put("auto_disabled", "Automatic config disabled.")
m.Put("no_day_to_clear", "No day to clear.")
m.Put("clear_today_title", "Clear today")
m.Put("clear_today_confirm", "Clear all recorded data for")
m.Put("clear_button", "Clear")
m.Put("cancel", "Cancel")
m.Put("today_cleared", "Today cleared.")
m.Put("limit_reached", "9-hour limit already reached for this workday.")
Return m
End Sub
Private Sub CreateItalianMap As Map
Dim m As Map
m.Initialize
m.Put("app_title", "Overtime Guard")
m.Put("start", "Start")
m.Put("end", "End")
m.Put("pause", "Pausa")
m.Put("end_pause", "Fine pausa")
m.Put("stats", "Statistiche")
m.Put("config", "Config")
m.Put("bg", "Sfondo")
m.Put("statistics", "Statistiche")
m.Put("close", "Chiudi")
m.Put("work_start", "Inizio lavoro")
m.Put("pause_start", "Inizio pausa")
m.Put("pause_end", "Fine pausa")
m.Put("work_end", "Fine lavoro")
m.Put("set_config", "Imposta config")
m.Put("reset_config", "Reset config")
m.Put("clear_today", "Azzera oggi")
m.Put("date", "Data")
m.Put("work", "Lavoro")
m.Put("pause_col", "Pausa")
m.Put("overtime", "Straord.")
m.Put("totals", "Totali")
m.Put("manual_mode", "Modalita manuale")
m.Put("auto_recording", "Auto: registrazione...")
m.Put("auto_paused", "Auto: pausa...")
m.Put("auto_stopped", "Auto: fermo...")
m.Put("use_hhmm", "Usa orari HH:MM.")
m.Put("times_order", "Gli orari devono essere in ordine.")
m.Put("work_exceed", "Il lavoro configurato non puo superare 8 ore.")
m.Put("auto_enabled", "Configurazione automatica attiva.")
m.Put("auto_disabled", "Configurazione automatica disattivata.")
m.Put("no_day_to_clear", "Nessun giorno da azzerare.")
m.Put("clear_today_title", "Azzera oggi")
m.Put("clear_today_confirm", "Cancellare tutti i dati registrati per")
m.Put("clear_button", "Azzera")
m.Put("cancel", "Annulla")
m.Put("today_cleared", "Giornata azzerata.")
m.Put("limit_reached", "Limite di 9 ore gia raggiunto per questa giornata.")
Return m
End Sub
Private Sub CreateFrenchMap As Map
Dim m As Map
m.Initialize
m.Put("app_title", "Overtime Guard")
m.Put("start", "Demarrer")
m.Put("end", "Arreter")
m.Put("pause", "Pause")
m.Put("end_pause", "Fin pause")
m.Put("stats", "Stats")
m.Put("config", "Config")
m.Put("bg", "Fond")
m.Put("statistics", "Statistiques")
m.Put("close", "Fermer")
m.Put("work_start", "Debut travail")
m.Put("pause_start", "Debut pause")
m.Put("pause_end", "Fin pause")
m.Put("work_end", "Fin travail")
m.Put("set_config", "Activer config")
m.Put("reset_config", "Reinit config")
m.Put("clear_today", "Effacer aujourd'hui")
m.Put("date", "Date")
m.Put("work", "Travail")
m.Put("pause_col", "Pause")
m.Put("overtime", "Heures sup.")
m.Put("totals", "Totaux")
m.Put("manual_mode", "Mode manuel")
m.Put("auto_recording", "Auto: enregistrement...")
m.Put("auto_paused", "Auto: pause...")
m.Put("auto_stopped", "Auto: arrete...")
m.Put("use_hhmm", "Utilisez des heures HH:MM.")
m.Put("times_order", "Les heures doivent etre dans l'ordre.")
m.Put("work_exceed", "Le travail configure ne peut pas depasser 8 heures.")
m.Put("auto_enabled", "Configuration automatique activee.")
m.Put("auto_disabled", "Configuration automatique desactivee.")
m.Put("no_day_to_clear", "Aucun jour a effacer.")
m.Put("clear_today_title", "Effacer aujourd'hui")
m.Put("clear_today_confirm", "Effacer toutes les donnees enregistrees pour")
m.Put("clear_button", "Effacer")
m.Put("cancel", "Annuler")
m.Put("today_cleared", "Journee effacee.")
m.Put("limit_reached", "Limite de 9 heures deja atteinte pour cette journee.")
Return m
End Sub
Private Sub CreateGermanMap As Map
Dim m As Map
m.Initialize
m.Put("app_title", "Overtime Guard")
m.Put("start", "Start")
m.Put("end", "Stopp")
m.Put("pause", "Pause")
m.Put("end_pause", "Pause beenden")
m.Put("stats", "Statistik")
m.Put("config", "Konfig")
m.Put("bg", "Hint.")
m.Put("statistics", "Statistik")
m.Put("close", "Schliessen")
m.Put("work_start", "Arbeitsbeginn")
m.Put("pause_start", "Pausenbeginn")
m.Put("pause_end", "Pausenende")
m.Put("work_end", "Arbeitsende")
m.Put("set_config", "Konfig setzen")
m.Put("reset_config", "Konfig reset")
m.Put("clear_today", "Heute loschen")
m.Put("date", "Datum")
m.Put("work", "Arbeit")
m.Put("pause_col", "Pause")
m.Put("overtime", "Uberzeit")
m.Put("totals", "Summen")
m.Put("manual_mode", "Manueller Modus")
m.Put("auto_recording", "Auto: Aufnahme...")
m.Put("auto_paused", "Auto: Pause...")
m.Put("auto_stopped", "Auto: gestoppt...")
m.Put("use_hhmm", "Bitte HH:MM verwenden.")
m.Put("times_order", "Die Zeiten muessen in Reihenfolge sein.")
m.Put("work_exceed", "Die konfigurierte Arbeit darf 8 Stunden nicht uberschreiten.")
m.Put("auto_enabled", "Automatische Konfiguration aktiviert.")
m.Put("auto_disabled", "Automatische Konfiguration deaktiviert.")
m.Put("no_day_to_clear", "Kein Tag zum Loschen.")
m.Put("clear_today_title", "Heute loschen")
m.Put("clear_today_confirm", "Alle erfassten Daten loschen fur")
m.Put("clear_button", "Loschen")
m.Put("cancel", "Abbrechen")
m.Put("today_cleared", "Heutige Daten geloscht.")
m.Put("limit_reached", "9-Stunden-Limit fur diesen Arbeitstag bereits erreicht.")
Return m
End Sub
Private Sub CreateSpanishMap As Map
Dim m As Map
m.Initialize
m.Put("app_title", "Overtime Guard")
m.Put("start", "Iniciar")
m.Put("end", "Detener")
m.Put("pause", "Pausa")
m.Put("end_pause", "Fin pausa")
m.Put("stats", "Stats")
m.Put("config", "Config")
m.Put("bg", "Fondo")
m.Put("statistics", "Estadisticas")
m.Put("close", "Cerrar")
m.Put("work_start", "Inicio trabajo")
m.Put("pause_start", "Inicio pausa")
m.Put("pause_end", "Fin pausa")
m.Put("work_end", "Fin trabajo")
m.Put("set_config", "Activar config")
m.Put("reset_config", "Reset config")
m.Put("clear_today", "Borrar hoy")
m.Put("date", "Fecha")
m.Put("work", "Trabajo")
m.Put("pause_col", "Pausa")
m.Put("overtime", "Extra")
m.Put("totals", "Totales")
m.Put("manual_mode", "Modo manual")
m.Put("auto_recording", "Auto: grabando...")
m.Put("auto_paused", "Auto: pausa...")
m.Put("auto_stopped", "Auto: detenido...")
m.Put("use_hhmm", "Usa horas HH:MM.")
m.Put("times_order", "Las horas deben estar en orden.")
m.Put("work_exceed", "El trabajo configurado no puede superar 8 horas.")
m.Put("auto_enabled", "Configuracion automatica activada.")
m.Put("auto_disabled", "Configuracion automatica desactivada.")
m.Put("no_day_to_clear", "No hay dia para borrar.")
m.Put("clear_today_title", "Borrar hoy")
m.Put("clear_today_confirm", "Borrar todos los datos registrados de")
m.Put("clear_button", "Borrar")
m.Put("cancel", "Cancelar")
m.Put("today_cleared", "Dia borrado.")
m.Put("limit_reached", "Limite de 9 horas ya alcanzado para esta jornada.")
Return m
End Sub

View File

@@ -11,18 +11,17 @@
android:normalScreens="true" android:normalScreens="true"
android:smallScreens="true" android:smallScreens="true"
android:anyDensity="true"/> android:anyDensity="true"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<application <application
android:name="androidx.multidex.MultiDexApplication" android:name="androidx.multidex.MultiDexApplication"
android:icon="@drawable/icon" android:icon="@drawable/icon"
android:label="Orologio Marcatempo" android:label="Overtime Guard"
android:theme="@style/LightTheme"> android:theme="@style/LightTheme">
<activity <activity
android:windowSoftInputMode="stateHidden" android:windowSoftInputMode="stateHidden"
android:launchMode="singleTop" android:launchMode="singleTop"
android:name=".main" android:name=".main"
android:label="Orologio Marcatempo" android:label="Overtime Guard"
android:screenOrientation="unspecified" android:screenOrientation="unspecified"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,133 +0,0 @@
b4a.example
0
1
analogclock
0
main,activity_create,1,0,48,73
,btnpause,,btnreset,,btnstart,,lblelapsedtime,,pnlclock,,myclock,,timer1
,btnpause,,btnreset,,btnstart,,lblelapsedtime,,pnlclock
analogclock,initialize,analogclock,setclocksize,analogclock,drawclock,analogclock,clearcanvas,analogclock,drawticks,analogclock,drawinterval,analogclock,drawhand
main,activity_pause,0,0,86,88
main,activity_resume,0,0,82,84
main,btnpause_click,0,0,169,171
,running
,running
main,btnreset_click,0,0,174,178
,running,,elapsedtime,,lblelapsedtime
,running,,elapsedtime
main,btnstart_click,0,0,157,166
,running,,timer1,,starttime,,elapsedtime
,running,,starttime
main,btnsync_click,0,0,181,183
,canvas1
,synchronizeclock,,drawclock,,drawhand
main,synchronizeclock,0,0,186,188
,canvas1
,drawclock,,drawhand
main,drawclock,0,0,91,120
,canvas1
,drawhand
main,drawhand,0,0,122,126
,canvas1
main,formatelapsedtime,0,0,147,154
main,globals,0,1,21,34
,lblelapsedtime
main,process_globals,0,1,13,19
,running,,starttime,,elapsedtime
,running,,starttime,,elapsedtime
main,timer1_tick,0,0,78,80
,myclock
analogclock,drawclock,analogclock,clearcanvas,analogclock,drawticks,analogclock,drawinterval,analogclock,drawhand
analogclock,initialize,0,1,22,50
,setclocksize,,drawclock,,clearcanvas,,drawticks,,drawinterval,,drawhand
analogclock,drawclock,0,0,78,115
,clearcanvas,,drawticks,,drawinterval,,drawhand
analogclock,addinterval,0,0,150,172
,drawclock,,clearcanvas,,drawticks,,drawinterval,,drawhand
analogclock,class_globals,0,0,1,19
analogclock,clearcanvas,0,0,72,75
analogclock,drawticks,0,0,124,147
analogclock,drawinterval,0,0,174,183
analogclock,drawhand,0,0,118,122
analogclock,setclocksize,0,0,53,58
,drawclock,,clearcanvas,,drawticks,,drawinterval,,drawhand
analogclock,setstrokewidths,0,0,61,69
,drawclock,,clearcanvas,,drawticks,,drawinterval,,drawhand
analogclock,startclock,0,0,187,191
analogclock,timer_tick,0,0,194,196
,drawclock,,clearcanvas,,drawticks,,drawinterval,,drawhand
starter,application_error,0,0,27,29
starter,process_globals,0,1,6,10
starter,service_create,0,0,12,16
starter,service_destroy,0,0,31,33
starter,service_start,0,0,18,20
starter,service_taskremoved,0,0,22,24

View File

@@ -1,32 +0,0 @@
package b4a.example;
import anywheresoftware.b4a.pc.PCBA;
import anywheresoftware.b4a.pc.RemoteObject;
public class analogclock {
public static RemoteObject myClass;
public analogclock() {
}
public static PCBA staticBA = new PCBA(null, analogclock.class);
public static RemoteObject __c = RemoteObject.declareNull("anywheresoftware.b4a.keywords.Common");
public static RemoteObject _xui = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XViewWrapper.XUI");
public static RemoteObject _pnlclock = RemoteObject.declareNull("anywheresoftware.b4a.objects.PanelWrapper");
public static RemoteObject _cvsclock = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XCanvas");
public static RemoteObject _clockdiameter = RemoteObject.createImmutable(0f);
public static RemoteObject _centerx = RemoteObject.createImmutable(0f);
public static RemoteObject _centery = RemoteObject.createImmutable(0f);
public static RemoteObject _intervals = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
public static RemoteObject _quadrantstrokewidth = RemoteObject.createImmutable(0f);
public static RemoteObject _hourtickstrokewidth = RemoteObject.createImmutable(0f);
public static RemoteObject _minutetickstrokewidth = RemoteObject.createImmutable(0f);
public static RemoteObject _intervalarcstrokewidth = RemoteObject.createImmutable(0f);
public static RemoteObject _hourhandstrokewidth = RemoteObject.createImmutable(0f);
public static RemoteObject _minutehandstrokewidth = RemoteObject.createImmutable(0f);
public static b4a.example.main _main = null;
public static b4a.example.starter _starter = null;
public static Object[] GetGlobals(RemoteObject _ref) throws Exception {
return new Object[] {"centerX",_ref.getField(false, "_centerx"),"centerY",_ref.getField(false, "_centery"),"clockDiameter",_ref.getField(false, "_clockdiameter"),"cvsClock",_ref.getField(false, "_cvsclock"),"hourHandStrokeWidth",_ref.getField(false, "_hourhandstrokewidth"),"hourTickStrokeWidth",_ref.getField(false, "_hourtickstrokewidth"),"intervalArcStrokeWidth",_ref.getField(false, "_intervalarcstrokewidth"),"intervals",_ref.getField(false, "_intervals"),"minuteHandStrokeWidth",_ref.getField(false, "_minutehandstrokewidth"),"minuteTickStrokeWidth",_ref.getField(false, "_minutetickstrokewidth"),"pnlClock",_ref.getField(false, "_pnlclock"),"quadrantStrokeWidth",_ref.getField(false, "_quadrantstrokewidth"),"xui",_ref.getField(false, "_xui")};
}
}

View File

@@ -1,610 +0,0 @@
package b4a.example;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;
public class analogclock_subs_0 {
public static RemoteObject _addinterval(RemoteObject __ref,RemoteObject _starthour,RemoteObject _startminute,RemoteObject _endhour,RemoteObject _endminute,RemoteObject _tipo) throws Exception{
try {
Debug.PushSubsStack("AddInterval (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,150);
if (RapidSub.canDelegate("addinterval")) { return __ref.runUserSub(false, "analogclock","addinterval", __ref, _starthour, _startminute, _endhour, _endminute, _tipo);}
RemoteObject _interval = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
Debug.locals.put("startHour", _starthour);
Debug.locals.put("startMinute", _startminute);
Debug.locals.put("endHour", _endhour);
Debug.locals.put("endMinute", _endminute);
Debug.locals.put("tipo", _tipo);
BA.debugLineNum = 150;BA.debugLine="Public Sub AddInterval(startHour As Int, startMinu";
Debug.ShouldStop(2097152);
BA.debugLineNum = 151;BA.debugLine="Dim interval As Map";
Debug.ShouldStop(4194304);
_interval = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("interval", _interval);
BA.debugLineNum = 152;BA.debugLine="interval.Initialize";
Debug.ShouldStop(8388608);
_interval.runVoidMethod ("Initialize");
BA.debugLineNum = 153;BA.debugLine="interval.Put(\"startHour\", startHour)";
Debug.ShouldStop(16777216);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("startHour"))),(Object)((_starthour)));
BA.debugLineNum = 154;BA.debugLine="interval.Put(\"startMinute\", startMinute)";
Debug.ShouldStop(33554432);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("startMinute"))),(Object)((_startminute)));
BA.debugLineNum = 155;BA.debugLine="interval.Put(\"endHour\", endHour)";
Debug.ShouldStop(67108864);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("endHour"))),(Object)((_endhour)));
BA.debugLineNum = 156;BA.debugLine="interval.Put(\"endMinute\", endMinute)";
Debug.ShouldStop(134217728);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("endMinute"))),(Object)((_endminute)));
BA.debugLineNum = 157;BA.debugLine="Select tipo.ToLowerCase";
Debug.ShouldStop(268435456);
switch (BA.switchObjectToInt(_tipo.runMethod(true,"toLowerCase"),BA.ObjectToString("mattino"),BA.ObjectToString("pomeriggio"))) {
case 0: {
BA.debugLineNum = 159;BA.debugLine="interval.Put(\"color\", Colors.Blue)";
Debug.ShouldStop(1073741824);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("color"))),(Object)((analogclock.__c.getField(false,"Colors").getField(true,"Blue"))));
BA.debugLineNum = 160;BA.debugLine="interval.Put(\"radius\", clockDiameter /";
Debug.ShouldStop(-2147483648);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("radius"))),(Object)((RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 15)))}, "/-",1, 0))));
BA.debugLineNum = 161;BA.debugLine="interval.Put(\"strokeWidth\", intervalAr";
Debug.ShouldStop(1);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("strokeWidth"))),(Object)((__ref.getField(true,"_intervalarcstrokewidth" /*RemoteObject*/ ))));
break; }
case 1: {
BA.debugLineNum = 163;BA.debugLine="interval.Put(\"color\", Colors.Green)";
Debug.ShouldStop(4);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("color"))),(Object)((analogclock.__c.getField(false,"Colors").getField(true,"Green"))));
BA.debugLineNum = 164;BA.debugLine="interval.Put(\"radius\", clockDiameter /";
Debug.ShouldStop(8);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("radius"))),(Object)((RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 25)))}, "/-",1, 0))));
BA.debugLineNum = 165;BA.debugLine="interval.Put(\"strokeWidth\", intervalAr";
Debug.ShouldStop(16);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("strokeWidth"))),(Object)((__ref.getField(true,"_intervalarcstrokewidth" /*RemoteObject*/ ))));
break; }
default: {
BA.debugLineNum = 167;BA.debugLine="Log(\"Tipo di intervallo non riconosciu";
Debug.ShouldStop(64);
analogclock.__c.runVoidMethod ("LogImpl","31835025",RemoteObject.concat(RemoteObject.createImmutable("Tipo di intervallo non riconosciuto: "),_tipo),0);
BA.debugLineNum = 168;BA.debugLine="Return";
Debug.ShouldStop(128);
if (true) return RemoteObject.createImmutable("");
break; }
}
;
BA.debugLineNum = 170;BA.debugLine="intervals.Add(interval)";
Debug.ShouldStop(512);
__ref.getField(false,"_intervals" /*RemoteObject*/ ).runVoidMethod ("Add",(Object)((_interval.getObject())));
BA.debugLineNum = 171;BA.debugLine="DrawClock";
Debug.ShouldStop(1024);
__ref.runClassMethod (b4a.example.analogclock.class, "_drawclock" /*RemoteObject*/ );
BA.debugLineNum = 172;BA.debugLine="End Sub";
Debug.ShouldStop(2048);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _class_globals(RemoteObject __ref) throws Exception{
//BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
//BA.debugLineNum = 2;BA.debugLine="Private xui As XUI";
analogclock._xui = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper.XUI");__ref.setField("_xui",analogclock._xui);
//BA.debugLineNum = 4;BA.debugLine="Private pnlClock As Panel ' Pannello in c";
analogclock._pnlclock = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_pnlclock",analogclock._pnlclock);
//BA.debugLineNum = 5;BA.debugLine="Private cvsClock As B4XCanvas ' Canvas per";
analogclock._cvsclock = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XCanvas");__ref.setField("_cvsclock",analogclock._cvsclock);
//BA.debugLineNum = 6;BA.debugLine="Private clockDiameter As Float ' Diametro dell";
analogclock._clockdiameter = RemoteObject.createImmutable(0f);__ref.setField("_clockdiameter",analogclock._clockdiameter);
//BA.debugLineNum = 7;BA.debugLine="Private centerX As Float ' Coordinata X";
analogclock._centerx = RemoteObject.createImmutable(0f);__ref.setField("_centerx",analogclock._centerx);
//BA.debugLineNum = 8;BA.debugLine="Private centerY As Float ' Coordinata Y";
analogclock._centery = RemoteObject.createImmutable(0f);__ref.setField("_centery",analogclock._centery);
//BA.debugLineNum = 9;BA.debugLine="Private intervals As List ' Lista degli i";
analogclock._intervals = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");__ref.setField("_intervals",analogclock._intervals);
//BA.debugLineNum = 12;BA.debugLine="Private quadrantStrokeWidth As Float = 5dip";
analogclock._quadrantstrokewidth = BA.numberCast(float.class, analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5))));__ref.setField("_quadrantstrokewidth",analogclock._quadrantstrokewidth);
//BA.debugLineNum = 13;BA.debugLine="Private hourTickStrokeWidth As Float = 5dip";
analogclock._hourtickstrokewidth = BA.numberCast(float.class, analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5))));__ref.setField("_hourtickstrokewidth",analogclock._hourtickstrokewidth);
//BA.debugLineNum = 14;BA.debugLine="Private minuteTickStrokeWidth As Float = 2dip";
analogclock._minutetickstrokewidth = BA.numberCast(float.class, analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 2))));__ref.setField("_minutetickstrokewidth",analogclock._minutetickstrokewidth);
//BA.debugLineNum = 15;BA.debugLine="Private intervalArcStrokeWidth As Float = 5dip";
analogclock._intervalarcstrokewidth = BA.numberCast(float.class, analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5))));__ref.setField("_intervalarcstrokewidth",analogclock._intervalarcstrokewidth);
//BA.debugLineNum = 16;BA.debugLine="Private hourHandStrokeWidth As Float = 8dip";
analogclock._hourhandstrokewidth = BA.numberCast(float.class, analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 8))));__ref.setField("_hourhandstrokewidth",analogclock._hourhandstrokewidth);
//BA.debugLineNum = 17;BA.debugLine="Private minuteHandStrokeWidth As Float = 5dip";
analogclock._minutehandstrokewidth = BA.numberCast(float.class, analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5))));__ref.setField("_minutehandstrokewidth",analogclock._minutehandstrokewidth);
//BA.debugLineNum = 18;BA.debugLine="Private intervals As List";
analogclock._intervals = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");__ref.setField("_intervals",analogclock._intervals);
//BA.debugLineNum = 19;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject _clearcanvas(RemoteObject __ref,RemoteObject _color) throws Exception{
try {
Debug.PushSubsStack("ClearCanvas (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,72);
if (RapidSub.canDelegate("clearcanvas")) { return __ref.runUserSub(false, "analogclock","clearcanvas", __ref, _color);}
Debug.locals.put("color", _color);
BA.debugLineNum = 72;BA.debugLine="Private Sub ClearCanvas(color As Int)";
Debug.ShouldStop(128);
BA.debugLineNum = 73;BA.debugLine="cvsClock.DrawRect(cvsClock.TargetRect, color, Tru";
Debug.ShouldStop(256);
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("DrawRect",(Object)(__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runMethod(false,"getTargetRect")),(Object)(_color),(Object)(analogclock.__c.getField(true,"True")),(Object)(BA.numberCast(float.class, 0)));
BA.debugLineNum = 74;BA.debugLine="cvsClock.Invalidate";
Debug.ShouldStop(512);
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("Invalidate");
BA.debugLineNum = 75;BA.debugLine="End Sub";
Debug.ShouldStop(1024);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _drawclock(RemoteObject __ref) throws Exception{
try {
Debug.PushSubsStack("DrawClock (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,78);
if (RapidSub.canDelegate("drawclock")) { return __ref.runUserSub(false, "analogclock","drawclock", __ref);}
RemoteObject _interval = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
RemoteObject _now = RemoteObject.createImmutable(0L);
RemoteObject _hours = RemoteObject.createImmutable(0);
RemoteObject _minutes = RemoteObject.createImmutable(0);
RemoteObject _seconds = RemoteObject.createImmutable(0);
RemoteObject _hourangle = RemoteObject.createImmutable(0f);
RemoteObject _minuteangle = RemoteObject.createImmutable(0f);
RemoteObject _secondangle = RemoteObject.createImmutable(0f);
BA.debugLineNum = 78;BA.debugLine="Public Sub DrawClock";
Debug.ShouldStop(8192);
BA.debugLineNum = 79;BA.debugLine="cvsClock.Initialize(pnlClock)";
Debug.ShouldStop(16384);
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("Initialize",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.B4XViewWrapper"), __ref.getField(false,"_pnlclock" /*RemoteObject*/ ).getObject()));
BA.debugLineNum = 82;BA.debugLine="ClearCanvas(Colors.White)";
Debug.ShouldStop(131072);
__ref.runClassMethod (b4a.example.analogclock.class, "_clearcanvas" /*RemoteObject*/ ,(Object)(analogclock.__c.getField(false,"Colors").getField(true,"White")));
BA.debugLineNum = 85;BA.debugLine="cvsClock.DrawCircle(centerX, centerY, clockDia";
Debug.ShouldStop(1048576);
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("DrawCircle",(Object)(__ref.getField(true,"_centerx" /*RemoteObject*/ )),(Object)(__ref.getField(true,"_centery" /*RemoteObject*/ )),(Object)(BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2)}, "/",0, 0))),(Object)(analogclock.__c.getField(false,"Colors").getField(true,"Black")),(Object)(analogclock.__c.getField(true,"False")),(Object)(__ref.getField(true,"_quadrantstrokewidth" /*RemoteObject*/ )));
BA.debugLineNum = 88;BA.debugLine="DrawTicks";
Debug.ShouldStop(8388608);
__ref.runClassMethod (b4a.example.analogclock.class, "_drawticks" /*RemoteObject*/ );
BA.debugLineNum = 91;BA.debugLine="For Each interval As Map In intervals";
Debug.ShouldStop(67108864);
_interval = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
{
final RemoteObject group5 = __ref.getField(false,"_intervals" /*RemoteObject*/ );
final int groupLen5 = group5.runMethod(true,"getSize").<Integer>get()
;int index5 = 0;
;
for (; index5 < groupLen5;index5++){
_interval = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), group5.runMethod(false,"Get",index5));Debug.locals.put("interval", _interval);
Debug.locals.put("interval", _interval);
BA.debugLineNum = 92;BA.debugLine="DrawInterval(interval.Get(\"startHour\"), in";
Debug.ShouldStop(134217728);
__ref.runClassMethod (b4a.example.analogclock.class, "_drawinterval" /*RemoteObject*/ ,(Object)(BA.numberCast(int.class, _interval.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("startHour")))))),(Object)(BA.numberCast(int.class, _interval.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("startMinute")))))),(Object)(BA.numberCast(int.class, _interval.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("endHour")))))),(Object)(BA.numberCast(int.class, _interval.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("endMinute")))))),(Object)(BA.numberCast(int.class, _interval.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("color")))))),(Object)(BA.numberCast(float.class, _interval.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("radius")))))),(Object)(BA.numberCast(float.class, _interval.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("strokeWidth")))))));
}
}Debug.locals.put("interval", _interval);
;
BA.debugLineNum = 96;BA.debugLine="Dim now As Long = DateTime.Now";
Debug.ShouldStop(-2147483648);
_now = analogclock.__c.getField(false,"DateTime").runMethod(true,"getNow");Debug.locals.put("now", _now);Debug.locals.put("now", _now);
BA.debugLineNum = 97;BA.debugLine="Dim Hours As Int = DateTime.GetHour(now) Mod 1";
Debug.ShouldStop(1);
_hours = RemoteObject.solve(new RemoteObject[] {analogclock.__c.getField(false,"DateTime").runMethod(true,"GetHour",(Object)(_now)),RemoteObject.createImmutable(12)}, "%",0, 1);Debug.locals.put("Hours", _hours);Debug.locals.put("Hours", _hours);
BA.debugLineNum = 98;BA.debugLine="Dim Minutes As Int = DateTime.GetMinute(now)";
Debug.ShouldStop(2);
_minutes = analogclock.__c.getField(false,"DateTime").runMethod(true,"GetMinute",(Object)(_now));Debug.locals.put("Minutes", _minutes);Debug.locals.put("Minutes", _minutes);
BA.debugLineNum = 99;BA.debugLine="Dim Seconds As Int = DateTime.GetSecond(now)";
Debug.ShouldStop(4);
_seconds = analogclock.__c.getField(false,"DateTime").runMethod(true,"GetSecond",(Object)(_now));Debug.locals.put("Seconds", _seconds);Debug.locals.put("Seconds", _seconds);
BA.debugLineNum = 102;BA.debugLine="Dim HourAngle As Float = -90 + Hours * 30 + Mi";
Debug.ShouldStop(32);
_hourangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _hours.<Integer>get().intValue())*(double) (0 + 30)+(double) (0 + _minutes.<Integer>get().intValue())/(double)(double) (0 + 2));Debug.locals.put("HourAngle", _hourangle);Debug.locals.put("HourAngle", _hourangle);
BA.debugLineNum = 103;BA.debugLine="DrawHand(centerX, centerY, clockDiameter * 0.2";
Debug.ShouldStop(64);
__ref.runClassMethod (b4a.example.analogclock.class, "_drawhand" /*RemoteObject*/ ,(Object)(__ref.getField(true,"_centerx" /*RemoteObject*/ )),(Object)(__ref.getField(true,"_centery" /*RemoteObject*/ )),(Object)(BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(0.25)}, "*",0, 0))),(Object)(_hourangle),(Object)(__ref.getField(true,"_hourhandstrokewidth" /*RemoteObject*/ )),(Object)(analogclock.__c.getField(false,"Colors").getField(true,"Black")));
BA.debugLineNum = 106;BA.debugLine="Dim MinuteAngle As Float = -90 + Minutes * 6";
Debug.ShouldStop(512);
_minuteangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _minutes.<Integer>get().intValue())*(double) (0 + 6));Debug.locals.put("MinuteAngle", _minuteangle);Debug.locals.put("MinuteAngle", _minuteangle);
BA.debugLineNum = 107;BA.debugLine="DrawHand(centerX, centerY, clockDiameter * 0.4";
Debug.ShouldStop(1024);
__ref.runClassMethod (b4a.example.analogclock.class, "_drawhand" /*RemoteObject*/ ,(Object)(__ref.getField(true,"_centerx" /*RemoteObject*/ )),(Object)(__ref.getField(true,"_centery" /*RemoteObject*/ )),(Object)(BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(0.4)}, "*",0, 0))),(Object)(_minuteangle),(Object)(__ref.getField(true,"_minutehandstrokewidth" /*RemoteObject*/ )),(Object)(analogclock.__c.getField(false,"Colors").getField(true,"Blue")));
BA.debugLineNum = 110;BA.debugLine="Dim SecondAngle As Float = -90 + Seconds * 6";
Debug.ShouldStop(8192);
_secondangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _seconds.<Integer>get().intValue())*(double) (0 + 6));Debug.locals.put("SecondAngle", _secondangle);Debug.locals.put("SecondAngle", _secondangle);
BA.debugLineNum = 111;BA.debugLine="DrawHand(centerX, centerY, clockDiameter * 0.4";
Debug.ShouldStop(16384);
__ref.runClassMethod (b4a.example.analogclock.class, "_drawhand" /*RemoteObject*/ ,(Object)(__ref.getField(true,"_centerx" /*RemoteObject*/ )),(Object)(__ref.getField(true,"_centery" /*RemoteObject*/ )),(Object)(BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(0.45)}, "*",0, 0))),(Object)(_secondangle),(Object)(BA.numberCast(float.class, analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 2))))),(Object)(analogclock.__c.getField(false,"Colors").getField(true,"Red")));
BA.debugLineNum = 114;BA.debugLine="pnlClock.Invalidate";
Debug.ShouldStop(131072);
__ref.getField(false,"_pnlclock" /*RemoteObject*/ ).runVoidMethod ("Invalidate");
BA.debugLineNum = 115;BA.debugLine="End Sub";
Debug.ShouldStop(262144);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _drawhand(RemoteObject __ref,RemoteObject _x,RemoteObject _y,RemoteObject _length,RemoteObject _angle,RemoteObject _width,RemoteObject _color) throws Exception{
try {
Debug.PushSubsStack("DrawHand (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,118);
if (RapidSub.canDelegate("drawhand")) { return __ref.runUserSub(false, "analogclock","drawhand", __ref, _x, _y, _length, _angle, _width, _color);}
RemoteObject _endx = RemoteObject.createImmutable(0f);
RemoteObject _endy = RemoteObject.createImmutable(0f);
Debug.locals.put("x", _x);
Debug.locals.put("y", _y);
Debug.locals.put("length", _length);
Debug.locals.put("angle", _angle);
Debug.locals.put("width", _width);
Debug.locals.put("color", _color);
BA.debugLineNum = 118;BA.debugLine="Private Sub DrawHand(x As Float, y As Float, lengt";
Debug.ShouldStop(2097152);
BA.debugLineNum = 119;BA.debugLine="Dim endX As Float = x + length * CosD(angle)";
Debug.ShouldStop(4194304);
_endx = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_x,_length,analogclock.__c.runMethod(true,"CosD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endX", _endx);Debug.locals.put("endX", _endx);
BA.debugLineNum = 120;BA.debugLine="Dim endY As Float = y + length * SinD(angle)";
Debug.ShouldStop(8388608);
_endy = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_y,_length,analogclock.__c.runMethod(true,"SinD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endY", _endy);Debug.locals.put("endY", _endy);
BA.debugLineNum = 121;BA.debugLine="cvsClock.DrawLine(x, y, endX, endY, color, wid";
Debug.ShouldStop(16777216);
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("DrawLine",(Object)(_x),(Object)(_y),(Object)(_endx),(Object)(_endy),(Object)(_color),(Object)(_width));
BA.debugLineNum = 122;BA.debugLine="End Sub";
Debug.ShouldStop(33554432);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _drawinterval(RemoteObject __ref,RemoteObject _starthour,RemoteObject _startminute,RemoteObject _endhour,RemoteObject _endminute,RemoteObject _color,RemoteObject _radius,RemoteObject _strokewidth) throws Exception{
try {
Debug.PushSubsStack("DrawInterval (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,174);
if (RapidSub.canDelegate("drawinterval")) { return __ref.runUserSub(false, "analogclock","drawinterval", __ref, _starthour, _startminute, _endhour, _endminute, _color, _radius, _strokewidth);}
RemoteObject _startangle = RemoteObject.createImmutable(0f);
RemoteObject _endangle = RemoteObject.createImmutable(0f);
RemoteObject _sweepangle = RemoteObject.createImmutable(0f);
RemoteObject _path = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XCanvas.B4XPath");
Debug.locals.put("startHour", _starthour);
Debug.locals.put("startMinute", _startminute);
Debug.locals.put("endHour", _endhour);
Debug.locals.put("endMinute", _endminute);
Debug.locals.put("color", _color);
Debug.locals.put("radius", _radius);
Debug.locals.put("strokeWidth", _strokewidth);
BA.debugLineNum = 174;BA.debugLine="Private Sub DrawInterval(startHour As Int, startMi";
Debug.ShouldStop(8192);
BA.debugLineNum = 175;BA.debugLine="Dim startAngle As Float = (startHour Mod 12 + sta";
Debug.ShouldStop(16384);
_startangle = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {_starthour,RemoteObject.createImmutable(12),_startminute,RemoteObject.createImmutable(60)}, "%+/",1, 0)),RemoteObject.createImmutable(30),RemoteObject.createImmutable(90)}, "*-",1, 0));Debug.locals.put("startAngle", _startangle);Debug.locals.put("startAngle", _startangle);
BA.debugLineNum = 176;BA.debugLine="Dim endAngle As Float = (endHour Mod 12 + endMinu";
Debug.ShouldStop(32768);
_endangle = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {_endhour,RemoteObject.createImmutable(12),_endminute,RemoteObject.createImmutable(60)}, "%+/",1, 0)),RemoteObject.createImmutable(30),RemoteObject.createImmutable(90)}, "*-",1, 0));Debug.locals.put("endAngle", _endangle);Debug.locals.put("endAngle", _endangle);
BA.debugLineNum = 177;BA.debugLine="Dim sweepAngle As Float = endAngle - startAngle";
Debug.ShouldStop(65536);
_sweepangle = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_endangle,_startangle}, "-",1, 0));Debug.locals.put("sweepAngle", _sweepangle);Debug.locals.put("sweepAngle", _sweepangle);
BA.debugLineNum = 178;BA.debugLine="If sweepAngle < 0 Then sweepAngle = sweepAngle +";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean("<",_sweepangle,BA.numberCast(double.class, 0))) {
_sweepangle = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_sweepangle,RemoteObject.createImmutable(360)}, "+",1, 0));Debug.locals.put("sweepAngle", _sweepangle);};
BA.debugLineNum = 180;BA.debugLine="Dim path As B4XPath";
Debug.ShouldStop(524288);
_path = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XCanvas.B4XPath");Debug.locals.put("path", _path);
BA.debugLineNum = 181;BA.debugLine="path.InitializeArc(centerX, centerY, radius, star";
Debug.ShouldStop(1048576);
_path.runVoidMethod ("InitializeArc",(Object)(__ref.getField(true,"_centerx" /*RemoteObject*/ )),(Object)(__ref.getField(true,"_centery" /*RemoteObject*/ )),(Object)(_radius),(Object)(_startangle),(Object)(_sweepangle));
BA.debugLineNum = 182;BA.debugLine="cvsClock.DrawPath(path, color, False, strokeWidth";
Debug.ShouldStop(2097152);
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("DrawPath",(Object)(_path),(Object)(_color),(Object)(analogclock.__c.getField(true,"False")),(Object)(_strokewidth));
BA.debugLineNum = 183;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _drawticks(RemoteObject __ref) throws Exception{
try {
Debug.PushSubsStack("DrawTicks (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,124);
if (RapidSub.canDelegate("drawticks")) { return __ref.runUserSub(false, "analogclock","drawticks", __ref);}
int _i = 0;
RemoteObject _angle = RemoteObject.createImmutable(0f);
RemoteObject _startx = RemoteObject.createImmutable(0f);
RemoteObject _starty = RemoteObject.createImmutable(0f);
RemoteObject _endx = RemoteObject.createImmutable(0f);
RemoteObject _endy = RemoteObject.createImmutable(0f);
BA.debugLineNum = 124;BA.debugLine="Private Sub DrawTicks";
Debug.ShouldStop(134217728);
BA.debugLineNum = 125;BA.debugLine="For i = 0 To 59";
Debug.ShouldStop(268435456);
{
final int step1 = 1;
final int limit1 = 59;
_i = 0 ;
for (;(step1 > 0 && _i <= limit1) || (step1 < 0 && _i >= limit1) ;_i = ((int)(0 + _i + step1)) ) {
Debug.locals.put("i", _i);
BA.debugLineNum = 126;BA.debugLine="Dim angle As Float = -90 + i * 6";
Debug.ShouldStop(536870912);
_angle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _i)*(double) (0 + 6));Debug.locals.put("angle", _angle);Debug.locals.put("angle", _angle);
BA.debugLineNum = 127;BA.debugLine="Dim startX As Float";
Debug.ShouldStop(1073741824);
_startx = RemoteObject.createImmutable(0f);Debug.locals.put("startX", _startx);
BA.debugLineNum = 128;BA.debugLine="Dim startY As Float";
Debug.ShouldStop(-2147483648);
_starty = RemoteObject.createImmutable(0f);Debug.locals.put("startY", _starty);
BA.debugLineNum = 129;BA.debugLine="Dim endX As Float";
Debug.ShouldStop(1);
_endx = RemoteObject.createImmutable(0f);Debug.locals.put("endX", _endx);
BA.debugLineNum = 130;BA.debugLine="Dim endY As Float";
Debug.ShouldStop(2);
_endy = RemoteObject.createImmutable(0f);Debug.locals.put("endY", _endy);
BA.debugLineNum = 131;BA.debugLine="If i Mod 5 = 0 Then";
Debug.ShouldStop(4);
if (RemoteObject.solveBoolean("=",RemoteObject.solve(new RemoteObject[] {RemoteObject.createImmutable(_i),RemoteObject.createImmutable(5)}, "%",0, 1),BA.numberCast(double.class, 0))) {
BA.debugLineNum = 133;BA.debugLine="startX = centerX + (clockDiameter / 2";
Debug.ShouldStop(16);
_startx = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centerx" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 20)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"CosD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("startX", _startx);
BA.debugLineNum = 134;BA.debugLine="startY = centerY + (clockDiameter / 2";
Debug.ShouldStop(32);
_starty = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centery" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 20)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"SinD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("startY", _starty);
BA.debugLineNum = 135;BA.debugLine="endX = centerX + (clockDiameter / 2 -";
Debug.ShouldStop(64);
_endx = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centerx" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"CosD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endX", _endx);
BA.debugLineNum = 136;BA.debugLine="endY = centerY + (clockDiameter / 2 -";
Debug.ShouldStop(128);
_endy = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centery" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"SinD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endY", _endy);
BA.debugLineNum = 137;BA.debugLine="cvsClock.DrawLine(startX, startY, endX";
Debug.ShouldStop(256);
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("DrawLine",(Object)(_startx),(Object)(_starty),(Object)(_endx),(Object)(_endy),(Object)(analogclock.__c.getField(false,"Colors").getField(true,"Black")),(Object)(__ref.getField(true,"_hourtickstrokewidth" /*RemoteObject*/ )));
}else {
BA.debugLineNum = 140;BA.debugLine="startX = centerX + (clockDiameter / 2";
Debug.ShouldStop(2048);
_startx = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centerx" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 10)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"CosD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("startX", _startx);
BA.debugLineNum = 141;BA.debugLine="startY = centerY + (clockDiameter / 2";
Debug.ShouldStop(4096);
_starty = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centery" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 10)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"SinD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("startY", _starty);
BA.debugLineNum = 142;BA.debugLine="endX = centerX + (clockDiameter / 2 -";
Debug.ShouldStop(8192);
_endx = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centerx" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"CosD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endX", _endx);
BA.debugLineNum = 143;BA.debugLine="endY = centerY + (clockDiameter / 2 -";
Debug.ShouldStop(16384);
_endy = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centery" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"SinD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endY", _endy);
BA.debugLineNum = 144;BA.debugLine="cvsClock.DrawLine(startX, startY, endX";
Debug.ShouldStop(32768);
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("DrawLine",(Object)(_startx),(Object)(_starty),(Object)(_endx),(Object)(_endy),(Object)(analogclock.__c.getField(false,"Colors").getField(true,"Black")),(Object)(__ref.getField(true,"_minutetickstrokewidth" /*RemoteObject*/ )));
};
}
}Debug.locals.put("i", _i);
;
BA.debugLineNum = 147;BA.debugLine="End Sub";
Debug.ShouldStop(262144);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _initialize(RemoteObject __ref,RemoteObject _ba,RemoteObject _parentpanel,RemoteObject _percentageofwidth) throws Exception{
try {
Debug.PushSubsStack("Initialize (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,22);
if (RapidSub.canDelegate("initialize")) { return __ref.runUserSub(false, "analogclock","initialize", __ref, _ba, _parentpanel, _percentageofwidth);}
__ref.runVoidMethodAndSync("innerInitializeHelper", _ba);
RemoteObject _interval = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
Debug.locals.put("ba", _ba);
Debug.locals.put("ParentPanel", _parentpanel);
Debug.locals.put("PercentageOfWidth", _percentageofwidth);
BA.debugLineNum = 22;BA.debugLine="Public Sub Initialize(ParentPanel As Panel, Percen";
Debug.ShouldStop(2097152);
BA.debugLineNum = 23;BA.debugLine="pnlClock = ParentPanel";
Debug.ShouldStop(4194304);
__ref.setField ("_pnlclock" /*RemoteObject*/ ,_parentpanel);
BA.debugLineNum = 24;BA.debugLine="cvsClock.Initialize(pnlClock)";
Debug.ShouldStop(8388608);
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("Initialize",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.B4XViewWrapper"), __ref.getField(false,"_pnlclock" /*RemoteObject*/ ).getObject()));
BA.debugLineNum = 25;BA.debugLine="intervals.Initialize";
Debug.ShouldStop(16777216);
__ref.getField(false,"_intervals" /*RemoteObject*/ ).runVoidMethod ("Initialize");
BA.debugLineNum = 26;BA.debugLine="Dim interval As Map";
Debug.ShouldStop(33554432);
_interval = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("interval", _interval);
BA.debugLineNum = 27;BA.debugLine="interval.Initialize";
Debug.ShouldStop(67108864);
_interval.runVoidMethod ("Initialize");
BA.debugLineNum = 28;BA.debugLine="interval.Put(\"startHour\", 8)";
Debug.ShouldStop(134217728);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("startHour"))),(Object)(RemoteObject.createImmutable((8))));
BA.debugLineNum = 29;BA.debugLine="interval.Put(\"startMinute\", 0)";
Debug.ShouldStop(268435456);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("startMinute"))),(Object)(RemoteObject.createImmutable((0))));
BA.debugLineNum = 30;BA.debugLine="interval.Put(\"endHour\", 12)";
Debug.ShouldStop(536870912);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("endHour"))),(Object)(RemoteObject.createImmutable((12))));
BA.debugLineNum = 31;BA.debugLine="interval.Put(\"endMinute\", 0)";
Debug.ShouldStop(1073741824);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("endMinute"))),(Object)(RemoteObject.createImmutable((0))));
BA.debugLineNum = 32;BA.debugLine="interval.Put(\"color\", Colors.Magenta)";
Debug.ShouldStop(-2147483648);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("color"))),(Object)((analogclock.__c.getField(false,"Colors").getField(true,"Magenta"))));
BA.debugLineNum = 33;BA.debugLine="interval.Put(\"radius\",(clockDiameter/2 +25dip))";
Debug.ShouldStop(1);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("radius"))),(Object)(((RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 25)))}, "/+",1, 0)))));
BA.debugLineNum = 34;BA.debugLine="interval.Put(\"strokeWidth\", 5dip)";
Debug.ShouldStop(2);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("strokeWidth"))),(Object)((analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5))))));
BA.debugLineNum = 35;BA.debugLine="interval.Put(\"period\", \"mattino\")";
Debug.ShouldStop(4);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("period"))),(Object)((RemoteObject.createImmutable("mattino"))));
BA.debugLineNum = 36;BA.debugLine="intervals.Add(interval)";
Debug.ShouldStop(8);
__ref.getField(false,"_intervals" /*RemoteObject*/ ).runVoidMethod ("Add",(Object)((_interval.getObject())));
BA.debugLineNum = 38;BA.debugLine="interval.Initialize";
Debug.ShouldStop(32);
_interval.runVoidMethod ("Initialize");
BA.debugLineNum = 39;BA.debugLine="interval.Put(\"startHour\", 13)";
Debug.ShouldStop(64);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("startHour"))),(Object)(RemoteObject.createImmutable((13))));
BA.debugLineNum = 40;BA.debugLine="interval.Put(\"startMinute\", 0)";
Debug.ShouldStop(128);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("startMinute"))),(Object)(RemoteObject.createImmutable((0))));
BA.debugLineNum = 41;BA.debugLine="interval.Put(\"endHour\", 17)";
Debug.ShouldStop(256);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("endHour"))),(Object)(RemoteObject.createImmutable((17))));
BA.debugLineNum = 42;BA.debugLine="interval.Put(\"endMinute\", 0)";
Debug.ShouldStop(512);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("endMinute"))),(Object)(RemoteObject.createImmutable((0))));
BA.debugLineNum = 43;BA.debugLine="interval.Put(\"color\", Colors.Green)";
Debug.ShouldStop(1024);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("color"))),(Object)((analogclock.__c.getField(false,"Colors").getField(true,"Green"))));
BA.debugLineNum = 44;BA.debugLine="interval.Put(\"radius\", (clockDiameter/2 )+25dip)";
Debug.ShouldStop(2048);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("radius"))),(Object)((RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2)}, "/",0, 0)),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 25)))}, "+",1, 0))));
BA.debugLineNum = 45;BA.debugLine="interval.Put(\"strokeWidth\", 5dip)";
Debug.ShouldStop(4096);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("strokeWidth"))),(Object)((analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5))))));
BA.debugLineNum = 46;BA.debugLine="interval.Put(\"period\", \"pomeriggio\")";
Debug.ShouldStop(8192);
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("period"))),(Object)((RemoteObject.createImmutable("pomeriggio"))));
BA.debugLineNum = 47;BA.debugLine="intervals.Add(interval)";
Debug.ShouldStop(16384);
__ref.getField(false,"_intervals" /*RemoteObject*/ ).runVoidMethod ("Add",(Object)((_interval.getObject())));
BA.debugLineNum = 49;BA.debugLine="SetClockSize(PercentageOfWidth)";
Debug.ShouldStop(65536);
__ref.runClassMethod (b4a.example.analogclock.class, "_setclocksize" /*RemoteObject*/ ,(Object)(_percentageofwidth));
BA.debugLineNum = 50;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _setclocksize(RemoteObject __ref,RemoteObject _percentageofwidth) throws Exception{
try {
Debug.PushSubsStack("SetClockSize (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,53);
if (RapidSub.canDelegate("setclocksize")) { return __ref.runUserSub(false, "analogclock","setclocksize", __ref, _percentageofwidth);}
Debug.locals.put("PercentageOfWidth", _percentageofwidth);
BA.debugLineNum = 53;BA.debugLine="Public Sub SetClockSize(PercentageOfWidth As Float";
Debug.ShouldStop(1048576);
BA.debugLineNum = 54;BA.debugLine="clockDiameter = pnlClock.Width * PercentageOfW";
Debug.ShouldStop(2097152);
__ref.setField ("_clockdiameter" /*RemoteObject*/ ,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_pnlclock" /*RemoteObject*/ ).runMethod(true,"getWidth"),_percentageofwidth,RemoteObject.createImmutable(100)}, "*/",0, 0)));
BA.debugLineNum = 55;BA.debugLine="centerX = pnlClock.Width / 2";
Debug.ShouldStop(4194304);
__ref.setField ("_centerx" /*RemoteObject*/ ,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_pnlclock" /*RemoteObject*/ ).runMethod(true,"getWidth"),RemoteObject.createImmutable(2)}, "/",0, 0)));
BA.debugLineNum = 56;BA.debugLine="centerY = pnlClock.Height / 2";
Debug.ShouldStop(8388608);
__ref.setField ("_centery" /*RemoteObject*/ ,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_pnlclock" /*RemoteObject*/ ).runMethod(true,"getHeight"),RemoteObject.createImmutable(2)}, "/",0, 0)));
BA.debugLineNum = 57;BA.debugLine="DrawClock";
Debug.ShouldStop(16777216);
__ref.runClassMethod (b4a.example.analogclock.class, "_drawclock" /*RemoteObject*/ );
BA.debugLineNum = 58;BA.debugLine="End Sub";
Debug.ShouldStop(33554432);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _setstrokewidths(RemoteObject __ref,RemoteObject _quadrantwidth,RemoteObject _hourtickwidth,RemoteObject _minutetickwidth,RemoteObject _intervalarcwidth,RemoteObject _hourhandwidth,RemoteObject _minutehandwidth) throws Exception{
try {
Debug.PushSubsStack("SetStrokeWidths (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,61);
if (RapidSub.canDelegate("setstrokewidths")) { return __ref.runUserSub(false, "analogclock","setstrokewidths", __ref, _quadrantwidth, _hourtickwidth, _minutetickwidth, _intervalarcwidth, _hourhandwidth, _minutehandwidth);}
Debug.locals.put("quadrantWidth", _quadrantwidth);
Debug.locals.put("hourTickWidth", _hourtickwidth);
Debug.locals.put("minuteTickWidth", _minutetickwidth);
Debug.locals.put("intervalArcWidth", _intervalarcwidth);
Debug.locals.put("hourHandWidth", _hourhandwidth);
Debug.locals.put("minuteHandWidth", _minutehandwidth);
BA.debugLineNum = 61;BA.debugLine="Public Sub SetStrokeWidths(quadrantWidth As Float,";
Debug.ShouldStop(268435456);
BA.debugLineNum = 62;BA.debugLine="quadrantStrokeWidth = quadrantWidth";
Debug.ShouldStop(536870912);
__ref.setField ("_quadrantstrokewidth" /*RemoteObject*/ ,_quadrantwidth);
BA.debugLineNum = 63;BA.debugLine="hourTickStrokeWidth = hourTickWidth";
Debug.ShouldStop(1073741824);
__ref.setField ("_hourtickstrokewidth" /*RemoteObject*/ ,_hourtickwidth);
BA.debugLineNum = 64;BA.debugLine="minuteTickStrokeWidth = minuteTickWidth";
Debug.ShouldStop(-2147483648);
__ref.setField ("_minutetickstrokewidth" /*RemoteObject*/ ,_minutetickwidth);
BA.debugLineNum = 65;BA.debugLine="intervalArcStrokeWidth = intervalArcWidth";
Debug.ShouldStop(1);
__ref.setField ("_intervalarcstrokewidth" /*RemoteObject*/ ,_intervalarcwidth);
BA.debugLineNum = 66;BA.debugLine="hourHandStrokeWidth = hourHandWidth";
Debug.ShouldStop(2);
__ref.setField ("_hourhandstrokewidth" /*RemoteObject*/ ,_hourhandwidth);
BA.debugLineNum = 67;BA.debugLine="minuteHandStrokeWidth = minuteHandWidth";
Debug.ShouldStop(4);
__ref.setField ("_minutehandstrokewidth" /*RemoteObject*/ ,_minutehandwidth);
BA.debugLineNum = 68;BA.debugLine="DrawClock";
Debug.ShouldStop(8);
__ref.runClassMethod (b4a.example.analogclock.class, "_drawclock" /*RemoteObject*/ );
BA.debugLineNum = 69;BA.debugLine="End Sub";
Debug.ShouldStop(16);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _startclock(RemoteObject __ref) throws Exception{
try {
Debug.PushSubsStack("StartClock (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,187);
if (RapidSub.canDelegate("startclock")) { return __ref.runUserSub(false, "analogclock","startclock", __ref);}
RemoteObject _timer = RemoteObject.declareNull("anywheresoftware.b4a.objects.Timer");
BA.debugLineNum = 187;BA.debugLine="Public Sub StartClock";
Debug.ShouldStop(67108864);
BA.debugLineNum = 188;BA.debugLine="Dim timer As Timer";
Debug.ShouldStop(134217728);
_timer = RemoteObject.createNew ("anywheresoftware.b4a.objects.Timer");Debug.locals.put("timer", _timer);
BA.debugLineNum = 189;BA.debugLine="timer.Initialize(\"timer\", 1000)";
Debug.ShouldStop(268435456);
_timer.runVoidMethod ("Initialize",__ref.getField(false, "ba"),(Object)(BA.ObjectToString("timer")),(Object)(BA.numberCast(long.class, 1000)));
BA.debugLineNum = 190;BA.debugLine="timer.Enabled = True";
Debug.ShouldStop(536870912);
_timer.runMethod(true,"setEnabled",analogclock.__c.getField(true,"True"));
BA.debugLineNum = 191;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _timer_tick(RemoteObject __ref) throws Exception{
try {
Debug.PushSubsStack("timer_Tick (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,194);
if (RapidSub.canDelegate("timer_tick")) { return __ref.runUserSub(false, "analogclock","timer_tick", __ref);}
BA.debugLineNum = 194;BA.debugLine="Private Sub timer_Tick";
Debug.ShouldStop(2);
BA.debugLineNum = 195;BA.debugLine="DrawClock";
Debug.ShouldStop(4);
__ref.runClassMethod (b4a.example.analogclock.class, "_drawclock" /*RemoteObject*/ );
BA.debugLineNum = 196;BA.debugLine="End Sub";
Debug.ShouldStop(8);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
}

View File

@@ -1,75 +0,0 @@
package b4a.example;
import java.io.IOException;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.PCBA;
import anywheresoftware.b4a.pc.RDebug;
import anywheresoftware.b4a.pc.RemoteObject;
import anywheresoftware.b4a.pc.RDebug.IRemote;
import anywheresoftware.b4a.pc.Debug;
import anywheresoftware.b4a.pc.B4XTypes.B4XClass;
import anywheresoftware.b4a.pc.B4XTypes.DeviceClass;
public class main implements IRemote{
public static main mostCurrent;
public static RemoteObject processBA;
public static boolean processGlobalsRun;
public static RemoteObject myClass;
public static RemoteObject remoteMe;
public main() {
mostCurrent = this;
}
public RemoteObject getRemoteMe() {
return remoteMe;
}
public static void main (String[] args) throws Exception {
new RDebug(args[0], Integer.parseInt(args[1]), Integer.parseInt(args[2]), args[3]);
RDebug.INSTANCE.waitForTask();
}
static {
anywheresoftware.b4a.pc.RapidSub.moduleToObject.put(new B4XClass("main"), "b4a.example.main");
}
public boolean isSingleton() {
return true;
}
public static RemoteObject getObject() {
return myClass;
}
public RemoteObject activityBA;
public RemoteObject _activity;
private PCBA pcBA;
public PCBA create(Object[] args) throws ClassNotFoundException{
processBA = (RemoteObject) args[1];
activityBA = (RemoteObject) args[2];
_activity = (RemoteObject) args[3];
anywheresoftware.b4a.keywords.Common.Density = (Float)args[4];
remoteMe = (RemoteObject) args[5];
pcBA = new PCBA(this, main.class);
main_subs_0.initializeProcessGlobals();
return pcBA;
}
public static RemoteObject __c = RemoteObject.declareNull("anywheresoftware.b4a.keywords.Common");
public static RemoteObject _timer1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.Timer");
public static RemoteObject _running = RemoteObject.createImmutable(false);
public static RemoteObject _starttime = RemoteObject.createImmutable(0L);
public static RemoteObject _elapsedtime = RemoteObject.createImmutable(0L);
public static RemoteObject _canvas1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.drawable.CanvasWrapper");
public static RemoteObject _panel1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.PanelWrapper");
public static RemoteObject _btnstart = RemoteObject.declareNull("anywheresoftware.b4a.objects.ButtonWrapper");
public static RemoteObject _btnpause = RemoteObject.declareNull("anywheresoftware.b4a.objects.ButtonWrapper");
public static RemoteObject _btnreset = RemoteObject.declareNull("anywheresoftware.b4a.objects.ButtonWrapper");
public static RemoteObject _btnsync = RemoteObject.declareNull("anywheresoftware.b4a.objects.ButtonWrapper");
public static RemoteObject _lblelapsedtime = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
public static RemoteObject _pnlclock = RemoteObject.declareNull("anywheresoftware.b4a.objects.PanelWrapper");
public static RemoteObject _myclock = RemoteObject.declareNull("b4a.example.analogclock");
public static b4a.example.starter _starter = null;
public Object[] GetGlobals() {
return new Object[] {"Activity",main.mostCurrent._activity,"BtnPause",main.mostCurrent._btnpause,"BtnReset",main.mostCurrent._btnreset,"BtnStart",main.mostCurrent._btnstart,"BtnSync",main.mostCurrent._btnsync,"Canvas1",main.mostCurrent._canvas1,"ElapsedTime",main._elapsedtime,"lblElapsedTime",main.mostCurrent._lblelapsedtime,"myClock",main.mostCurrent._myclock,"Panel1",main.mostCurrent._panel1,"pnlClock",main.mostCurrent._pnlclock,"Running",main._running,"Starter",Debug.moduleToString(b4a.example.starter.class),"StartTime",main._starttime,"Timer1",main._timer1};
}
}

View File

@@ -1,408 +0,0 @@
package b4a.example;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;
public class main_subs_0 {
public static RemoteObject _activity_create(RemoteObject _firsttime) throws Exception{
try {
Debug.PushSubsStack("Activity_Create (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,48);
if (RapidSub.canDelegate("activity_create")) { return b4a.example.main.remoteMe.runUserSub(false, "main","activity_create", _firsttime);}
Debug.locals.put("FirstTime", _firsttime);
BA.debugLineNum = 48;BA.debugLine="Sub Activity_Create(FirstTime As Boolean)";
Debug.ShouldStop(32768);
BA.debugLineNum = 49;BA.debugLine="Activity.LoadLayout(\"Main_Layout\")";
Debug.ShouldStop(65536);
main.mostCurrent._activity.runMethodAndSync(false,"LoadLayout",(Object)(RemoteObject.createImmutable("Main_Layout")),main.mostCurrent.activityBA);
BA.debugLineNum = 50;BA.debugLine="Log(\"Layout caricato correttamente.\")";
Debug.ShouldStop(131072);
main.mostCurrent.__c.runVoidMethod ("LogImpl","3131074",RemoteObject.createImmutable("Layout caricato correttamente."),0);
BA.debugLineNum = 53;BA.debugLine="myClock.Initialize(pnlClock, 50) ' L'orologio avr";
Debug.ShouldStop(1048576);
main.mostCurrent._myclock.runClassMethod (b4a.example.analogclock.class, "_initialize" /*RemoteObject*/ ,main.mostCurrent.activityBA,(Object)(main.mostCurrent._pnlclock),(Object)(BA.numberCast(float.class, 50)));
BA.debugLineNum = 56;BA.debugLine="Timer1.Initialize(\"Timer1\", 1000) ' Aggiornamento";
Debug.ShouldStop(8388608);
main._timer1.runVoidMethod ("Initialize",main.processBA,(Object)(BA.ObjectToString("Timer1")),(Object)(BA.numberCast(long.class, 1000)));
BA.debugLineNum = 57;BA.debugLine="Timer1.Enabled = True";
Debug.ShouldStop(16777216);
main._timer1.runMethod(true,"setEnabled",main.mostCurrent.__c.getField(true,"True"));
BA.debugLineNum = 73;BA.debugLine="End Sub";
Debug.ShouldStop(256);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _activity_pause(RemoteObject _userclosed) throws Exception{
try {
Debug.PushSubsStack("Activity_Pause (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,86);
if (RapidSub.canDelegate("activity_pause")) { return b4a.example.main.remoteMe.runUserSub(false, "main","activity_pause", _userclosed);}
Debug.locals.put("UserClosed", _userclosed);
BA.debugLineNum = 86;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
Debug.ShouldStop(2097152);
BA.debugLineNum = 88;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _activity_resume() throws Exception{
try {
Debug.PushSubsStack("Activity_Resume (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,82);
if (RapidSub.canDelegate("activity_resume")) { return b4a.example.main.remoteMe.runUserSub(false, "main","activity_resume");}
BA.debugLineNum = 82;BA.debugLine="Sub Activity_Resume";
Debug.ShouldStop(131072);
BA.debugLineNum = 84;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _btnpause_click() throws Exception{
try {
Debug.PushSubsStack("BtnPause_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,169);
if (RapidSub.canDelegate("btnpause_click")) { return b4a.example.main.remoteMe.runUserSub(false, "main","btnpause_click");}
BA.debugLineNum = 169;BA.debugLine="Sub BtnPause_Click";
Debug.ShouldStop(256);
BA.debugLineNum = 170;BA.debugLine="Running = False";
Debug.ShouldStop(512);
main._running = main.mostCurrent.__c.getField(true,"False");
BA.debugLineNum = 171;BA.debugLine="End Sub";
Debug.ShouldStop(1024);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _btnreset_click() throws Exception{
try {
Debug.PushSubsStack("BtnReset_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,174);
if (RapidSub.canDelegate("btnreset_click")) { return b4a.example.main.remoteMe.runUserSub(false, "main","btnreset_click");}
BA.debugLineNum = 174;BA.debugLine="Sub BtnReset_Click";
Debug.ShouldStop(8192);
BA.debugLineNum = 175;BA.debugLine="Running = False";
Debug.ShouldStop(16384);
main._running = main.mostCurrent.__c.getField(true,"False");
BA.debugLineNum = 176;BA.debugLine="ElapsedTime = 0";
Debug.ShouldStop(32768);
main._elapsedtime = BA.numberCast(long.class, 0);
BA.debugLineNum = 177;BA.debugLine="lblElapsedTime.Text = \"Tempo: 00:00:00\"";
Debug.ShouldStop(65536);
main.mostCurrent._lblelapsedtime.runMethod(true,"setText",BA.ObjectToCharSequence("Tempo: 00:00:00"));
BA.debugLineNum = 178;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _btnstart_click() throws Exception{
try {
Debug.PushSubsStack("BtnStart_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,157);
if (RapidSub.canDelegate("btnstart_click")) { return b4a.example.main.remoteMe.runUserSub(false, "main","btnstart_click");}
BA.debugLineNum = 157;BA.debugLine="Sub BtnStart_Click";
Debug.ShouldStop(268435456);
BA.debugLineNum = 158;BA.debugLine="If Not(Running) Then";
Debug.ShouldStop(536870912);
if (main.mostCurrent.__c.runMethod(true,"Not",(Object)(main._running)).<Boolean>get().booleanValue()) {
BA.debugLineNum = 159;BA.debugLine="Running = True";
Debug.ShouldStop(1073741824);
main._running = main.mostCurrent.__c.getField(true,"True");
BA.debugLineNum = 161;BA.debugLine="Timer1.Initialize(\"Timer1\",1000)";
Debug.ShouldStop(1);
main._timer1.runVoidMethod ("Initialize",main.processBA,(Object)(BA.ObjectToString("Timer1")),(Object)(BA.numberCast(long.class, 1000)));
BA.debugLineNum = 163;BA.debugLine="Timer1.Enabled = True";
Debug.ShouldStop(4);
main._timer1.runMethod(true,"setEnabled",main.mostCurrent.__c.getField(true,"True"));
BA.debugLineNum = 164;BA.debugLine="StartTime = DateTime.Now - ElapsedTime";
Debug.ShouldStop(8);
main._starttime = RemoteObject.solve(new RemoteObject[] {main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"),main._elapsedtime}, "-",1, 2);
};
BA.debugLineNum = 166;BA.debugLine="End Sub";
Debug.ShouldStop(32);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _btnsync_click() throws Exception{
try {
Debug.PushSubsStack("BtnSync_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,181);
if (RapidSub.canDelegate("btnsync_click")) { return b4a.example.main.remoteMe.runUserSub(false, "main","btnsync_click");}
BA.debugLineNum = 181;BA.debugLine="Sub BtnSync_Click";
Debug.ShouldStop(1048576);
BA.debugLineNum = 182;BA.debugLine="SynchronizeClock";
Debug.ShouldStop(2097152);
_synchronizeclock();
BA.debugLineNum = 183;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _drawclock() throws Exception{
try {
Debug.PushSubsStack("DrawClock (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,91);
if (RapidSub.canDelegate("drawclock")) { return b4a.example.main.remoteMe.runUserSub(false, "main","drawclock");}
RemoteObject _now = RemoteObject.createImmutable(0L);
RemoteObject _hours = RemoteObject.createImmutable(0);
RemoteObject _minutes = RemoteObject.createImmutable(0);
RemoteObject _seconds = RemoteObject.createImmutable(0);
RemoteObject _x = RemoteObject.createImmutable(0);
RemoteObject _y = RemoteObject.createImmutable(0);
RemoteObject _radius = RemoteObject.createImmutable(0);
RemoteObject _hourangle = RemoteObject.createImmutable(0f);
RemoteObject _minuteangle = RemoteObject.createImmutable(0f);
RemoteObject _secondangle = RemoteObject.createImmutable(0f);
BA.debugLineNum = 91;BA.debugLine="Sub DrawClock";
Debug.ShouldStop(67108864);
BA.debugLineNum = 92;BA.debugLine="Canvas1.Initialize(Activity)";
Debug.ShouldStop(134217728);
main.mostCurrent._canvas1.runVoidMethod ("Initialize",(Object)((main.mostCurrent._activity.getObject())));
BA.debugLineNum = 93;BA.debugLine="Dim now As Long = DateTime.Now";
Debug.ShouldStop(268435456);
_now = main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow");Debug.locals.put("now", _now);Debug.locals.put("now", _now);
BA.debugLineNum = 94;BA.debugLine="Dim Hours As Int = DateTime.GetHour(now) Mod 1";
Debug.ShouldStop(536870912);
_hours = RemoteObject.solve(new RemoteObject[] {main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"GetHour",(Object)(_now)),RemoteObject.createImmutable(12)}, "%",0, 1);Debug.locals.put("Hours", _hours);Debug.locals.put("Hours", _hours);
BA.debugLineNum = 95;BA.debugLine="Dim Minutes As Int = DateTime.GetMinute(now)";
Debug.ShouldStop(1073741824);
_minutes = main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"GetMinute",(Object)(_now));Debug.locals.put("Minutes", _minutes);Debug.locals.put("Minutes", _minutes);
BA.debugLineNum = 96;BA.debugLine="Dim Seconds As Int = DateTime.GetSecond(now)";
Debug.ShouldStop(-2147483648);
_seconds = main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"GetSecond",(Object)(_now));Debug.locals.put("Seconds", _seconds);Debug.locals.put("Seconds", _seconds);
BA.debugLineNum = 99;BA.debugLine="Dim x As Int = Activity.Width / 2";
Debug.ShouldStop(4);
_x = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {main.mostCurrent._activity.runMethod(true,"getWidth"),RemoteObject.createImmutable(2)}, "/",0, 0));Debug.locals.put("x", _x);Debug.locals.put("x", _x);
BA.debugLineNum = 100;BA.debugLine="Dim y As Int = Activity.Height / 2";
Debug.ShouldStop(8);
_y = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {main.mostCurrent._activity.runMethod(true,"getHeight"),RemoteObject.createImmutable(2)}, "/",0, 0));Debug.locals.put("y", _y);Debug.locals.put("y", _y);
BA.debugLineNum = 101;BA.debugLine="Dim Radius As Int = Min(x, y) - 10";
Debug.ShouldStop(16);
_radius = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {main.mostCurrent.__c.runMethod(true,"Min",(Object)(BA.numberCast(double.class, _x)),(Object)(BA.numberCast(double.class, _y))),RemoteObject.createImmutable(10)}, "-",1, 0));Debug.locals.put("Radius", _radius);Debug.locals.put("Radius", _radius);
BA.debugLineNum = 104;BA.debugLine="Canvas1.DrawColor(Colors.White)";
Debug.ShouldStop(128);
main.mostCurrent._canvas1.runVoidMethod ("DrawColor",(Object)(main.mostCurrent.__c.getField(false,"Colors").getField(true,"White")));
BA.debugLineNum = 107;BA.debugLine="Canvas1.DrawCircle(x, y, Radius, Colors.Black,";
Debug.ShouldStop(1024);
main.mostCurrent._canvas1.runVoidMethod ("DrawCircle",(Object)(BA.numberCast(float.class, _x)),(Object)(BA.numberCast(float.class, _y)),(Object)(BA.numberCast(float.class, _radius)),(Object)(main.mostCurrent.__c.getField(false,"Colors").getField(true,"Black")),(Object)(main.mostCurrent.__c.getField(true,"False")),(Object)(BA.numberCast(float.class, 5)));
BA.debugLineNum = 110;BA.debugLine="Dim HourAngle As Float = -90 + Hours * 30 + Mi";
Debug.ShouldStop(8192);
_hourangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _hours.<Integer>get().intValue())*(double) (0 + 30)+(double) (0 + _minutes.<Integer>get().intValue())/(double)(double) (0 + 2));Debug.locals.put("HourAngle", _hourangle);Debug.locals.put("HourAngle", _hourangle);
BA.debugLineNum = 111;BA.debugLine="DrawHand(x, y, Radius * 0.5, HourAngle, 8, Col";
Debug.ShouldStop(16384);
_drawhand(_x,_y,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_radius,RemoteObject.createImmutable(0.5)}, "*",0, 0)),_hourangle,BA.numberCast(int.class, 8),main.mostCurrent.__c.getField(false,"Colors").getField(true,"Black"));
BA.debugLineNum = 114;BA.debugLine="Dim MinuteAngle As Float = -90 + Minutes * 6";
Debug.ShouldStop(131072);
_minuteangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _minutes.<Integer>get().intValue())*(double) (0 + 6));Debug.locals.put("MinuteAngle", _minuteangle);Debug.locals.put("MinuteAngle", _minuteangle);
BA.debugLineNum = 115;BA.debugLine="DrawHand(x, y, Radius * 0.7, MinuteAngle, 5, C";
Debug.ShouldStop(262144);
_drawhand(_x,_y,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_radius,RemoteObject.createImmutable(0.7)}, "*",0, 0)),_minuteangle,BA.numberCast(int.class, 5),main.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));
BA.debugLineNum = 118;BA.debugLine="Dim SecondAngle As Float = -90 + Seconds * 6";
Debug.ShouldStop(2097152);
_secondangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _seconds.<Integer>get().intValue())*(double) (0 + 6));Debug.locals.put("SecondAngle", _secondangle);Debug.locals.put("SecondAngle", _secondangle);
BA.debugLineNum = 119;BA.debugLine="DrawHand(x, y, Radius * 0.9, SecondAngle, 2, C";
Debug.ShouldStop(4194304);
_drawhand(_x,_y,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_radius,RemoteObject.createImmutable(0.9)}, "*",0, 0)),_secondangle,BA.numberCast(int.class, 2),main.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
BA.debugLineNum = 120;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _drawhand(RemoteObject _x,RemoteObject _y,RemoteObject _length,RemoteObject _angle,RemoteObject _width,RemoteObject _color) throws Exception{
try {
Debug.PushSubsStack("DrawHand (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,122);
if (RapidSub.canDelegate("drawhand")) { return b4a.example.main.remoteMe.runUserSub(false, "main","drawhand", _x, _y, _length, _angle, _width, _color);}
RemoteObject _endx = RemoteObject.createImmutable(0f);
RemoteObject _endy = RemoteObject.createImmutable(0f);
Debug.locals.put("x", _x);
Debug.locals.put("y", _y);
Debug.locals.put("length", _length);
Debug.locals.put("angle", _angle);
Debug.locals.put("width", _width);
Debug.locals.put("color", _color);
BA.debugLineNum = 122;BA.debugLine="Sub DrawHand(x As Int, y As Int, length As Float,";
Debug.ShouldStop(33554432);
BA.debugLineNum = 123;BA.debugLine="Dim endX As Float = x + length * CosD(angle)";
Debug.ShouldStop(67108864);
_endx = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_x,_length,main.mostCurrent.__c.runMethod(true,"CosD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endX", _endx);Debug.locals.put("endX", _endx);
BA.debugLineNum = 124;BA.debugLine="Dim endY As Float = y + length * SinD(angle)";
Debug.ShouldStop(134217728);
_endy = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_y,_length,main.mostCurrent.__c.runMethod(true,"SinD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endY", _endy);Debug.locals.put("endY", _endy);
BA.debugLineNum = 125;BA.debugLine="Canvas1.DrawLine(x, y, endX, endY, color, widt";
Debug.ShouldStop(268435456);
main.mostCurrent._canvas1.runVoidMethod ("DrawLine",(Object)(BA.numberCast(float.class, _x)),(Object)(BA.numberCast(float.class, _y)),(Object)(_endx),(Object)(_endy),(Object)(_color),(Object)(BA.numberCast(float.class, _width)));
BA.debugLineNum = 126;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _formatelapsedtime(RemoteObject _ms) throws Exception{
try {
Debug.PushSubsStack("FormatElapsedTime (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,147);
if (RapidSub.canDelegate("formatelapsedtime")) { return b4a.example.main.remoteMe.runUserSub(false, "main","formatelapsedtime", _ms);}
RemoteObject _seconds = RemoteObject.createImmutable(0);
RemoteObject _minutes = RemoteObject.createImmutable(0);
RemoteObject _hours = RemoteObject.createImmutable(0);
Debug.locals.put("ms", _ms);
BA.debugLineNum = 147;BA.debugLine="Sub FormatElapsedTime(ms As Long) As String";
Debug.ShouldStop(262144);
BA.debugLineNum = 148;BA.debugLine="Dim seconds As Int = ms / 1000";
Debug.ShouldStop(524288);
_seconds = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_ms,RemoteObject.createImmutable(1000)}, "/",0, 0));Debug.locals.put("seconds", _seconds);Debug.locals.put("seconds", _seconds);
BA.debugLineNum = 149;BA.debugLine="Dim minutes As Int = seconds / 60";
Debug.ShouldStop(1048576);
_minutes = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_seconds,RemoteObject.createImmutable(60)}, "/",0, 0));Debug.locals.put("minutes", _minutes);Debug.locals.put("minutes", _minutes);
BA.debugLineNum = 150;BA.debugLine="Dim hours As Int = minutes / 60";
Debug.ShouldStop(2097152);
_hours = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_minutes,RemoteObject.createImmutable(60)}, "/",0, 0));Debug.locals.put("hours", _hours);Debug.locals.put("hours", _hours);
BA.debugLineNum = 151;BA.debugLine="seconds = seconds Mod 60";
Debug.ShouldStop(4194304);
_seconds = RemoteObject.solve(new RemoteObject[] {_seconds,RemoteObject.createImmutable(60)}, "%",0, 1);Debug.locals.put("seconds", _seconds);
BA.debugLineNum = 152;BA.debugLine="minutes = minutes Mod 60";
Debug.ShouldStop(8388608);
_minutes = RemoteObject.solve(new RemoteObject[] {_minutes,RemoteObject.createImmutable(60)}, "%",0, 1);Debug.locals.put("minutes", _minutes);
BA.debugLineNum = 153;BA.debugLine="Return NumberFormat(hours, 2, 0) & \":\" & Numbe";
Debug.ShouldStop(16777216);
if (true) return RemoteObject.concat(main.mostCurrent.__c.runMethod(true,"NumberFormat",(Object)(BA.numberCast(double.class, _hours)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 0))),RemoteObject.createImmutable(":"),main.mostCurrent.__c.runMethod(true,"NumberFormat",(Object)(BA.numberCast(double.class, _minutes)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 0))),RemoteObject.createImmutable(":"),main.mostCurrent.__c.runMethod(true,"NumberFormat",(Object)(BA.numberCast(double.class, _seconds)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 0))));
BA.debugLineNum = 154;BA.debugLine="End Sub";
Debug.ShouldStop(33554432);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _globals() throws Exception{
//BA.debugLineNum = 21;BA.debugLine="Sub Globals";
//BA.debugLineNum = 22;BA.debugLine="Private Canvas1 As Canvas";
main.mostCurrent._canvas1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.drawable.CanvasWrapper");
//BA.debugLineNum = 23;BA.debugLine="Private Panel1 As Panel";
main.mostCurrent._panel1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");
//BA.debugLineNum = 24;BA.debugLine="Private BtnStart As Button";
main.mostCurrent._btnstart = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
//BA.debugLineNum = 25;BA.debugLine="Private BtnPause As Button";
main.mostCurrent._btnpause = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
//BA.debugLineNum = 26;BA.debugLine="Private BtnReset As Button";
main.mostCurrent._btnreset = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
//BA.debugLineNum = 27;BA.debugLine="Private BtnSync As Button";
main.mostCurrent._btnsync = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
//BA.debugLineNum = 29;BA.debugLine="Private lblElapsedTime As Label";
main.mostCurrent._lblelapsedtime = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");
//BA.debugLineNum = 30;BA.debugLine="Private pnlClock As Panel";
main.mostCurrent._pnlclock = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");
//BA.debugLineNum = 31;BA.debugLine="Private Timer1 As Timer";
main._timer1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.Timer");
//BA.debugLineNum = 32;BA.debugLine="Private myClock As AnalogClock";
main.mostCurrent._myclock = RemoteObject.createNew ("b4a.example.analogclock");
//BA.debugLineNum = 33;BA.debugLine="Log(\"lblElapsedTime nel Sub Globals: \" & lblElaps";
main.mostCurrent.__c.runVoidMethod ("LogImpl","365548",RemoteObject.concat(RemoteObject.createImmutable("lblElapsedTime nel Sub Globals: "),main.mostCurrent._lblelapsedtime.runMethod(true,"IsInitialized")),0);
//BA.debugLineNum = 34;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static void initializeProcessGlobals() {
if (main.processGlobalsRun == false) {
main.processGlobalsRun = true;
try {
main_subs_0._process_globals();
starter_subs_0._process_globals();
main.myClass = BA.getDeviceClass ("b4a.example.main");
starter.myClass = BA.getDeviceClass ("b4a.example.starter");
analogclock.myClass = BA.getDeviceClass ("b4a.example.analogclock");
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}public static RemoteObject _process_globals() throws Exception{
//BA.debugLineNum = 13;BA.debugLine="Sub Process_Globals";
//BA.debugLineNum = 14;BA.debugLine="Private Timer1 As Timer";
main._timer1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.Timer");
//BA.debugLineNum = 15;BA.debugLine="Private Running As Boolean = False";
main._running = main.mostCurrent.__c.getField(true,"False");
//BA.debugLineNum = 16;BA.debugLine="Private StartTime As Long = 0";
main._starttime = BA.numberCast(long.class, 0);
//BA.debugLineNum = 17;BA.debugLine="Private ElapsedTime As Long = 0";
main._elapsedtime = BA.numberCast(long.class, 0);
//BA.debugLineNum = 19;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject _synchronizeclock() throws Exception{
try {
Debug.PushSubsStack("SynchronizeClock (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,186);
if (RapidSub.canDelegate("synchronizeclock")) { return b4a.example.main.remoteMe.runUserSub(false, "main","synchronizeclock");}
BA.debugLineNum = 186;BA.debugLine="Sub SynchronizeClock";
Debug.ShouldStop(33554432);
BA.debugLineNum = 187;BA.debugLine="DrawClock";
Debug.ShouldStop(67108864);
_drawclock();
BA.debugLineNum = 188;BA.debugLine="End Sub";
Debug.ShouldStop(134217728);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _timer1_tick() throws Exception{
try {
Debug.PushSubsStack("Timer1_Tick (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,78);
if (RapidSub.canDelegate("timer1_tick")) { return b4a.example.main.remoteMe.runUserSub(false, "main","timer1_tick");}
BA.debugLineNum = 78;BA.debugLine="Sub Timer1_Tick";
Debug.ShouldStop(8192);
BA.debugLineNum = 79;BA.debugLine="myClock.DrawClock";
Debug.ShouldStop(16384);
main.mostCurrent._myclock.runClassMethod (b4a.example.analogclock.class, "_drawclock" /*RemoteObject*/ );
BA.debugLineNum = 80;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
}

View File

@@ -1,58 +0,0 @@
package b4a.example;
import java.io.IOException;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.PCBA;
import anywheresoftware.b4a.pc.RDebug;
import anywheresoftware.b4a.pc.RemoteObject;
import anywheresoftware.b4a.pc.RDebug.IRemote;
import anywheresoftware.b4a.pc.Debug;
import anywheresoftware.b4a.pc.B4XTypes.B4XClass;
import anywheresoftware.b4a.pc.B4XTypes.DeviceClass;
public class starter implements IRemote{
public static starter mostCurrent;
public static RemoteObject processBA;
public static boolean processGlobalsRun;
public static RemoteObject myClass;
public static RemoteObject remoteMe;
public starter() {
mostCurrent = this;
}
public RemoteObject getRemoteMe() {
return remoteMe;
}
public boolean isSingleton() {
return true;
}
static {
anywheresoftware.b4a.pc.RapidSub.moduleToObject.put(new B4XClass("starter"), "b4a.example.starter");
}
public static RemoteObject getObject() {
return myClass;
}
public RemoteObject _service;
private PCBA pcBA;
public PCBA create(Object[] args) throws ClassNotFoundException{
processBA = (RemoteObject) args[1];
_service = (RemoteObject) args[2];
remoteMe = RemoteObject.declareNull("b4a.example.starter");
anywheresoftware.b4a.keywords.Common.Density = (Float)args[3];
pcBA = new PCBA(this, starter.class);
main_subs_0.initializeProcessGlobals();
return pcBA;
}public static RemoteObject runMethod(boolean notUsed, String method, Object... args) throws Exception{
return (RemoteObject) mostCurrent.pcBA.raiseEvent(method.substring(1), args);
}
public static void runVoidMethod(String method, Object... args) throws Exception{
runMethod(false, method, args);
}
public static RemoteObject __c = RemoteObject.declareNull("anywheresoftware.b4a.keywords.Common");
public static b4a.example.main _main = null;
public Object[] GetGlobals() {
return new Object[] {"Main",Debug.moduleToString(b4a.example.main.class),"Service",starter.mostCurrent._service};
}
}

View File

@@ -1,103 +0,0 @@
package b4a.example;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;
public class starter_subs_0 {
public static RemoteObject _application_error(RemoteObject _error,RemoteObject _stacktrace) throws Exception{
try {
Debug.PushSubsStack("Application_Error (starter) ","starter",1,starter.processBA,starter.mostCurrent,27);
if (RapidSub.canDelegate("application_error")) { return b4a.example.starter.remoteMe.runUserSub(false, "starter","application_error", _error, _stacktrace);}
Debug.locals.put("Error", _error);
Debug.locals.put("StackTrace", _stacktrace);
BA.debugLineNum = 27;BA.debugLine="Sub Application_Error (Error As Exception, StackTr";
Debug.ShouldStop(67108864);
BA.debugLineNum = 28;BA.debugLine="Return True";
Debug.ShouldStop(134217728);
if (true) return starter.mostCurrent.__c.getField(true,"True");
BA.debugLineNum = 29;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _process_globals() throws Exception{
//BA.debugLineNum = 6;BA.debugLine="Sub Process_Globals";
//BA.debugLineNum = 10;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject _service_create() throws Exception{
try {
Debug.PushSubsStack("Service_Create (starter) ","starter",1,starter.processBA,starter.mostCurrent,12);
if (RapidSub.canDelegate("service_create")) { return b4a.example.starter.remoteMe.runUserSub(false, "starter","service_create");}
BA.debugLineNum = 12;BA.debugLine="Sub Service_Create";
Debug.ShouldStop(2048);
BA.debugLineNum = 16;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _service_destroy() throws Exception{
try {
Debug.PushSubsStack("Service_Destroy (starter) ","starter",1,starter.processBA,starter.mostCurrent,31);
if (RapidSub.canDelegate("service_destroy")) { return b4a.example.starter.remoteMe.runUserSub(false, "starter","service_destroy");}
BA.debugLineNum = 31;BA.debugLine="Sub Service_Destroy";
Debug.ShouldStop(1073741824);
BA.debugLineNum = 33;BA.debugLine="End Sub";
Debug.ShouldStop(1);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _service_start(RemoteObject _startingintent) throws Exception{
try {
Debug.PushSubsStack("Service_Start (starter) ","starter",1,starter.processBA,starter.mostCurrent,18);
if (RapidSub.canDelegate("service_start")) { return b4a.example.starter.remoteMe.runUserSub(false, "starter","service_start", _startingintent);}
Debug.locals.put("StartingIntent", _startingintent);
BA.debugLineNum = 18;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
Debug.ShouldStop(131072);
BA.debugLineNum = 19;BA.debugLine="Service.StopAutomaticForeground 'Starter service";
Debug.ShouldStop(262144);
starter.mostCurrent._service.runVoidMethod ("StopAutomaticForeground");
BA.debugLineNum = 20;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _service_taskremoved() throws Exception{
try {
Debug.PushSubsStack("Service_TaskRemoved (starter) ","starter",1,starter.processBA,starter.mostCurrent,22);
if (RapidSub.canDelegate("service_taskremoved")) { return b4a.example.starter.remoteMe.runUserSub(false, "starter","service_taskremoved");}
BA.debugLineNum = 22;BA.debugLine="Sub Service_TaskRemoved";
Debug.ShouldStop(2097152);
BA.debugLineNum = 24;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
}

View File

@@ -10,7 +10,7 @@ public class analogclock extends B4AClass.ImplB4AClass implements BA.SubDelegato
private static java.util.HashMap<String, java.lang.reflect.Method> htSubs; private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
private void innerInitialize(BA _ba) throws Exception { private void innerInitialize(BA _ba) throws Exception {
if (ba == null) { if (ba == null) {
ba = new anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "b4a.example.analogclock"); ba = new BA(_ba, this, htSubs, "b4a.example.analogclock");
if (htSubs == null) { if (htSubs == null) {
ba.loadHtSubs(this.getClass()); ba.loadHtSubs(this.getClass());
htSubs = ba.htSubs; htSubs = ba.htSubs;
@@ -23,123 +23,129 @@ public class analogclock extends B4AClass.ImplB4AClass implements BA.SubDelegato
ba.raiseEvent2(null, true, "class_globals", false); ba.raiseEvent2(null, true, "class_globals", false);
} }
public anywheresoftware.b4a.keywords.Common __c = null;
public void innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
return BA.SubDelegator.SubNotFound;
}
public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null; public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public anywheresoftware.b4a.objects.PanelWrapper _pnlclock = null; public anywheresoftware.b4a.objects.PanelWrapper _pnlclock = null;
public anywheresoftware.b4a.objects.B4XCanvas _cvsclock = null; public anywheresoftware.b4a.objects.B4XCanvas _cvsclock = null;
public float _clockdiameter = 0f; public float _clockdiameter = 0f;
public float _centerx = 0f; public float _centerx = 0f;
public float _centery = 0f; public float _centery = 0f;
public anywheresoftware.b4a.objects.collections.List _intervals = null; public anywheresoftware.b4a.objects.collections.List _segments = null;
public float _quadrantstrokewidth = 0f; public float _quadrantstrokewidth = 0f;
public float _hourtickstrokewidth = 0f; public float _hourtickstrokewidth = 0f;
public float _minutetickstrokewidth = 0f; public float _minutetickstrokewidth = 0f;
public float _intervalarcstrokewidth = 0f; public float _intervalarcstrokewidth = 0f;
public float _hourhandstrokewidth = 0f; public float _hourhandstrokewidth = 0f;
public float _minutehandstrokewidth = 0f; public float _minutehandstrokewidth = 0f;
public long _basedurationms = 0L;
public long _activedurationms = 0L;
public int _activecolor = 0;
public boolean _activeispause = false;
public boolean _hasactivesegment = false;
public b4a.example.main _main = null; public b4a.example.main _main = null;
public b4a.example.starter _starter = null; public b4a.example.starter _starter = null;
public String _initialize(b4a.example.analogclock __ref,anywheresoftware.b4a.BA _ba,anywheresoftware.b4a.objects.PanelWrapper _parentpanel,float _percentageofwidth) throws Exception{ public b4a.example.localization _localization = null;
__ref = this; public String _addsegment(long _durationms,int _segmentcolor,boolean _ispause) throws Exception{
innerInitialize(_ba); anywheresoftware.b4a.objects.collections.Map _segment = null;
RDebugUtils.currentModule="analogclock"; //BA.debugLineNum = 50;BA.debugLine="Public Sub AddSegment(DurationMs As Long, SegmentC";
if (Debug.shouldDelegate(ba, "initialize", false)) //BA.debugLineNum = 51;BA.debugLine="If DurationMs <= 0 Then Return";
{return ((String) Debug.delegate(ba, "initialize", new Object[] {_ba,_parentpanel,_percentageofwidth}));} if (_durationms<=0) {
anywheresoftware.b4a.objects.collections.Map _interval = null; if (true) return "";};
RDebugUtils.currentLine=1376256; //BA.debugLineNum = 52;BA.debugLine="Dim segment As Map";
//BA.debugLineNum = 1376256;BA.debugLine="Public Sub Initialize(ParentPanel As Panel, Percen"; _segment = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=1376257; //BA.debugLineNum = 53;BA.debugLine="segment.Initialize";
//BA.debugLineNum = 1376257;BA.debugLine="pnlClock = ParentPanel"; _segment.Initialize();
__ref._pnlclock /*anywheresoftware.b4a.objects.PanelWrapper*/ = _parentpanel; //BA.debugLineNum = 54;BA.debugLine="segment.Put(\"duration\", DurationMs)";
RDebugUtils.currentLine=1376258; _segment.Put((Object)("duration"),(Object)(_durationms));
//BA.debugLineNum = 1376258;BA.debugLine="cvsClock.Initialize(pnlClock)"; //BA.debugLineNum = 55;BA.debugLine="segment.Put(\"color\", SegmentColor)";
__ref._cvsclock /*anywheresoftware.b4a.objects.B4XCanvas*/ .Initialize((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__ref._pnlclock /*anywheresoftware.b4a.objects.PanelWrapper*/ .getObject()))); _segment.Put((Object)("color"),(Object)(_segmentcolor));
RDebugUtils.currentLine=1376259; //BA.debugLineNum = 56;BA.debugLine="segment.Put(\"pause\", IsPause)";
//BA.debugLineNum = 1376259;BA.debugLine="intervals.Initialize"; _segment.Put((Object)("pause"),(Object)(_ispause));
__ref._intervals /*anywheresoftware.b4a.objects.collections.List*/ .Initialize(); //BA.debugLineNum = 57;BA.debugLine="segments.Add(segment)";
RDebugUtils.currentLine=1376260; _segments.Add((Object)(_segment.getObject()));
//BA.debugLineNum = 1376260;BA.debugLine="Dim interval As Map"; //BA.debugLineNum = 58;BA.debugLine="DrawClock";
_interval = new anywheresoftware.b4a.objects.collections.Map(); _drawclock();
RDebugUtils.currentLine=1376261; //BA.debugLineNum = 59;BA.debugLine="End Sub";
//BA.debugLineNum = 1376261;BA.debugLine="interval.Initialize";
_interval.Initialize();
RDebugUtils.currentLine=1376262;
//BA.debugLineNum = 1376262;BA.debugLine="interval.Put(\"startHour\", 8)";
_interval.Put((Object)("startHour"),(Object)(8));
RDebugUtils.currentLine=1376263;
//BA.debugLineNum = 1376263;BA.debugLine="interval.Put(\"startMinute\", 0)";
_interval.Put((Object)("startMinute"),(Object)(0));
RDebugUtils.currentLine=1376264;
//BA.debugLineNum = 1376264;BA.debugLine="interval.Put(\"endHour\", 12)";
_interval.Put((Object)("endHour"),(Object)(12));
RDebugUtils.currentLine=1376265;
//BA.debugLineNum = 1376265;BA.debugLine="interval.Put(\"endMinute\", 0)";
_interval.Put((Object)("endMinute"),(Object)(0));
RDebugUtils.currentLine=1376266;
//BA.debugLineNum = 1376266;BA.debugLine="interval.Put(\"color\", Colors.Magenta)";
_interval.Put((Object)("color"),(Object)(__c.Colors.Magenta));
RDebugUtils.currentLine=1376267;
//BA.debugLineNum = 1376267;BA.debugLine="interval.Put(\"radius\",(clockDiameter/2 +25dip))";
_interval.Put((Object)("radius"),(Object)((__ref._clockdiameter /*float*/ /(double)2+__c.DipToCurrent((int) (25)))));
RDebugUtils.currentLine=1376268;
//BA.debugLineNum = 1376268;BA.debugLine="interval.Put(\"strokeWidth\", 5dip)";
_interval.Put((Object)("strokeWidth"),(Object)(__c.DipToCurrent((int) (5))));
RDebugUtils.currentLine=1376269;
//BA.debugLineNum = 1376269;BA.debugLine="interval.Put(\"period\", \"mattino\")";
_interval.Put((Object)("period"),(Object)("mattino"));
RDebugUtils.currentLine=1376270;
//BA.debugLineNum = 1376270;BA.debugLine="intervals.Add(interval)";
__ref._intervals /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(_interval.getObject()));
RDebugUtils.currentLine=1376272;
//BA.debugLineNum = 1376272;BA.debugLine="interval.Initialize";
_interval.Initialize();
RDebugUtils.currentLine=1376273;
//BA.debugLineNum = 1376273;BA.debugLine="interval.Put(\"startHour\", 13)";
_interval.Put((Object)("startHour"),(Object)(13));
RDebugUtils.currentLine=1376274;
//BA.debugLineNum = 1376274;BA.debugLine="interval.Put(\"startMinute\", 0)";
_interval.Put((Object)("startMinute"),(Object)(0));
RDebugUtils.currentLine=1376275;
//BA.debugLineNum = 1376275;BA.debugLine="interval.Put(\"endHour\", 17)";
_interval.Put((Object)("endHour"),(Object)(17));
RDebugUtils.currentLine=1376276;
//BA.debugLineNum = 1376276;BA.debugLine="interval.Put(\"endMinute\", 0)";
_interval.Put((Object)("endMinute"),(Object)(0));
RDebugUtils.currentLine=1376277;
//BA.debugLineNum = 1376277;BA.debugLine="interval.Put(\"color\", Colors.Green)";
_interval.Put((Object)("color"),(Object)(__c.Colors.Green));
RDebugUtils.currentLine=1376278;
//BA.debugLineNum = 1376278;BA.debugLine="interval.Put(\"radius\", (clockDiameter/2 )+25dip)";
_interval.Put((Object)("radius"),(Object)((__ref._clockdiameter /*float*/ /(double)2)+__c.DipToCurrent((int) (25))));
RDebugUtils.currentLine=1376279;
//BA.debugLineNum = 1376279;BA.debugLine="interval.Put(\"strokeWidth\", 5dip)";
_interval.Put((Object)("strokeWidth"),(Object)(__c.DipToCurrent((int) (5))));
RDebugUtils.currentLine=1376280;
//BA.debugLineNum = 1376280;BA.debugLine="interval.Put(\"period\", \"pomeriggio\")";
_interval.Put((Object)("period"),(Object)("pomeriggio"));
RDebugUtils.currentLine=1376281;
//BA.debugLineNum = 1376281;BA.debugLine="intervals.Add(interval)";
__ref._intervals /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(_interval.getObject()));
RDebugUtils.currentLine=1376283;
//BA.debugLineNum = 1376283;BA.debugLine="SetClockSize(PercentageOfWidth)";
__ref._setclocksize /*String*/ (null,_percentageofwidth);
RDebugUtils.currentLine=1376284;
//BA.debugLineNum = 1376284;BA.debugLine="End Sub";
return ""; return "";
} }
public String _drawclock(b4a.example.analogclock __ref) throws Exception{ public String _class_globals() throws Exception{
__ref = this; //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentModule="analogclock"; //BA.debugLineNum = 2;BA.debugLine="Private xui As XUI";
if (Debug.shouldDelegate(ba, "drawclock", false)) _xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
{return ((String) Debug.delegate(ba, "drawclock", null));} //BA.debugLineNum = 4;BA.debugLine="Private pnlClock As Panel ' Pannello in c";
anywheresoftware.b4a.objects.collections.Map _interval = null; _pnlclock = new anywheresoftware.b4a.objects.PanelWrapper();
//BA.debugLineNum = 5;BA.debugLine="Private cvsClock As B4XCanvas ' Canvas per";
_cvsclock = new anywheresoftware.b4a.objects.B4XCanvas();
//BA.debugLineNum = 6;BA.debugLine="Private clockDiameter As Float ' Diametro dell";
_clockdiameter = 0f;
//BA.debugLineNum = 7;BA.debugLine="Private centerX As Float ' Coordinata X";
_centerx = 0f;
//BA.debugLineNum = 8;BA.debugLine="Private centerY As Float ' Coordinata Y";
_centery = 0f;
//BA.debugLineNum = 9;BA.debugLine="Private segments As List ' Segmenti cron";
_segments = new anywheresoftware.b4a.objects.collections.List();
//BA.debugLineNum = 12;BA.debugLine="Private quadrantStrokeWidth As Float = 5dip";
_quadrantstrokewidth = (float) (__c.DipToCurrent((int) (5)));
//BA.debugLineNum = 13;BA.debugLine="Private hourTickStrokeWidth As Float = 5dip";
_hourtickstrokewidth = (float) (__c.DipToCurrent((int) (5)));
//BA.debugLineNum = 14;BA.debugLine="Private minuteTickStrokeWidth As Float = 2dip";
_minutetickstrokewidth = (float) (__c.DipToCurrent((int) (2)));
//BA.debugLineNum = 15;BA.debugLine="Private intervalArcStrokeWidth As Float = 5dip";
_intervalarcstrokewidth = (float) (__c.DipToCurrent((int) (5)));
//BA.debugLineNum = 16;BA.debugLine="Private hourHandStrokeWidth As Float = 8dip";
_hourhandstrokewidth = (float) (__c.DipToCurrent((int) (8)));
//BA.debugLineNum = 17;BA.debugLine="Private minuteHandStrokeWidth As Float = 5dip";
_minutehandstrokewidth = (float) (__c.DipToCurrent((int) (5)));
//BA.debugLineNum = 18;BA.debugLine="Private baseDurationMs As Long";
_basedurationms = 0L;
//BA.debugLineNum = 19;BA.debugLine="Private activeDurationMs As Long";
_activedurationms = 0L;
//BA.debugLineNum = 20;BA.debugLine="Private activeColor As Int";
_activecolor = 0;
//BA.debugLineNum = 21;BA.debugLine="Private activeIsPause As Boolean";
_activeispause = false;
//BA.debugLineNum = 22;BA.debugLine="Private hasActiveSegment As Boolean";
_hasactivesegment = false;
//BA.debugLineNum = 23;BA.debugLine="End Sub";
return "";
}
public String _clearactivesegment() throws Exception{
//BA.debugLineNum = 70;BA.debugLine="Public Sub ClearActiveSegment";
//BA.debugLineNum = 71;BA.debugLine="hasActiveSegment = False";
_hasactivesegment = __c.False;
//BA.debugLineNum = 72;BA.debugLine="activeDurationMs = 0";
_activedurationms = (long) (0);
//BA.debugLineNum = 73;BA.debugLine="DrawClock";
_drawclock();
//BA.debugLineNum = 74;BA.debugLine="End Sub";
return "";
}
public String _clearcanvas(int _color) throws Exception{
//BA.debugLineNum = 96;BA.debugLine="Private Sub ClearCanvas(color As Int)";
//BA.debugLineNum = 97;BA.debugLine="cvsClock.DrawRect(cvsClock.TargetRect, color, Tru";
_cvsclock.DrawRect(_cvsclock.getTargetRect(),_color,__c.True,(float) (0));
//BA.debugLineNum = 98;BA.debugLine="cvsClock.Invalidate";
_cvsclock.Invalidate();
//BA.debugLineNum = 99;BA.debugLine="End Sub";
return "";
}
public String _clearsegments() throws Exception{
//BA.debugLineNum = 41;BA.debugLine="Public Sub ClearSegments";
//BA.debugLineNum = 42;BA.debugLine="If segments.IsInitialized = False Then segments.I";
if (_segments.IsInitialized()==__c.False) {
_segments.Initialize();};
//BA.debugLineNum = 43;BA.debugLine="segments.Clear";
_segments.Clear();
//BA.debugLineNum = 44;BA.debugLine="hasActiveSegment = False";
_hasactivesegment = __c.False;
//BA.debugLineNum = 45;BA.debugLine="activeDurationMs = 0";
_activedurationms = (long) (0);
//BA.debugLineNum = 46;BA.debugLine="DrawClock";
_drawclock();
//BA.debugLineNum = 47;BA.debugLine="End Sub";
return "";
}
public String _drawclock() throws Exception{
long _now = 0L; long _now = 0L;
int _hours = 0; int _hours = 0;
int _minutes = 0; int _minutes = 0;
@@ -147,434 +153,321 @@ int _seconds = 0;
float _hourangle = 0f; float _hourangle = 0f;
float _minuteangle = 0f; float _minuteangle = 0f;
float _secondangle = 0f; float _secondangle = 0f;
RDebugUtils.currentLine=1638400; //BA.debugLineNum = 102;BA.debugLine="Public Sub DrawClock";
//BA.debugLineNum = 1638400;BA.debugLine="Public Sub DrawClock"; //BA.debugLineNum = 103;BA.debugLine="cvsClock.Initialize(pnlClock)";
RDebugUtils.currentLine=1638401; _cvsclock.Initialize((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_pnlclock.getObject())));
//BA.debugLineNum = 1638401;BA.debugLine="cvsClock.Initialize(pnlClock)"; //BA.debugLineNum = 106;BA.debugLine="ClearCanvas(Colors.White)";
__ref._cvsclock /*anywheresoftware.b4a.objects.B4XCanvas*/ .Initialize((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(__ref._pnlclock /*anywheresoftware.b4a.objects.PanelWrapper*/ .getObject()))); _clearcanvas(__c.Colors.White);
RDebugUtils.currentLine=1638404; //BA.debugLineNum = 109;BA.debugLine="cvsClock.DrawCircle(centerX, centerY, clockDia";
//BA.debugLineNum = 1638404;BA.debugLine="ClearCanvas(Colors.White)"; _cvsclock.DrawCircle(_centerx,_centery,(float) (_clockdiameter/(double)2),__c.Colors.Black,__c.False,_quadrantstrokewidth);
__ref._clearcanvas /*String*/ (null,__c.Colors.White); //BA.debugLineNum = 112;BA.debugLine="DrawSegments";
RDebugUtils.currentLine=1638407; _drawsegments();
//BA.debugLineNum = 1638407;BA.debugLine="cvsClock.DrawCircle(centerX, centerY, clockDia"; //BA.debugLineNum = 115;BA.debugLine="DrawTicks";
__ref._cvsclock /*anywheresoftware.b4a.objects.B4XCanvas*/ .DrawCircle(__ref._centerx /*float*/ ,__ref._centery /*float*/ ,(float) (__ref._clockdiameter /*float*/ /(double)2),__c.Colors.Black,__c.False,__ref._quadrantstrokewidth /*float*/ ); _drawticks();
RDebugUtils.currentLine=1638410; //BA.debugLineNum = 118;BA.debugLine="Dim now As Long = DateTime.Now";
//BA.debugLineNum = 1638410;BA.debugLine="DrawTicks"; _now = __c.DateTime.getNow();
__ref._drawticks /*String*/ (null); //BA.debugLineNum = 119;BA.debugLine="Dim Hours As Int = DateTime.GetHour(now) Mod 1";
RDebugUtils.currentLine=1638413; _hours = (int) (__c.DateTime.GetHour(_now)%12);
//BA.debugLineNum = 1638413;BA.debugLine="For Each interval As Map In intervals"; //BA.debugLineNum = 120;BA.debugLine="Dim Minutes As Int = DateTime.GetMinute(now)";
_interval = new anywheresoftware.b4a.objects.collections.Map(); _minutes = __c.DateTime.GetMinute(_now);
//BA.debugLineNum = 121;BA.debugLine="Dim Seconds As Int = DateTime.GetSecond(now)";
_seconds = __c.DateTime.GetSecond(_now);
//BA.debugLineNum = 124;BA.debugLine="Dim HourAngle As Float = -90 + Hours * 30 + Mi";
_hourangle = (float) (-90+_hours*30+_minutes/(double)2);
//BA.debugLineNum = 125;BA.debugLine="DrawHand(centerX, centerY, clockDiameter * 0.2";
_drawhand(_centerx,_centery,(float) (_clockdiameter*0.25),_hourangle,_hourhandstrokewidth,__c.Colors.Black);
//BA.debugLineNum = 128;BA.debugLine="Dim MinuteAngle As Float = -90 + Minutes * 6";
_minuteangle = (float) (-90+_minutes*6);
//BA.debugLineNum = 129;BA.debugLine="DrawHand(centerX, centerY, clockDiameter * 0.4";
_drawhand(_centerx,_centery,(float) (_clockdiameter*0.4),_minuteangle,_minutehandstrokewidth,__c.Colors.Blue);
//BA.debugLineNum = 132;BA.debugLine="Dim SecondAngle As Float = -90 + Seconds * 6";
_secondangle = (float) (-90+_seconds*6);
//BA.debugLineNum = 133;BA.debugLine="DrawHand(centerX, centerY, clockDiameter * 0.4";
_drawhand(_centerx,_centery,(float) (_clockdiameter*0.45),_secondangle,(float) (__c.DipToCurrent((int) (2))),__c.Colors.Red);
//BA.debugLineNum = 136;BA.debugLine="pnlClock.Invalidate";
_pnlclock.Invalidate();
//BA.debugLineNum = 137;BA.debugLine="End Sub";
return "";
}
public String _drawhand(float _x,float _y,float _length,float _angle,float _width,int _color) throws Exception{
float _endx = 0f;
float _endy = 0f;
//BA.debugLineNum = 185;BA.debugLine="Private Sub DrawHand(x As Float, y As Float, lengt";
//BA.debugLineNum = 186;BA.debugLine="Dim endX As Float = x + length * CosD(angle)";
_endx = (float) (_x+_length*__c.CosD(_angle));
//BA.debugLineNum = 187;BA.debugLine="Dim endY As Float = y + length * SinD(angle)";
_endy = (float) (_y+_length*__c.SinD(_angle));
//BA.debugLineNum = 188;BA.debugLine="cvsClock.DrawLine(x, y, endX, endY, color, wid";
_cvsclock.DrawLine(_x,_y,_endx,_endy,_color,_width);
//BA.debugLineNum = 189;BA.debugLine="End Sub";
return "";
}
public String _drawpiesegment(float _startangle,float _sweepangle,int _color,float _radius) throws Exception{
int _steps = 0;
anywheresoftware.b4a.objects.B4XCanvas.B4XPath _path = null;
int _i = 0;
float _angle = 0f;
float _x = 0f;
float _y = 0f;
//BA.debugLineNum = 169;BA.debugLine="Private Sub DrawPieSegment(startAngle As Float, sw";
//BA.debugLineNum = 170;BA.debugLine="If sweepAngle <= 0 Then Return";
if (_sweepangle<=0) {
if (true) return "";};
//BA.debugLineNum = 171;BA.debugLine="Dim steps As Int = Max(2, Ceil(sweepAngle / 4))";
_steps = (int) (__c.Max(2,__c.Ceil(_sweepangle/(double)4)));
//BA.debugLineNum = 172;BA.debugLine="Dim path As B4XPath";
_path = new anywheresoftware.b4a.objects.B4XCanvas.B4XPath();
//BA.debugLineNum = 173;BA.debugLine="path.Initialize(centerX, centerY)";
_path.Initialize(_centerx,_centery);
//BA.debugLineNum = 174;BA.debugLine="For i = 0 To steps";
{ {
final anywheresoftware.b4a.BA.IterableList group5 = __ref._intervals /*anywheresoftware.b4a.objects.collections.List*/ ; final int step5 = 1;
final int groupLen5 = group5.getSize() final int limit5 = _steps;
;int index5 = 0; _i = (int) (0) ;
; for (;_i <= limit5 ;_i = _i + step5 ) {
for (; index5 < groupLen5;index5++){ //BA.debugLineNum = 175;BA.debugLine="Dim angle As Float = startAngle + sweepAngle * i";
_interval = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(group5.Get(index5))); _angle = (float) (_startangle+_sweepangle*_i/(double)_steps);
RDebugUtils.currentLine=1638414; //BA.debugLineNum = 176;BA.debugLine="Dim x As Float = centerX + radius * CosD(angle)";
//BA.debugLineNum = 1638414;BA.debugLine="DrawInterval(interval.Get(\"startHour\"), in"; _x = (float) (_centerx+_radius*__c.CosD(_angle));
__ref._drawinterval /*String*/ (null,(int)(BA.ObjectToNumber(_interval.Get((Object)("startHour")))),(int)(BA.ObjectToNumber(_interval.Get((Object)("startMinute")))),(int)(BA.ObjectToNumber(_interval.Get((Object)("endHour")))),(int)(BA.ObjectToNumber(_interval.Get((Object)("endMinute")))),(int)(BA.ObjectToNumber(_interval.Get((Object)("color")))),(float)(BA.ObjectToNumber(_interval.Get((Object)("radius")))),(float)(BA.ObjectToNumber(_interval.Get((Object)("strokeWidth"))))); //BA.debugLineNum = 177;BA.debugLine="Dim y As Float = centerY + radius * SinD(angle)";
_y = (float) (_centery+_radius*__c.SinD(_angle));
//BA.debugLineNum = 178;BA.debugLine="path.LineTo(x, y)";
_path.LineTo(_x,_y);
} }
}; };
RDebugUtils.currentLine=1638418; //BA.debugLineNum = 180;BA.debugLine="path.LineTo(centerX, centerY)";
//BA.debugLineNum = 1638418;BA.debugLine="Dim now As Long = DateTime.Now"; _path.LineTo(_centerx,_centery);
_now = __c.DateTime.getNow(); //BA.debugLineNum = 181;BA.debugLine="cvsClock.DrawPath(path, color, True, 0)";
RDebugUtils.currentLine=1638419; _cvsclock.DrawPath(_path,_color,__c.True,(float) (0));
//BA.debugLineNum = 1638419;BA.debugLine="Dim Hours As Int = DateTime.GetHour(now) Mod 1"; //BA.debugLineNum = 182;BA.debugLine="End Sub";
_hours = (int) (__c.DateTime.GetHour(_now)%12);
RDebugUtils.currentLine=1638420;
//BA.debugLineNum = 1638420;BA.debugLine="Dim Minutes As Int = DateTime.GetMinute(now)";
_minutes = __c.DateTime.GetMinute(_now);
RDebugUtils.currentLine=1638421;
//BA.debugLineNum = 1638421;BA.debugLine="Dim Seconds As Int = DateTime.GetSecond(now)";
_seconds = __c.DateTime.GetSecond(_now);
RDebugUtils.currentLine=1638424;
//BA.debugLineNum = 1638424;BA.debugLine="Dim HourAngle As Float = -90 + Hours * 30 + Mi";
_hourangle = (float) (-90+_hours*30+_minutes/(double)2);
RDebugUtils.currentLine=1638425;
//BA.debugLineNum = 1638425;BA.debugLine="DrawHand(centerX, centerY, clockDiameter * 0.2";
__ref._drawhand /*String*/ (null,__ref._centerx /*float*/ ,__ref._centery /*float*/ ,(float) (__ref._clockdiameter /*float*/ *0.25),_hourangle,__ref._hourhandstrokewidth /*float*/ ,__c.Colors.Black);
RDebugUtils.currentLine=1638428;
//BA.debugLineNum = 1638428;BA.debugLine="Dim MinuteAngle As Float = -90 + Minutes * 6";
_minuteangle = (float) (-90+_minutes*6);
RDebugUtils.currentLine=1638429;
//BA.debugLineNum = 1638429;BA.debugLine="DrawHand(centerX, centerY, clockDiameter * 0.4";
__ref._drawhand /*String*/ (null,__ref._centerx /*float*/ ,__ref._centery /*float*/ ,(float) (__ref._clockdiameter /*float*/ *0.4),_minuteangle,__ref._minutehandstrokewidth /*float*/ ,__c.Colors.Blue);
RDebugUtils.currentLine=1638432;
//BA.debugLineNum = 1638432;BA.debugLine="Dim SecondAngle As Float = -90 + Seconds * 6";
_secondangle = (float) (-90+_seconds*6);
RDebugUtils.currentLine=1638433;
//BA.debugLineNum = 1638433;BA.debugLine="DrawHand(centerX, centerY, clockDiameter * 0.4";
__ref._drawhand /*String*/ (null,__ref._centerx /*float*/ ,__ref._centery /*float*/ ,(float) (__ref._clockdiameter /*float*/ *0.45),_secondangle,(float) (__c.DipToCurrent((int) (2))),__c.Colors.Red);
RDebugUtils.currentLine=1638436;
//BA.debugLineNum = 1638436;BA.debugLine="pnlClock.Invalidate";
__ref._pnlclock /*anywheresoftware.b4a.objects.PanelWrapper*/ .Invalidate();
RDebugUtils.currentLine=1638437;
//BA.debugLineNum = 1638437;BA.debugLine="End Sub";
return ""; return "";
} }
public String _addinterval(b4a.example.analogclock __ref,int _starthour,int _startminute,int _endhour,int _endminute,String _tipo) throws Exception{ public String _drawsegments() throws Exception{
__ref = this; long _totalpausems = 0L;
RDebugUtils.currentModule="analogclock"; long _totalrecordedms = 0L;
if (Debug.shouldDelegate(ba, "addinterval", false)) anywheresoftware.b4a.objects.collections.Map _segment = null;
{return ((String) Debug.delegate(ba, "addinterval", new Object[] {_starthour,_startminute,_endhour,_endminute,_tipo}));} long _duration = 0L;
anywheresoftware.b4a.objects.collections.Map _interval = null; long _totaldisplayms = 0L;
RDebugUtils.currentLine=1835008; float _startangle = 0f;
//BA.debugLineNum = 1835008;BA.debugLine="Public Sub AddInterval(startHour As Int, startMinu"; float _radius = 0f;
RDebugUtils.currentLine=1835009; float _sweepangle = 0f;
//BA.debugLineNum = 1835009;BA.debugLine="Dim interval As Map"; float _activesweepangle = 0f;
_interval = new anywheresoftware.b4a.objects.collections.Map(); //BA.debugLineNum = 139;BA.debugLine="Private Sub DrawSegments";
RDebugUtils.currentLine=1835010; //BA.debugLineNum = 140;BA.debugLine="If segments.IsInitialized = False Then Return";
//BA.debugLineNum = 1835010;BA.debugLine="interval.Initialize"; if (_segments.IsInitialized()==__c.False) {
_interval.Initialize(); if (true) return "";};
RDebugUtils.currentLine=1835011; //BA.debugLineNum = 141;BA.debugLine="Dim totalPauseMs As Long = 0";
//BA.debugLineNum = 1835011;BA.debugLine="interval.Put(\"startHour\", startHour)"; _totalpausems = (long) (0);
_interval.Put((Object)("startHour"),(Object)(_starthour)); //BA.debugLineNum = 142;BA.debugLine="Dim totalRecordedMs As Long = 0";
RDebugUtils.currentLine=1835012; _totalrecordedms = (long) (0);
//BA.debugLineNum = 1835012;BA.debugLine="interval.Put(\"startMinute\", startMinute)"; //BA.debugLineNum = 143;BA.debugLine="For Each segment As Map In segments";
_interval.Put((Object)("startMinute"),(Object)(_startminute)); _segment = new anywheresoftware.b4a.objects.collections.Map();
RDebugUtils.currentLine=1835013; {
//BA.debugLineNum = 1835013;BA.debugLine="interval.Put(\"endHour\", endHour)"; final anywheresoftware.b4a.BA.IterableList group4 = _segments;
_interval.Put((Object)("endHour"),(Object)(_endhour)); final int groupLen4 = group4.getSize()
RDebugUtils.currentLine=1835014; ;int index4 = 0;
//BA.debugLineNum = 1835014;BA.debugLine="interval.Put(\"endMinute\", endMinute)";
_interval.Put((Object)("endMinute"),(Object)(_endminute));
RDebugUtils.currentLine=1835015;
//BA.debugLineNum = 1835015;BA.debugLine="Select tipo.ToLowerCase";
switch (BA.switchObjectToInt(_tipo.toLowerCase(),"mattino","pomeriggio")) {
case 0: {
RDebugUtils.currentLine=1835017;
//BA.debugLineNum = 1835017;BA.debugLine="interval.Put(\"color\", Colors.Blue)";
_interval.Put((Object)("color"),(Object)(__c.Colors.Blue));
RDebugUtils.currentLine=1835018;
//BA.debugLineNum = 1835018;BA.debugLine="interval.Put(\"radius\", clockDiameter /";
_interval.Put((Object)("radius"),(Object)(__ref._clockdiameter /*float*/ /(double)2-__c.DipToCurrent((int) (15))));
RDebugUtils.currentLine=1835019;
//BA.debugLineNum = 1835019;BA.debugLine="interval.Put(\"strokeWidth\", intervalAr";
_interval.Put((Object)("strokeWidth"),(Object)(__ref._intervalarcstrokewidth /*float*/ ));
break; }
case 1: {
RDebugUtils.currentLine=1835021;
//BA.debugLineNum = 1835021;BA.debugLine="interval.Put(\"color\", Colors.Green)";
_interval.Put((Object)("color"),(Object)(__c.Colors.Green));
RDebugUtils.currentLine=1835022;
//BA.debugLineNum = 1835022;BA.debugLine="interval.Put(\"radius\", clockDiameter /";
_interval.Put((Object)("radius"),(Object)(__ref._clockdiameter /*float*/ /(double)2-__c.DipToCurrent((int) (25))));
RDebugUtils.currentLine=1835023;
//BA.debugLineNum = 1835023;BA.debugLine="interval.Put(\"strokeWidth\", intervalAr";
_interval.Put((Object)("strokeWidth"),(Object)(__ref._intervalarcstrokewidth /*float*/ ));
break; }
default: {
RDebugUtils.currentLine=1835025;
//BA.debugLineNum = 1835025;BA.debugLine="Log(\"Tipo di intervallo non riconosciu";
__c.LogImpl("31835025","Tipo di intervallo non riconosciuto: "+_tipo,0);
RDebugUtils.currentLine=1835026;
//BA.debugLineNum = 1835026;BA.debugLine="Return";
if (true) return "";
break; }
}
; ;
RDebugUtils.currentLine=1835028; for (; index4 < groupLen4;index4++){
//BA.debugLineNum = 1835028;BA.debugLine="intervals.Add(interval)"; _segment = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(group4.Get(index4)));
__ref._intervals /*anywheresoftware.b4a.objects.collections.List*/ .Add((Object)(_interval.getObject())); //BA.debugLineNum = 144;BA.debugLine="Dim duration As Long = segment.Get(\"duration\")";
RDebugUtils.currentLine=1835029; _duration = BA.ObjectToLongNumber(_segment.Get((Object)("duration")));
//BA.debugLineNum = 1835029;BA.debugLine="DrawClock"; //BA.debugLineNum = 145;BA.debugLine="totalRecordedMs = totalRecordedMs + duration";
__ref._drawclock /*String*/ (null); _totalrecordedms = (long) (_totalrecordedms+_duration);
RDebugUtils.currentLine=1835030; //BA.debugLineNum = 146;BA.debugLine="If segment.Get(\"pause\") = True Then totalPauseMs";
//BA.debugLineNum = 1835030;BA.debugLine="End Sub"; if ((_segment.Get((Object)("pause"))).equals((Object)(__c.True))) {
_totalpausems = (long) (_totalpausems+_duration);};
}
};
//BA.debugLineNum = 148;BA.debugLine="If hasActiveSegment Then";
if (_hasactivesegment) {
//BA.debugLineNum = 149;BA.debugLine="totalRecordedMs = totalRecordedMs + activeDurati";
_totalrecordedms = (long) (_totalrecordedms+_activedurationms);
//BA.debugLineNum = 150;BA.debugLine="If activeIsPause Then totalPauseMs = totalPauseM";
if (_activeispause) {
_totalpausems = (long) (_totalpausems+_activedurationms);};
};
//BA.debugLineNum = 153;BA.debugLine="Dim totalDisplayMs As Long = Max(baseDurationMs,";
_totaldisplayms = (long) (__c.Max(_basedurationms,_totalrecordedms));
//BA.debugLineNum = 154;BA.debugLine="If totalDisplayMs <= 0 Then Return";
if (_totaldisplayms<=0) {
if (true) return "";};
//BA.debugLineNum = 156;BA.debugLine="Dim startAngle As Float = -90";
_startangle = (float) (-90);
//BA.debugLineNum = 157;BA.debugLine="Dim radius As Float = clockDiameter / 2 - 22dip";
_radius = (float) (_clockdiameter/(double)2-__c.DipToCurrent((int) (22)));
//BA.debugLineNum = 158;BA.debugLine="For Each segment As Map In segments";
_segment = new anywheresoftware.b4a.objects.collections.Map();
{
final anywheresoftware.b4a.BA.IterableList group17 = _segments;
final int groupLen17 = group17.getSize()
;int index17 = 0;
;
for (; index17 < groupLen17;index17++){
_segment = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(group17.Get(index17)));
//BA.debugLineNum = 159;BA.debugLine="Dim sweepAngle As Float = 360 * segment.Get(\"dur";
_sweepangle = (float) (360*(double)(BA.ObjectToNumber(_segment.Get((Object)("duration"))))/(double)_totaldisplayms);
//BA.debugLineNum = 160;BA.debugLine="DrawPieSegment(startAngle, sweepAngle, segment.G";
_drawpiesegment(_startangle,_sweepangle,(int)(BA.ObjectToNumber(_segment.Get((Object)("color")))),_radius);
//BA.debugLineNum = 161;BA.debugLine="startAngle = startAngle + sweepAngle";
_startangle = (float) (_startangle+_sweepangle);
}
};
//BA.debugLineNum = 163;BA.debugLine="If hasActiveSegment Then";
if (_hasactivesegment) {
//BA.debugLineNum = 164;BA.debugLine="Dim activeSweepAngle As Float = 360 * activeDura";
_activesweepangle = (float) (360*_activedurationms/(double)_totaldisplayms);
//BA.debugLineNum = 165;BA.debugLine="DrawPieSegment(startAngle, activeSweepAngle, act";
_drawpiesegment(_startangle,_activesweepangle,_activecolor,_radius);
};
//BA.debugLineNum = 167;BA.debugLine="End Sub";
return ""; return "";
} }
public String _class_globals(b4a.example.analogclock __ref) throws Exception{ public String _drawticks() throws Exception{
__ref = this;
RDebugUtils.currentModule="analogclock";
RDebugUtils.currentLine=1310720;
//BA.debugLineNum = 1310720;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=1310721;
//BA.debugLineNum = 1310721;BA.debugLine="Private xui As XUI";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=1310723;
//BA.debugLineNum = 1310723;BA.debugLine="Private pnlClock As Panel ' Pannello in c";
_pnlclock = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=1310724;
//BA.debugLineNum = 1310724;BA.debugLine="Private cvsClock As B4XCanvas ' Canvas per";
_cvsclock = new anywheresoftware.b4a.objects.B4XCanvas();
RDebugUtils.currentLine=1310725;
//BA.debugLineNum = 1310725;BA.debugLine="Private clockDiameter As Float ' Diametro dell";
_clockdiameter = 0f;
RDebugUtils.currentLine=1310726;
//BA.debugLineNum = 1310726;BA.debugLine="Private centerX As Float ' Coordinata X";
_centerx = 0f;
RDebugUtils.currentLine=1310727;
//BA.debugLineNum = 1310727;BA.debugLine="Private centerY As Float ' Coordinata Y";
_centery = 0f;
RDebugUtils.currentLine=1310728;
//BA.debugLineNum = 1310728;BA.debugLine="Private intervals As List ' Lista degli i";
_intervals = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=1310731;
//BA.debugLineNum = 1310731;BA.debugLine="Private quadrantStrokeWidth As Float = 5dip";
_quadrantstrokewidth = (float) (__c.DipToCurrent((int) (5)));
RDebugUtils.currentLine=1310732;
//BA.debugLineNum = 1310732;BA.debugLine="Private hourTickStrokeWidth As Float = 5dip";
_hourtickstrokewidth = (float) (__c.DipToCurrent((int) (5)));
RDebugUtils.currentLine=1310733;
//BA.debugLineNum = 1310733;BA.debugLine="Private minuteTickStrokeWidth As Float = 2dip";
_minutetickstrokewidth = (float) (__c.DipToCurrent((int) (2)));
RDebugUtils.currentLine=1310734;
//BA.debugLineNum = 1310734;BA.debugLine="Private intervalArcStrokeWidth As Float = 5dip";
_intervalarcstrokewidth = (float) (__c.DipToCurrent((int) (5)));
RDebugUtils.currentLine=1310735;
//BA.debugLineNum = 1310735;BA.debugLine="Private hourHandStrokeWidth As Float = 8dip";
_hourhandstrokewidth = (float) (__c.DipToCurrent((int) (8)));
RDebugUtils.currentLine=1310736;
//BA.debugLineNum = 1310736;BA.debugLine="Private minuteHandStrokeWidth As Float = 5dip";
_minutehandstrokewidth = (float) (__c.DipToCurrent((int) (5)));
RDebugUtils.currentLine=1310737;
//BA.debugLineNum = 1310737;BA.debugLine="Private intervals As List";
_intervals = new anywheresoftware.b4a.objects.collections.List();
RDebugUtils.currentLine=1310738;
//BA.debugLineNum = 1310738;BA.debugLine="End Sub";
return "";
}
public String _clearcanvas(b4a.example.analogclock __ref,int _color) throws Exception{
__ref = this;
RDebugUtils.currentModule="analogclock";
if (Debug.shouldDelegate(ba, "clearcanvas", false))
{return ((String) Debug.delegate(ba, "clearcanvas", new Object[] {_color}));}
RDebugUtils.currentLine=1572864;
//BA.debugLineNum = 1572864;BA.debugLine="Private Sub ClearCanvas(color As Int)";
RDebugUtils.currentLine=1572865;
//BA.debugLineNum = 1572865;BA.debugLine="cvsClock.DrawRect(cvsClock.TargetRect, color, Tru";
__ref._cvsclock /*anywheresoftware.b4a.objects.B4XCanvas*/ .DrawRect(__ref._cvsclock /*anywheresoftware.b4a.objects.B4XCanvas*/ .getTargetRect(),_color,__c.True,(float) (0));
RDebugUtils.currentLine=1572866;
//BA.debugLineNum = 1572866;BA.debugLine="cvsClock.Invalidate";
__ref._cvsclock /*anywheresoftware.b4a.objects.B4XCanvas*/ .Invalidate();
RDebugUtils.currentLine=1572867;
//BA.debugLineNum = 1572867;BA.debugLine="End Sub";
return "";
}
public String _drawticks(b4a.example.analogclock __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="analogclock";
if (Debug.shouldDelegate(ba, "drawticks", false))
{return ((String) Debug.delegate(ba, "drawticks", null));}
int _i = 0; int _i = 0;
float _angle = 0f; float _angle = 0f;
float _startx = 0f; float _startx = 0f;
float _starty = 0f; float _starty = 0f;
float _endx = 0f; float _endx = 0f;
float _endy = 0f; float _endy = 0f;
RDebugUtils.currentLine=1769472; //BA.debugLineNum = 191;BA.debugLine="Private Sub DrawTicks";
//BA.debugLineNum = 1769472;BA.debugLine="Private Sub DrawTicks"; //BA.debugLineNum = 192;BA.debugLine="For i = 0 To 59";
RDebugUtils.currentLine=1769473;
//BA.debugLineNum = 1769473;BA.debugLine="For i = 0 To 59";
{ {
final int step1 = 1; final int step1 = 1;
final int limit1 = (int) (59); final int limit1 = (int) (59);
_i = (int) (0) ; _i = (int) (0) ;
for (;_i <= limit1 ;_i = _i + step1 ) { for (;_i <= limit1 ;_i = _i + step1 ) {
RDebugUtils.currentLine=1769474; //BA.debugLineNum = 193;BA.debugLine="Dim angle As Float = -90 + i * 6";
//BA.debugLineNum = 1769474;BA.debugLine="Dim angle As Float = -90 + i * 6";
_angle = (float) (-90+_i*6); _angle = (float) (-90+_i*6);
RDebugUtils.currentLine=1769475; //BA.debugLineNum = 194;BA.debugLine="Dim startX As Float";
//BA.debugLineNum = 1769475;BA.debugLine="Dim startX As Float";
_startx = 0f; _startx = 0f;
RDebugUtils.currentLine=1769476; //BA.debugLineNum = 195;BA.debugLine="Dim startY As Float";
//BA.debugLineNum = 1769476;BA.debugLine="Dim startY As Float";
_starty = 0f; _starty = 0f;
RDebugUtils.currentLine=1769477; //BA.debugLineNum = 196;BA.debugLine="Dim endX As Float";
//BA.debugLineNum = 1769477;BA.debugLine="Dim endX As Float";
_endx = 0f; _endx = 0f;
RDebugUtils.currentLine=1769478; //BA.debugLineNum = 197;BA.debugLine="Dim endY As Float";
//BA.debugLineNum = 1769478;BA.debugLine="Dim endY As Float";
_endy = 0f; _endy = 0f;
RDebugUtils.currentLine=1769479; //BA.debugLineNum = 198;BA.debugLine="If i Mod 5 = 0 Then";
//BA.debugLineNum = 1769479;BA.debugLine="If i Mod 5 = 0 Then";
if (_i%5==0) { if (_i%5==0) {
RDebugUtils.currentLine=1769481; //BA.debugLineNum = 200;BA.debugLine="startX = centerX + (clockDiameter / 2";
//BA.debugLineNum = 1769481;BA.debugLine="startX = centerX + (clockDiameter / 2"; _startx = (float) (_centerx+(_clockdiameter/(double)2-__c.DipToCurrent((int) (20)))*__c.CosD(_angle));
_startx = (float) (__ref._centerx /*float*/ +(__ref._clockdiameter /*float*/ /(double)2-__c.DipToCurrent((int) (20)))*__c.CosD(_angle)); //BA.debugLineNum = 201;BA.debugLine="startY = centerY + (clockDiameter / 2";
RDebugUtils.currentLine=1769482; _starty = (float) (_centery+(_clockdiameter/(double)2-__c.DipToCurrent((int) (20)))*__c.SinD(_angle));
//BA.debugLineNum = 1769482;BA.debugLine="startY = centerY + (clockDiameter / 2"; //BA.debugLineNum = 202;BA.debugLine="endX = centerX + (clockDiameter / 2 -";
_starty = (float) (__ref._centery /*float*/ +(__ref._clockdiameter /*float*/ /(double)2-__c.DipToCurrent((int) (20)))*__c.SinD(_angle)); _endx = (float) (_centerx+(_clockdiameter/(double)2-__c.DipToCurrent((int) (5)))*__c.CosD(_angle));
RDebugUtils.currentLine=1769483; //BA.debugLineNum = 203;BA.debugLine="endY = centerY + (clockDiameter / 2 -";
//BA.debugLineNum = 1769483;BA.debugLine="endX = centerX + (clockDiameter / 2 -"; _endy = (float) (_centery+(_clockdiameter/(double)2-__c.DipToCurrent((int) (5)))*__c.SinD(_angle));
_endx = (float) (__ref._centerx /*float*/ +(__ref._clockdiameter /*float*/ /(double)2-__c.DipToCurrent((int) (5)))*__c.CosD(_angle)); //BA.debugLineNum = 204;BA.debugLine="cvsClock.DrawLine(startX, startY, endX";
RDebugUtils.currentLine=1769484; _cvsclock.DrawLine(_startx,_starty,_endx,_endy,__c.Colors.Black,_hourtickstrokewidth);
//BA.debugLineNum = 1769484;BA.debugLine="endY = centerY + (clockDiameter / 2 -";
_endy = (float) (__ref._centery /*float*/ +(__ref._clockdiameter /*float*/ /(double)2-__c.DipToCurrent((int) (5)))*__c.SinD(_angle));
RDebugUtils.currentLine=1769485;
//BA.debugLineNum = 1769485;BA.debugLine="cvsClock.DrawLine(startX, startY, endX";
__ref._cvsclock /*anywheresoftware.b4a.objects.B4XCanvas*/ .DrawLine(_startx,_starty,_endx,_endy,__c.Colors.Black,__ref._hourtickstrokewidth /*float*/ );
}else { }else {
RDebugUtils.currentLine=1769488; //BA.debugLineNum = 207;BA.debugLine="startX = centerX + (clockDiameter / 2";
//BA.debugLineNum = 1769488;BA.debugLine="startX = centerX + (clockDiameter / 2"; _startx = (float) (_centerx+(_clockdiameter/(double)2-__c.DipToCurrent((int) (10)))*__c.CosD(_angle));
_startx = (float) (__ref._centerx /*float*/ +(__ref._clockdiameter /*float*/ /(double)2-__c.DipToCurrent((int) (10)))*__c.CosD(_angle)); //BA.debugLineNum = 208;BA.debugLine="startY = centerY + (clockDiameter / 2";
RDebugUtils.currentLine=1769489; _starty = (float) (_centery+(_clockdiameter/(double)2-__c.DipToCurrent((int) (10)))*__c.SinD(_angle));
//BA.debugLineNum = 1769489;BA.debugLine="startY = centerY + (clockDiameter / 2"; //BA.debugLineNum = 209;BA.debugLine="endX = centerX + (clockDiameter / 2 -";
_starty = (float) (__ref._centery /*float*/ +(__ref._clockdiameter /*float*/ /(double)2-__c.DipToCurrent((int) (10)))*__c.SinD(_angle)); _endx = (float) (_centerx+(_clockdiameter/(double)2-__c.DipToCurrent((int) (5)))*__c.CosD(_angle));
RDebugUtils.currentLine=1769490; //BA.debugLineNum = 210;BA.debugLine="endY = centerY + (clockDiameter / 2 -";
//BA.debugLineNum = 1769490;BA.debugLine="endX = centerX + (clockDiameter / 2 -"; _endy = (float) (_centery+(_clockdiameter/(double)2-__c.DipToCurrent((int) (5)))*__c.SinD(_angle));
_endx = (float) (__ref._centerx /*float*/ +(__ref._clockdiameter /*float*/ /(double)2-__c.DipToCurrent((int) (5)))*__c.CosD(_angle)); //BA.debugLineNum = 211;BA.debugLine="cvsClock.DrawLine(startX, startY, endX";
RDebugUtils.currentLine=1769491; _cvsclock.DrawLine(_startx,_starty,_endx,_endy,__c.Colors.Black,_minutetickstrokewidth);
//BA.debugLineNum = 1769491;BA.debugLine="endY = centerY + (clockDiameter / 2 -";
_endy = (float) (__ref._centery /*float*/ +(__ref._clockdiameter /*float*/ /(double)2-__c.DipToCurrent((int) (5)))*__c.SinD(_angle));
RDebugUtils.currentLine=1769492;
//BA.debugLineNum = 1769492;BA.debugLine="cvsClock.DrawLine(startX, startY, endX";
__ref._cvsclock /*anywheresoftware.b4a.objects.B4XCanvas*/ .DrawLine(_startx,_starty,_endx,_endy,__c.Colors.Black,__ref._minutetickstrokewidth /*float*/ );
}; };
} }
}; };
RDebugUtils.currentLine=1769495; //BA.debugLineNum = 214;BA.debugLine="End Sub";
//BA.debugLineNum = 1769495;BA.debugLine="End Sub";
return ""; return "";
} }
public String _drawinterval(b4a.example.analogclock __ref,int _starthour,int _startminute,int _endhour,int _endminute,int _color,float _radius,float _strokewidth) throws Exception{ public String _initialize(anywheresoftware.b4a.BA _ba,anywheresoftware.b4a.objects.PanelWrapper _parentpanel,float _percentageofwidth) throws Exception{
__ref = this; innerInitialize(_ba);
RDebugUtils.currentModule="analogclock"; //BA.debugLineNum = 26;BA.debugLine="Public Sub Initialize(ParentPanel As Panel, Percen";
if (Debug.shouldDelegate(ba, "drawinterval", false)) //BA.debugLineNum = 27;BA.debugLine="pnlClock = ParentPanel";
{return ((String) Debug.delegate(ba, "drawinterval", new Object[] {_starthour,_startminute,_endhour,_endminute,_color,_radius,_strokewidth}));} _pnlclock = _parentpanel;
float _startangle = 0f; //BA.debugLineNum = 28;BA.debugLine="cvsClock.Initialize(pnlClock)";
float _endangle = 0f; _cvsclock.Initialize((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_pnlclock.getObject())));
float _sweepangle = 0f; //BA.debugLineNum = 29;BA.debugLine="segments.Initialize";
anywheresoftware.b4a.objects.B4XCanvas.B4XPath _path = null; _segments.Initialize();
RDebugUtils.currentLine=1900544; //BA.debugLineNum = 30;BA.debugLine="baseDurationMs = 12 * DateTime.TicksPerHour";
//BA.debugLineNum = 1900544;BA.debugLine="Private Sub DrawInterval(startHour As Int, startMi"; _basedurationms = (long) (12*__c.DateTime.TicksPerHour);
RDebugUtils.currentLine=1900545; //BA.debugLineNum = 31;BA.debugLine="SetClockSize(PercentageOfWidth)";
//BA.debugLineNum = 1900545;BA.debugLine="Dim startAngle As Float = (startHour Mod 12 + sta"; _setclocksize(_percentageofwidth);
_startangle = (float) ((_starthour%12+_startminute/(double)60)*30-90); //BA.debugLineNum = 32;BA.debugLine="End Sub";
RDebugUtils.currentLine=1900546;
//BA.debugLineNum = 1900546;BA.debugLine="Dim endAngle As Float = (endHour Mod 12 + endMinu";
_endangle = (float) ((_endhour%12+_endminute/(double)60)*30-90);
RDebugUtils.currentLine=1900547;
//BA.debugLineNum = 1900547;BA.debugLine="Dim sweepAngle As Float = endAngle - startAngle";
_sweepangle = (float) (_endangle-_startangle);
RDebugUtils.currentLine=1900548;
//BA.debugLineNum = 1900548;BA.debugLine="If sweepAngle < 0 Then sweepAngle = sweepAngle +";
if (_sweepangle<0) {
_sweepangle = (float) (_sweepangle+360);};
RDebugUtils.currentLine=1900550;
//BA.debugLineNum = 1900550;BA.debugLine="Dim path As B4XPath";
_path = new anywheresoftware.b4a.objects.B4XCanvas.B4XPath();
RDebugUtils.currentLine=1900551;
//BA.debugLineNum = 1900551;BA.debugLine="path.InitializeArc(centerX, centerY, radius, star";
_path.InitializeArc(__ref._centerx /*float*/ ,__ref._centery /*float*/ ,_radius,_startangle,_sweepangle);
RDebugUtils.currentLine=1900552;
//BA.debugLineNum = 1900552;BA.debugLine="cvsClock.DrawPath(path, color, False, strokeWidth";
__ref._cvsclock /*anywheresoftware.b4a.objects.B4XCanvas*/ .DrawPath(_path,_color,__c.False,_strokewidth);
RDebugUtils.currentLine=1900553;
//BA.debugLineNum = 1900553;BA.debugLine="End Sub";
return ""; return "";
} }
public String _drawhand(b4a.example.analogclock __ref,float _x,float _y,float _length,float _angle,float _width,int _color) throws Exception{ public String _setactivesegment(long _durationms,int _segmentcolor,boolean _ispause) throws Exception{
__ref = this; //BA.debugLineNum = 62;BA.debugLine="Public Sub SetActiveSegment(DurationMs As Long, Se";
RDebugUtils.currentModule="analogclock"; //BA.debugLineNum = 63;BA.debugLine="activeDurationMs = Max(0, DurationMs)";
if (Debug.shouldDelegate(ba, "drawhand", false)) _activedurationms = (long) (__c.Max(0,_durationms));
{return ((String) Debug.delegate(ba, "drawhand", new Object[] {_x,_y,_length,_angle,_width,_color}));} //BA.debugLineNum = 64;BA.debugLine="activeColor = SegmentColor";
float _endx = 0f; _activecolor = _segmentcolor;
float _endy = 0f; //BA.debugLineNum = 65;BA.debugLine="activeIsPause = IsPause";
RDebugUtils.currentLine=1703936; _activeispause = _ispause;
//BA.debugLineNum = 1703936;BA.debugLine="Private Sub DrawHand(x As Float, y As Float, lengt"; //BA.debugLineNum = 66;BA.debugLine="hasActiveSegment = activeDurationMs > 0";
RDebugUtils.currentLine=1703937; _hasactivesegment = _activedurationms>0;
//BA.debugLineNum = 1703937;BA.debugLine="Dim endX As Float = x + length * CosD(angle)"; //BA.debugLineNum = 67;BA.debugLine="DrawClock";
_endx = (float) (_x+_length*__c.CosD(_angle)); _drawclock();
RDebugUtils.currentLine=1703938; //BA.debugLineNum = 68;BA.debugLine="End Sub";
//BA.debugLineNum = 1703938;BA.debugLine="Dim endY As Float = y + length * SinD(angle)";
_endy = (float) (_y+_length*__c.SinD(_angle));
RDebugUtils.currentLine=1703939;
//BA.debugLineNum = 1703939;BA.debugLine="cvsClock.DrawLine(x, y, endX, endY, color, wid";
__ref._cvsclock /*anywheresoftware.b4a.objects.B4XCanvas*/ .DrawLine(_x,_y,_endx,_endy,_color,_width);
RDebugUtils.currentLine=1703940;
//BA.debugLineNum = 1703940;BA.debugLine="End Sub";
return ""; return "";
} }
public String _setclocksize(b4a.example.analogclock __ref,float _percentageofwidth) throws Exception{ public String _setbaseduration(long _durationms) throws Exception{
__ref = this; //BA.debugLineNum = 35;BA.debugLine="Public Sub SetBaseDuration(DurationMs As Long)";
RDebugUtils.currentModule="analogclock"; //BA.debugLineNum = 36;BA.debugLine="baseDurationMs = DurationMs";
if (Debug.shouldDelegate(ba, "setclocksize", false)) _basedurationms = _durationms;
{return ((String) Debug.delegate(ba, "setclocksize", new Object[] {_percentageofwidth}));} //BA.debugLineNum = 37;BA.debugLine="DrawClock";
RDebugUtils.currentLine=1441792; _drawclock();
//BA.debugLineNum = 1441792;BA.debugLine="Public Sub SetClockSize(PercentageOfWidth As Float"; //BA.debugLineNum = 38;BA.debugLine="End Sub";
RDebugUtils.currentLine=1441793;
//BA.debugLineNum = 1441793;BA.debugLine="clockDiameter = pnlClock.Width * PercentageOfW";
__ref._clockdiameter /*float*/ = (float) (__ref._pnlclock /*anywheresoftware.b4a.objects.PanelWrapper*/ .getWidth()*_percentageofwidth/(double)100);
RDebugUtils.currentLine=1441794;
//BA.debugLineNum = 1441794;BA.debugLine="centerX = pnlClock.Width / 2";
__ref._centerx /*float*/ = (float) (__ref._pnlclock /*anywheresoftware.b4a.objects.PanelWrapper*/ .getWidth()/(double)2);
RDebugUtils.currentLine=1441795;
//BA.debugLineNum = 1441795;BA.debugLine="centerY = pnlClock.Height / 2";
__ref._centery /*float*/ = (float) (__ref._pnlclock /*anywheresoftware.b4a.objects.PanelWrapper*/ .getHeight()/(double)2);
RDebugUtils.currentLine=1441796;
//BA.debugLineNum = 1441796;BA.debugLine="DrawClock";
__ref._drawclock /*String*/ (null);
RDebugUtils.currentLine=1441797;
//BA.debugLineNum = 1441797;BA.debugLine="End Sub";
return ""; return "";
} }
public String _setstrokewidths(b4a.example.analogclock __ref,float _quadrantwidth,float _hourtickwidth,float _minutetickwidth,float _intervalarcwidth,float _hourhandwidth,float _minutehandwidth) throws Exception{ public String _setclocksize(float _percentageofwidth) throws Exception{
__ref = this; //BA.debugLineNum = 77;BA.debugLine="Public Sub SetClockSize(PercentageOfWidth As Float";
RDebugUtils.currentModule="analogclock"; //BA.debugLineNum = 78;BA.debugLine="clockDiameter = pnlClock.Width * PercentageOfW";
if (Debug.shouldDelegate(ba, "setstrokewidths", false)) _clockdiameter = (float) (_pnlclock.getWidth()*_percentageofwidth/(double)100);
{return ((String) Debug.delegate(ba, "setstrokewidths", new Object[] {_quadrantwidth,_hourtickwidth,_minutetickwidth,_intervalarcwidth,_hourhandwidth,_minutehandwidth}));} //BA.debugLineNum = 79;BA.debugLine="centerX = pnlClock.Width / 2";
RDebugUtils.currentLine=1507328; _centerx = (float) (_pnlclock.getWidth()/(double)2);
//BA.debugLineNum = 1507328;BA.debugLine="Public Sub SetStrokeWidths(quadrantWidth As Float,"; //BA.debugLineNum = 80;BA.debugLine="centerY = pnlClock.Height / 2";
RDebugUtils.currentLine=1507329; _centery = (float) (_pnlclock.getHeight()/(double)2);
//BA.debugLineNum = 1507329;BA.debugLine="quadrantStrokeWidth = quadrantWidth"; //BA.debugLineNum = 81;BA.debugLine="DrawClock";
__ref._quadrantstrokewidth /*float*/ = _quadrantwidth; _drawclock();
RDebugUtils.currentLine=1507330; //BA.debugLineNum = 82;BA.debugLine="End Sub";
//BA.debugLineNum = 1507330;BA.debugLine="hourTickStrokeWidth = hourTickWidth";
__ref._hourtickstrokewidth /*float*/ = _hourtickwidth;
RDebugUtils.currentLine=1507331;
//BA.debugLineNum = 1507331;BA.debugLine="minuteTickStrokeWidth = minuteTickWidth";
__ref._minutetickstrokewidth /*float*/ = _minutetickwidth;
RDebugUtils.currentLine=1507332;
//BA.debugLineNum = 1507332;BA.debugLine="intervalArcStrokeWidth = intervalArcWidth";
__ref._intervalarcstrokewidth /*float*/ = _intervalarcwidth;
RDebugUtils.currentLine=1507333;
//BA.debugLineNum = 1507333;BA.debugLine="hourHandStrokeWidth = hourHandWidth";
__ref._hourhandstrokewidth /*float*/ = _hourhandwidth;
RDebugUtils.currentLine=1507334;
//BA.debugLineNum = 1507334;BA.debugLine="minuteHandStrokeWidth = minuteHandWidth";
__ref._minutehandstrokewidth /*float*/ = _minutehandwidth;
RDebugUtils.currentLine=1507335;
//BA.debugLineNum = 1507335;BA.debugLine="DrawClock";
__ref._drawclock /*String*/ (null);
RDebugUtils.currentLine=1507336;
//BA.debugLineNum = 1507336;BA.debugLine="End Sub";
return ""; return "";
} }
public String _startclock(b4a.example.analogclock __ref) throws Exception{ public String _setstrokewidths(float _quadrantwidth,float _hourtickwidth,float _minutetickwidth,float _intervalarcwidth,float _hourhandwidth,float _minutehandwidth) throws Exception{
__ref = this; //BA.debugLineNum = 85;BA.debugLine="Public Sub SetStrokeWidths(quadrantWidth As Float,";
RDebugUtils.currentModule="analogclock"; //BA.debugLineNum = 86;BA.debugLine="quadrantStrokeWidth = quadrantWidth";
if (Debug.shouldDelegate(ba, "startclock", false)) _quadrantstrokewidth = _quadrantwidth;
{return ((String) Debug.delegate(ba, "startclock", null));} //BA.debugLineNum = 87;BA.debugLine="hourTickStrokeWidth = hourTickWidth";
_hourtickstrokewidth = _hourtickwidth;
//BA.debugLineNum = 88;BA.debugLine="minuteTickStrokeWidth = minuteTickWidth";
_minutetickstrokewidth = _minutetickwidth;
//BA.debugLineNum = 89;BA.debugLine="intervalArcStrokeWidth = intervalArcWidth";
_intervalarcstrokewidth = _intervalarcwidth;
//BA.debugLineNum = 90;BA.debugLine="hourHandStrokeWidth = hourHandWidth";
_hourhandstrokewidth = _hourhandwidth;
//BA.debugLineNum = 91;BA.debugLine="minuteHandStrokeWidth = minuteHandWidth";
_minutehandstrokewidth = _minutehandwidth;
//BA.debugLineNum = 92;BA.debugLine="DrawClock";
_drawclock();
//BA.debugLineNum = 93;BA.debugLine="End Sub";
return "";
}
public String _startclock() throws Exception{
anywheresoftware.b4a.objects.Timer _timer = null; anywheresoftware.b4a.objects.Timer _timer = null;
RDebugUtils.currentLine=1966080; //BA.debugLineNum = 217;BA.debugLine="Public Sub StartClock";
//BA.debugLineNum = 1966080;BA.debugLine="Public Sub StartClock"; //BA.debugLineNum = 218;BA.debugLine="Dim timer As Timer";
RDebugUtils.currentLine=1966081;
//BA.debugLineNum = 1966081;BA.debugLine="Dim timer As Timer";
_timer = new anywheresoftware.b4a.objects.Timer(); _timer = new anywheresoftware.b4a.objects.Timer();
RDebugUtils.currentLine=1966082; //BA.debugLineNum = 219;BA.debugLine="timer.Initialize(\"timer\", 1000)";
//BA.debugLineNum = 1966082;BA.debugLine="timer.Initialize(\"timer\", 1000)";
_timer.Initialize(ba,"timer",(long) (1000)); _timer.Initialize(ba,"timer",(long) (1000));
RDebugUtils.currentLine=1966083; //BA.debugLineNum = 220;BA.debugLine="timer.Enabled = True";
//BA.debugLineNum = 1966083;BA.debugLine="timer.Enabled = True";
_timer.setEnabled(__c.True); _timer.setEnabled(__c.True);
RDebugUtils.currentLine=1966084; //BA.debugLineNum = 221;BA.debugLine="End Sub";
//BA.debugLineNum = 1966084;BA.debugLine="End Sub";
return ""; return "";
} }
public String _timer_tick(b4a.example.analogclock __ref) throws Exception{ public String _timer_tick() throws Exception{
__ref = this; //BA.debugLineNum = 224;BA.debugLine="Private Sub timer_Tick";
RDebugUtils.currentModule="analogclock"; //BA.debugLineNum = 225;BA.debugLine="DrawClock";
if (Debug.shouldDelegate(ba, "timer_tick", false)) _drawclock();
{return ((String) Debug.delegate(ba, "timer_tick", null));} //BA.debugLineNum = 226;BA.debugLine="End Sub";
RDebugUtils.currentLine=2031616;
//BA.debugLineNum = 2031616;BA.debugLine="Private Sub timer_Tick";
RDebugUtils.currentLine=2031617;
//BA.debugLineNum = 2031617;BA.debugLine="DrawClock";
__ref._drawclock /*String*/ (null);
RDebugUtils.currentLine=2031618;
//BA.debugLineNum = 2031618;BA.debugLine="End Sub";
return ""; return "";
} }
} public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
return BA.SubDelegator.SubNotFound;
}
}

View File

@@ -0,0 +1,603 @@
package b4a.example;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;
public class localization {
private static localization mostCurrent = new localization();
public static Object getObject() {
throw new RuntimeException("Code module does not support this method.");
}
public anywheresoftware.b4a.keywords.Common __c = null;
public static anywheresoftware.b4a.objects.collections.Map _translations = null;
public static String _currentlanguage = "";
public static boolean _initialized = false;
public b4a.example.main _main = null;
public b4a.example.starter _starter = null;
public static anywheresoftware.b4a.objects.collections.Map _createenglishmap(anywheresoftware.b4a.BA _ba) throws Exception{
anywheresoftware.b4a.objects.collections.Map _m = null;
//BA.debugLineNum = 68;BA.debugLine="Private Sub CreateEnglishMap As Map";
//BA.debugLineNum = 69;BA.debugLine="Dim m As Map";
_m = new anywheresoftware.b4a.objects.collections.Map();
//BA.debugLineNum = 70;BA.debugLine="m.Initialize";
_m.Initialize();
//BA.debugLineNum = 71;BA.debugLine="m.Put(\"app_title\", \"Overtime Guard\")";
_m.Put((Object)("app_title"),(Object)("Overtime Guard"));
//BA.debugLineNum = 72;BA.debugLine="m.Put(\"start\", \"Start\")";
_m.Put((Object)("start"),(Object)("Start"));
//BA.debugLineNum = 73;BA.debugLine="m.Put(\"end\", \"End\")";
_m.Put((Object)("end"),(Object)("End"));
//BA.debugLineNum = 74;BA.debugLine="m.Put(\"pause\", \"Pause\")";
_m.Put((Object)("pause"),(Object)("Pause"));
//BA.debugLineNum = 75;BA.debugLine="m.Put(\"end_pause\", \"End pause\")";
_m.Put((Object)("end_pause"),(Object)("End pause"));
//BA.debugLineNum = 76;BA.debugLine="m.Put(\"stats\", \"Stats\")";
_m.Put((Object)("stats"),(Object)("Stats"));
//BA.debugLineNum = 77;BA.debugLine="m.Put(\"config\", \"Config\")";
_m.Put((Object)("config"),(Object)("Config"));
//BA.debugLineNum = 78;BA.debugLine="m.Put(\"bg\", \"Bg\")";
_m.Put((Object)("bg"),(Object)("Bg"));
//BA.debugLineNum = 79;BA.debugLine="m.Put(\"statistics\", \"Statistics\")";
_m.Put((Object)("statistics"),(Object)("Statistics"));
//BA.debugLineNum = 80;BA.debugLine="m.Put(\"close\", \"Close\")";
_m.Put((Object)("close"),(Object)("Close"));
//BA.debugLineNum = 81;BA.debugLine="m.Put(\"work_start\", \"Work start\")";
_m.Put((Object)("work_start"),(Object)("Work start"));
//BA.debugLineNum = 82;BA.debugLine="m.Put(\"pause_start\", \"Pause start\")";
_m.Put((Object)("pause_start"),(Object)("Pause start"));
//BA.debugLineNum = 83;BA.debugLine="m.Put(\"pause_end\", \"Pause end\")";
_m.Put((Object)("pause_end"),(Object)("Pause end"));
//BA.debugLineNum = 84;BA.debugLine="m.Put(\"work_end\", \"Work end\")";
_m.Put((Object)("work_end"),(Object)("Work end"));
//BA.debugLineNum = 85;BA.debugLine="m.Put(\"set_config\", \"Set config\")";
_m.Put((Object)("set_config"),(Object)("Set config"));
//BA.debugLineNum = 86;BA.debugLine="m.Put(\"reset_config\", \"Reset config\")";
_m.Put((Object)("reset_config"),(Object)("Reset config"));
//BA.debugLineNum = 87;BA.debugLine="m.Put(\"clear_today\", \"Clear today\")";
_m.Put((Object)("clear_today"),(Object)("Clear today"));
//BA.debugLineNum = 88;BA.debugLine="m.Put(\"date\", \"Date\")";
_m.Put((Object)("date"),(Object)("Date"));
//BA.debugLineNum = 89;BA.debugLine="m.Put(\"work\", \"Work\")";
_m.Put((Object)("work"),(Object)("Work"));
//BA.debugLineNum = 90;BA.debugLine="m.Put(\"pause_col\", \"Pause\")";
_m.Put((Object)("pause_col"),(Object)("Pause"));
//BA.debugLineNum = 91;BA.debugLine="m.Put(\"overtime\", \"Overtime\")";
_m.Put((Object)("overtime"),(Object)("Overtime"));
//BA.debugLineNum = 92;BA.debugLine="m.Put(\"totals\", \"Totals\")";
_m.Put((Object)("totals"),(Object)("Totals"));
//BA.debugLineNum = 93;BA.debugLine="m.Put(\"manual_mode\", \"Manual mode\")";
_m.Put((Object)("manual_mode"),(Object)("Manual mode"));
//BA.debugLineNum = 94;BA.debugLine="m.Put(\"auto_recording\", \"Auto: recording...\")";
_m.Put((Object)("auto_recording"),(Object)("Auto: recording..."));
//BA.debugLineNum = 95;BA.debugLine="m.Put(\"auto_paused\", \"Auto: paused...\")";
_m.Put((Object)("auto_paused"),(Object)("Auto: paused..."));
//BA.debugLineNum = 96;BA.debugLine="m.Put(\"auto_stopped\", \"Auto: stopped...\")";
_m.Put((Object)("auto_stopped"),(Object)("Auto: stopped..."));
//BA.debugLineNum = 97;BA.debugLine="m.Put(\"use_hhmm\", \"Use HH:MM times.\")";
_m.Put((Object)("use_hhmm"),(Object)("Use HH:MM times."));
//BA.debugLineNum = 98;BA.debugLine="m.Put(\"times_order\", \"Times must be in order.\")";
_m.Put((Object)("times_order"),(Object)("Times must be in order."));
//BA.debugLineNum = 99;BA.debugLine="m.Put(\"work_exceed\", \"Configured work cannot exce";
_m.Put((Object)("work_exceed"),(Object)("Configured work cannot exceed 8 hours."));
//BA.debugLineNum = 100;BA.debugLine="m.Put(\"auto_enabled\", \"Automatic config enabled.\"";
_m.Put((Object)("auto_enabled"),(Object)("Automatic config enabled."));
//BA.debugLineNum = 101;BA.debugLine="m.Put(\"auto_disabled\", \"Automatic config disabled";
_m.Put((Object)("auto_disabled"),(Object)("Automatic config disabled."));
//BA.debugLineNum = 102;BA.debugLine="m.Put(\"no_day_to_clear\", \"No day to clear.\")";
_m.Put((Object)("no_day_to_clear"),(Object)("No day to clear."));
//BA.debugLineNum = 103;BA.debugLine="m.Put(\"clear_today_title\", \"Clear today\")";
_m.Put((Object)("clear_today_title"),(Object)("Clear today"));
//BA.debugLineNum = 104;BA.debugLine="m.Put(\"clear_today_confirm\", \"Clear all recorded";
_m.Put((Object)("clear_today_confirm"),(Object)("Clear all recorded data for"));
//BA.debugLineNum = 105;BA.debugLine="m.Put(\"clear_button\", \"Clear\")";
_m.Put((Object)("clear_button"),(Object)("Clear"));
//BA.debugLineNum = 106;BA.debugLine="m.Put(\"cancel\", \"Cancel\")";
_m.Put((Object)("cancel"),(Object)("Cancel"));
//BA.debugLineNum = 107;BA.debugLine="m.Put(\"today_cleared\", \"Today cleared.\")";
_m.Put((Object)("today_cleared"),(Object)("Today cleared."));
//BA.debugLineNum = 108;BA.debugLine="m.Put(\"limit_reached\", \"9-hour limit already reac";
_m.Put((Object)("limit_reached"),(Object)("9-hour limit already reached for this workday."));
//BA.debugLineNum = 109;BA.debugLine="Return m";
if (true) return _m;
//BA.debugLineNum = 110;BA.debugLine="End Sub";
return null;
}
public static anywheresoftware.b4a.objects.collections.Map _createfrenchmap(anywheresoftware.b4a.BA _ba) throws Exception{
anywheresoftware.b4a.objects.collections.Map _m = null;
//BA.debugLineNum = 156;BA.debugLine="Private Sub CreateFrenchMap As Map";
//BA.debugLineNum = 157;BA.debugLine="Dim m As Map";
_m = new anywheresoftware.b4a.objects.collections.Map();
//BA.debugLineNum = 158;BA.debugLine="m.Initialize";
_m.Initialize();
//BA.debugLineNum = 159;BA.debugLine="m.Put(\"app_title\", \"Overtime Guard\")";
_m.Put((Object)("app_title"),(Object)("Overtime Guard"));
//BA.debugLineNum = 160;BA.debugLine="m.Put(\"start\", \"Demarrer\")";
_m.Put((Object)("start"),(Object)("Demarrer"));
//BA.debugLineNum = 161;BA.debugLine="m.Put(\"end\", \"Arreter\")";
_m.Put((Object)("end"),(Object)("Arreter"));
//BA.debugLineNum = 162;BA.debugLine="m.Put(\"pause\", \"Pause\")";
_m.Put((Object)("pause"),(Object)("Pause"));
//BA.debugLineNum = 163;BA.debugLine="m.Put(\"end_pause\", \"Fin pause\")";
_m.Put((Object)("end_pause"),(Object)("Fin pause"));
//BA.debugLineNum = 164;BA.debugLine="m.Put(\"stats\", \"Stats\")";
_m.Put((Object)("stats"),(Object)("Stats"));
//BA.debugLineNum = 165;BA.debugLine="m.Put(\"config\", \"Config\")";
_m.Put((Object)("config"),(Object)("Config"));
//BA.debugLineNum = 166;BA.debugLine="m.Put(\"bg\", \"Fond\")";
_m.Put((Object)("bg"),(Object)("Fond"));
//BA.debugLineNum = 167;BA.debugLine="m.Put(\"statistics\", \"Statistiques\")";
_m.Put((Object)("statistics"),(Object)("Statistiques"));
//BA.debugLineNum = 168;BA.debugLine="m.Put(\"close\", \"Fermer\")";
_m.Put((Object)("close"),(Object)("Fermer"));
//BA.debugLineNum = 169;BA.debugLine="m.Put(\"work_start\", \"Debut travail\")";
_m.Put((Object)("work_start"),(Object)("Debut travail"));
//BA.debugLineNum = 170;BA.debugLine="m.Put(\"pause_start\", \"Debut pause\")";
_m.Put((Object)("pause_start"),(Object)("Debut pause"));
//BA.debugLineNum = 171;BA.debugLine="m.Put(\"pause_end\", \"Fin pause\")";
_m.Put((Object)("pause_end"),(Object)("Fin pause"));
//BA.debugLineNum = 172;BA.debugLine="m.Put(\"work_end\", \"Fin travail\")";
_m.Put((Object)("work_end"),(Object)("Fin travail"));
//BA.debugLineNum = 173;BA.debugLine="m.Put(\"set_config\", \"Activer config\")";
_m.Put((Object)("set_config"),(Object)("Activer config"));
//BA.debugLineNum = 174;BA.debugLine="m.Put(\"reset_config\", \"Reinit config\")";
_m.Put((Object)("reset_config"),(Object)("Reinit config"));
//BA.debugLineNum = 175;BA.debugLine="m.Put(\"clear_today\", \"Effacer aujourd'hui\")";
_m.Put((Object)("clear_today"),(Object)("Effacer aujourd'hui"));
//BA.debugLineNum = 176;BA.debugLine="m.Put(\"date\", \"Date\")";
_m.Put((Object)("date"),(Object)("Date"));
//BA.debugLineNum = 177;BA.debugLine="m.Put(\"work\", \"Travail\")";
_m.Put((Object)("work"),(Object)("Travail"));
//BA.debugLineNum = 178;BA.debugLine="m.Put(\"pause_col\", \"Pause\")";
_m.Put((Object)("pause_col"),(Object)("Pause"));
//BA.debugLineNum = 179;BA.debugLine="m.Put(\"overtime\", \"Heures sup.\")";
_m.Put((Object)("overtime"),(Object)("Heures sup."));
//BA.debugLineNum = 180;BA.debugLine="m.Put(\"totals\", \"Totaux\")";
_m.Put((Object)("totals"),(Object)("Totaux"));
//BA.debugLineNum = 181;BA.debugLine="m.Put(\"manual_mode\", \"Mode manuel\")";
_m.Put((Object)("manual_mode"),(Object)("Mode manuel"));
//BA.debugLineNum = 182;BA.debugLine="m.Put(\"auto_recording\", \"Auto: enregistrement...\"";
_m.Put((Object)("auto_recording"),(Object)("Auto: enregistrement..."));
//BA.debugLineNum = 183;BA.debugLine="m.Put(\"auto_paused\", \"Auto: pause...\")";
_m.Put((Object)("auto_paused"),(Object)("Auto: pause..."));
//BA.debugLineNum = 184;BA.debugLine="m.Put(\"auto_stopped\", \"Auto: arrete...\")";
_m.Put((Object)("auto_stopped"),(Object)("Auto: arrete..."));
//BA.debugLineNum = 185;BA.debugLine="m.Put(\"use_hhmm\", \"Utilisez des heures HH:MM.\")";
_m.Put((Object)("use_hhmm"),(Object)("Utilisez des heures HH:MM."));
//BA.debugLineNum = 186;BA.debugLine="m.Put(\"times_order\", \"Les heures doivent etre dan";
_m.Put((Object)("times_order"),(Object)("Les heures doivent etre dans l'ordre."));
//BA.debugLineNum = 187;BA.debugLine="m.Put(\"work_exceed\", \"Le travail configure ne peu";
_m.Put((Object)("work_exceed"),(Object)("Le travail configure ne peut pas depasser 8 heures."));
//BA.debugLineNum = 188;BA.debugLine="m.Put(\"auto_enabled\", \"Configuration automatique";
_m.Put((Object)("auto_enabled"),(Object)("Configuration automatique activee."));
//BA.debugLineNum = 189;BA.debugLine="m.Put(\"auto_disabled\", \"Configuration automatique";
_m.Put((Object)("auto_disabled"),(Object)("Configuration automatique desactivee."));
//BA.debugLineNum = 190;BA.debugLine="m.Put(\"no_day_to_clear\", \"Aucun jour a effacer.\")";
_m.Put((Object)("no_day_to_clear"),(Object)("Aucun jour a effacer."));
//BA.debugLineNum = 191;BA.debugLine="m.Put(\"clear_today_title\", \"Effacer aujourd'hui\")";
_m.Put((Object)("clear_today_title"),(Object)("Effacer aujourd'hui"));
//BA.debugLineNum = 192;BA.debugLine="m.Put(\"clear_today_confirm\", \"Effacer toutes les";
_m.Put((Object)("clear_today_confirm"),(Object)("Effacer toutes les donnees enregistrees pour"));
//BA.debugLineNum = 193;BA.debugLine="m.Put(\"clear_button\", \"Effacer\")";
_m.Put((Object)("clear_button"),(Object)("Effacer"));
//BA.debugLineNum = 194;BA.debugLine="m.Put(\"cancel\", \"Annuler\")";
_m.Put((Object)("cancel"),(Object)("Annuler"));
//BA.debugLineNum = 195;BA.debugLine="m.Put(\"today_cleared\", \"Journee effacee.\")";
_m.Put((Object)("today_cleared"),(Object)("Journee effacee."));
//BA.debugLineNum = 196;BA.debugLine="m.Put(\"limit_reached\", \"Limite de 9 heures deja a";
_m.Put((Object)("limit_reached"),(Object)("Limite de 9 heures deja atteinte pour cette journee."));
//BA.debugLineNum = 197;BA.debugLine="Return m";
if (true) return _m;
//BA.debugLineNum = 198;BA.debugLine="End Sub";
return null;
}
public static anywheresoftware.b4a.objects.collections.Map _creategermanmap(anywheresoftware.b4a.BA _ba) throws Exception{
anywheresoftware.b4a.objects.collections.Map _m = null;
//BA.debugLineNum = 200;BA.debugLine="Private Sub CreateGermanMap As Map";
//BA.debugLineNum = 201;BA.debugLine="Dim m As Map";
_m = new anywheresoftware.b4a.objects.collections.Map();
//BA.debugLineNum = 202;BA.debugLine="m.Initialize";
_m.Initialize();
//BA.debugLineNum = 203;BA.debugLine="m.Put(\"app_title\", \"Overtime Guard\")";
_m.Put((Object)("app_title"),(Object)("Overtime Guard"));
//BA.debugLineNum = 204;BA.debugLine="m.Put(\"start\", \"Start\")";
_m.Put((Object)("start"),(Object)("Start"));
//BA.debugLineNum = 205;BA.debugLine="m.Put(\"end\", \"Stopp\")";
_m.Put((Object)("end"),(Object)("Stopp"));
//BA.debugLineNum = 206;BA.debugLine="m.Put(\"pause\", \"Pause\")";
_m.Put((Object)("pause"),(Object)("Pause"));
//BA.debugLineNum = 207;BA.debugLine="m.Put(\"end_pause\", \"Pause beenden\")";
_m.Put((Object)("end_pause"),(Object)("Pause beenden"));
//BA.debugLineNum = 208;BA.debugLine="m.Put(\"stats\", \"Statistik\")";
_m.Put((Object)("stats"),(Object)("Statistik"));
//BA.debugLineNum = 209;BA.debugLine="m.Put(\"config\", \"Konfig\")";
_m.Put((Object)("config"),(Object)("Konfig"));
//BA.debugLineNum = 210;BA.debugLine="m.Put(\"bg\", \"Hint.\")";
_m.Put((Object)("bg"),(Object)("Hint."));
//BA.debugLineNum = 211;BA.debugLine="m.Put(\"statistics\", \"Statistik\")";
_m.Put((Object)("statistics"),(Object)("Statistik"));
//BA.debugLineNum = 212;BA.debugLine="m.Put(\"close\", \"Schliessen\")";
_m.Put((Object)("close"),(Object)("Schliessen"));
//BA.debugLineNum = 213;BA.debugLine="m.Put(\"work_start\", \"Arbeitsbeginn\")";
_m.Put((Object)("work_start"),(Object)("Arbeitsbeginn"));
//BA.debugLineNum = 214;BA.debugLine="m.Put(\"pause_start\", \"Pausenbeginn\")";
_m.Put((Object)("pause_start"),(Object)("Pausenbeginn"));
//BA.debugLineNum = 215;BA.debugLine="m.Put(\"pause_end\", \"Pausenende\")";
_m.Put((Object)("pause_end"),(Object)("Pausenende"));
//BA.debugLineNum = 216;BA.debugLine="m.Put(\"work_end\", \"Arbeitsende\")";
_m.Put((Object)("work_end"),(Object)("Arbeitsende"));
//BA.debugLineNum = 217;BA.debugLine="m.Put(\"set_config\", \"Konfig setzen\")";
_m.Put((Object)("set_config"),(Object)("Konfig setzen"));
//BA.debugLineNum = 218;BA.debugLine="m.Put(\"reset_config\", \"Konfig reset\")";
_m.Put((Object)("reset_config"),(Object)("Konfig reset"));
//BA.debugLineNum = 219;BA.debugLine="m.Put(\"clear_today\", \"Heute loschen\")";
_m.Put((Object)("clear_today"),(Object)("Heute loschen"));
//BA.debugLineNum = 220;BA.debugLine="m.Put(\"date\", \"Datum\")";
_m.Put((Object)("date"),(Object)("Datum"));
//BA.debugLineNum = 221;BA.debugLine="m.Put(\"work\", \"Arbeit\")";
_m.Put((Object)("work"),(Object)("Arbeit"));
//BA.debugLineNum = 222;BA.debugLine="m.Put(\"pause_col\", \"Pause\")";
_m.Put((Object)("pause_col"),(Object)("Pause"));
//BA.debugLineNum = 223;BA.debugLine="m.Put(\"overtime\", \"Uberzeit\")";
_m.Put((Object)("overtime"),(Object)("Uberzeit"));
//BA.debugLineNum = 224;BA.debugLine="m.Put(\"totals\", \"Summen\")";
_m.Put((Object)("totals"),(Object)("Summen"));
//BA.debugLineNum = 225;BA.debugLine="m.Put(\"manual_mode\", \"Manueller Modus\")";
_m.Put((Object)("manual_mode"),(Object)("Manueller Modus"));
//BA.debugLineNum = 226;BA.debugLine="m.Put(\"auto_recording\", \"Auto: Aufnahme...\")";
_m.Put((Object)("auto_recording"),(Object)("Auto: Aufnahme..."));
//BA.debugLineNum = 227;BA.debugLine="m.Put(\"auto_paused\", \"Auto: Pause...\")";
_m.Put((Object)("auto_paused"),(Object)("Auto: Pause..."));
//BA.debugLineNum = 228;BA.debugLine="m.Put(\"auto_stopped\", \"Auto: gestoppt...\")";
_m.Put((Object)("auto_stopped"),(Object)("Auto: gestoppt..."));
//BA.debugLineNum = 229;BA.debugLine="m.Put(\"use_hhmm\", \"Bitte HH:MM verwenden.\")";
_m.Put((Object)("use_hhmm"),(Object)("Bitte HH:MM verwenden."));
//BA.debugLineNum = 230;BA.debugLine="m.Put(\"times_order\", \"Die Zeiten muessen in Reihe";
_m.Put((Object)("times_order"),(Object)("Die Zeiten muessen in Reihenfolge sein."));
//BA.debugLineNum = 231;BA.debugLine="m.Put(\"work_exceed\", \"Die konfigurierte Arbeit da";
_m.Put((Object)("work_exceed"),(Object)("Die konfigurierte Arbeit darf 8 Stunden nicht uberschreiten."));
//BA.debugLineNum = 232;BA.debugLine="m.Put(\"auto_enabled\", \"Automatische Konfiguration";
_m.Put((Object)("auto_enabled"),(Object)("Automatische Konfiguration aktiviert."));
//BA.debugLineNum = 233;BA.debugLine="m.Put(\"auto_disabled\", \"Automatische Konfiguratio";
_m.Put((Object)("auto_disabled"),(Object)("Automatische Konfiguration deaktiviert."));
//BA.debugLineNum = 234;BA.debugLine="m.Put(\"no_day_to_clear\", \"Kein Tag zum Loschen.\")";
_m.Put((Object)("no_day_to_clear"),(Object)("Kein Tag zum Loschen."));
//BA.debugLineNum = 235;BA.debugLine="m.Put(\"clear_today_title\", \"Heute loschen\")";
_m.Put((Object)("clear_today_title"),(Object)("Heute loschen"));
//BA.debugLineNum = 236;BA.debugLine="m.Put(\"clear_today_confirm\", \"Alle erfassten Date";
_m.Put((Object)("clear_today_confirm"),(Object)("Alle erfassten Daten loschen fur"));
//BA.debugLineNum = 237;BA.debugLine="m.Put(\"clear_button\", \"Loschen\")";
_m.Put((Object)("clear_button"),(Object)("Loschen"));
//BA.debugLineNum = 238;BA.debugLine="m.Put(\"cancel\", \"Abbrechen\")";
_m.Put((Object)("cancel"),(Object)("Abbrechen"));
//BA.debugLineNum = 239;BA.debugLine="m.Put(\"today_cleared\", \"Heutige Daten geloscht.\")";
_m.Put((Object)("today_cleared"),(Object)("Heutige Daten geloscht."));
//BA.debugLineNum = 240;BA.debugLine="m.Put(\"limit_reached\", \"9-Stunden-Limit fur diese";
_m.Put((Object)("limit_reached"),(Object)("9-Stunden-Limit fur diesen Arbeitstag bereits erreicht."));
//BA.debugLineNum = 241;BA.debugLine="Return m";
if (true) return _m;
//BA.debugLineNum = 242;BA.debugLine="End Sub";
return null;
}
public static anywheresoftware.b4a.objects.collections.Map _createitalianmap(anywheresoftware.b4a.BA _ba) throws Exception{
anywheresoftware.b4a.objects.collections.Map _m = null;
//BA.debugLineNum = 112;BA.debugLine="Private Sub CreateItalianMap As Map";
//BA.debugLineNum = 113;BA.debugLine="Dim m As Map";
_m = new anywheresoftware.b4a.objects.collections.Map();
//BA.debugLineNum = 114;BA.debugLine="m.Initialize";
_m.Initialize();
//BA.debugLineNum = 115;BA.debugLine="m.Put(\"app_title\", \"Overtime Guard\")";
_m.Put((Object)("app_title"),(Object)("Overtime Guard"));
//BA.debugLineNum = 116;BA.debugLine="m.Put(\"start\", \"Start\")";
_m.Put((Object)("start"),(Object)("Start"));
//BA.debugLineNum = 117;BA.debugLine="m.Put(\"end\", \"End\")";
_m.Put((Object)("end"),(Object)("End"));
//BA.debugLineNum = 118;BA.debugLine="m.Put(\"pause\", \"Pausa\")";
_m.Put((Object)("pause"),(Object)("Pausa"));
//BA.debugLineNum = 119;BA.debugLine="m.Put(\"end_pause\", \"Fine pausa\")";
_m.Put((Object)("end_pause"),(Object)("Fine pausa"));
//BA.debugLineNum = 120;BA.debugLine="m.Put(\"stats\", \"Statistiche\")";
_m.Put((Object)("stats"),(Object)("Statistiche"));
//BA.debugLineNum = 121;BA.debugLine="m.Put(\"config\", \"Config\")";
_m.Put((Object)("config"),(Object)("Config"));
//BA.debugLineNum = 122;BA.debugLine="m.Put(\"bg\", \"Sfondo\")";
_m.Put((Object)("bg"),(Object)("Sfondo"));
//BA.debugLineNum = 123;BA.debugLine="m.Put(\"statistics\", \"Statistiche\")";
_m.Put((Object)("statistics"),(Object)("Statistiche"));
//BA.debugLineNum = 124;BA.debugLine="m.Put(\"close\", \"Chiudi\")";
_m.Put((Object)("close"),(Object)("Chiudi"));
//BA.debugLineNum = 125;BA.debugLine="m.Put(\"work_start\", \"Inizio lavoro\")";
_m.Put((Object)("work_start"),(Object)("Inizio lavoro"));
//BA.debugLineNum = 126;BA.debugLine="m.Put(\"pause_start\", \"Inizio pausa\")";
_m.Put((Object)("pause_start"),(Object)("Inizio pausa"));
//BA.debugLineNum = 127;BA.debugLine="m.Put(\"pause_end\", \"Fine pausa\")";
_m.Put((Object)("pause_end"),(Object)("Fine pausa"));
//BA.debugLineNum = 128;BA.debugLine="m.Put(\"work_end\", \"Fine lavoro\")";
_m.Put((Object)("work_end"),(Object)("Fine lavoro"));
//BA.debugLineNum = 129;BA.debugLine="m.Put(\"set_config\", \"Imposta config\")";
_m.Put((Object)("set_config"),(Object)("Imposta config"));
//BA.debugLineNum = 130;BA.debugLine="m.Put(\"reset_config\", \"Reset config\")";
_m.Put((Object)("reset_config"),(Object)("Reset config"));
//BA.debugLineNum = 131;BA.debugLine="m.Put(\"clear_today\", \"Azzera oggi\")";
_m.Put((Object)("clear_today"),(Object)("Azzera oggi"));
//BA.debugLineNum = 132;BA.debugLine="m.Put(\"date\", \"Data\")";
_m.Put((Object)("date"),(Object)("Data"));
//BA.debugLineNum = 133;BA.debugLine="m.Put(\"work\", \"Lavoro\")";
_m.Put((Object)("work"),(Object)("Lavoro"));
//BA.debugLineNum = 134;BA.debugLine="m.Put(\"pause_col\", \"Pausa\")";
_m.Put((Object)("pause_col"),(Object)("Pausa"));
//BA.debugLineNum = 135;BA.debugLine="m.Put(\"overtime\", \"Straord.\")";
_m.Put((Object)("overtime"),(Object)("Straord."));
//BA.debugLineNum = 136;BA.debugLine="m.Put(\"totals\", \"Totali\")";
_m.Put((Object)("totals"),(Object)("Totali"));
//BA.debugLineNum = 137;BA.debugLine="m.Put(\"manual_mode\", \"Modalita manuale\")";
_m.Put((Object)("manual_mode"),(Object)("Modalita manuale"));
//BA.debugLineNum = 138;BA.debugLine="m.Put(\"auto_recording\", \"Auto: registrazione...\")";
_m.Put((Object)("auto_recording"),(Object)("Auto: registrazione..."));
//BA.debugLineNum = 139;BA.debugLine="m.Put(\"auto_paused\", \"Auto: pausa...\")";
_m.Put((Object)("auto_paused"),(Object)("Auto: pausa..."));
//BA.debugLineNum = 140;BA.debugLine="m.Put(\"auto_stopped\", \"Auto: fermo...\")";
_m.Put((Object)("auto_stopped"),(Object)("Auto: fermo..."));
//BA.debugLineNum = 141;BA.debugLine="m.Put(\"use_hhmm\", \"Usa orari HH:MM.\")";
_m.Put((Object)("use_hhmm"),(Object)("Usa orari HH:MM."));
//BA.debugLineNum = 142;BA.debugLine="m.Put(\"times_order\", \"Gli orari devono essere in";
_m.Put((Object)("times_order"),(Object)("Gli orari devono essere in ordine."));
//BA.debugLineNum = 143;BA.debugLine="m.Put(\"work_exceed\", \"Il lavoro configurato non p";
_m.Put((Object)("work_exceed"),(Object)("Il lavoro configurato non puo superare 8 ore."));
//BA.debugLineNum = 144;BA.debugLine="m.Put(\"auto_enabled\", \"Configurazione automatica";
_m.Put((Object)("auto_enabled"),(Object)("Configurazione automatica attiva."));
//BA.debugLineNum = 145;BA.debugLine="m.Put(\"auto_disabled\", \"Configurazione automatica";
_m.Put((Object)("auto_disabled"),(Object)("Configurazione automatica disattivata."));
//BA.debugLineNum = 146;BA.debugLine="m.Put(\"no_day_to_clear\", \"Nessun giorno da azzera";
_m.Put((Object)("no_day_to_clear"),(Object)("Nessun giorno da azzerare."));
//BA.debugLineNum = 147;BA.debugLine="m.Put(\"clear_today_title\", \"Azzera oggi\")";
_m.Put((Object)("clear_today_title"),(Object)("Azzera oggi"));
//BA.debugLineNum = 148;BA.debugLine="m.Put(\"clear_today_confirm\", \"Cancellare tutti i";
_m.Put((Object)("clear_today_confirm"),(Object)("Cancellare tutti i dati registrati per"));
//BA.debugLineNum = 149;BA.debugLine="m.Put(\"clear_button\", \"Azzera\")";
_m.Put((Object)("clear_button"),(Object)("Azzera"));
//BA.debugLineNum = 150;BA.debugLine="m.Put(\"cancel\", \"Annulla\")";
_m.Put((Object)("cancel"),(Object)("Annulla"));
//BA.debugLineNum = 151;BA.debugLine="m.Put(\"today_cleared\", \"Giornata azzerata.\")";
_m.Put((Object)("today_cleared"),(Object)("Giornata azzerata."));
//BA.debugLineNum = 152;BA.debugLine="m.Put(\"limit_reached\", \"Limite di 9 ore gia raggi";
_m.Put((Object)("limit_reached"),(Object)("Limite di 9 ore gia raggiunto per questa giornata."));
//BA.debugLineNum = 153;BA.debugLine="Return m";
if (true) return _m;
//BA.debugLineNum = 154;BA.debugLine="End Sub";
return null;
}
public static anywheresoftware.b4a.objects.collections.Map _createspanishmap(anywheresoftware.b4a.BA _ba) throws Exception{
anywheresoftware.b4a.objects.collections.Map _m = null;
//BA.debugLineNum = 244;BA.debugLine="Private Sub CreateSpanishMap As Map";
//BA.debugLineNum = 245;BA.debugLine="Dim m As Map";
_m = new anywheresoftware.b4a.objects.collections.Map();
//BA.debugLineNum = 246;BA.debugLine="m.Initialize";
_m.Initialize();
//BA.debugLineNum = 247;BA.debugLine="m.Put(\"app_title\", \"Overtime Guard\")";
_m.Put((Object)("app_title"),(Object)("Overtime Guard"));
//BA.debugLineNum = 248;BA.debugLine="m.Put(\"start\", \"Iniciar\")";
_m.Put((Object)("start"),(Object)("Iniciar"));
//BA.debugLineNum = 249;BA.debugLine="m.Put(\"end\", \"Detener\")";
_m.Put((Object)("end"),(Object)("Detener"));
//BA.debugLineNum = 250;BA.debugLine="m.Put(\"pause\", \"Pausa\")";
_m.Put((Object)("pause"),(Object)("Pausa"));
//BA.debugLineNum = 251;BA.debugLine="m.Put(\"end_pause\", \"Fin pausa\")";
_m.Put((Object)("end_pause"),(Object)("Fin pausa"));
//BA.debugLineNum = 252;BA.debugLine="m.Put(\"stats\", \"Stats\")";
_m.Put((Object)("stats"),(Object)("Stats"));
//BA.debugLineNum = 253;BA.debugLine="m.Put(\"config\", \"Config\")";
_m.Put((Object)("config"),(Object)("Config"));
//BA.debugLineNum = 254;BA.debugLine="m.Put(\"bg\", \"Fondo\")";
_m.Put((Object)("bg"),(Object)("Fondo"));
//BA.debugLineNum = 255;BA.debugLine="m.Put(\"statistics\", \"Estadisticas\")";
_m.Put((Object)("statistics"),(Object)("Estadisticas"));
//BA.debugLineNum = 256;BA.debugLine="m.Put(\"close\", \"Cerrar\")";
_m.Put((Object)("close"),(Object)("Cerrar"));
//BA.debugLineNum = 257;BA.debugLine="m.Put(\"work_start\", \"Inicio trabajo\")";
_m.Put((Object)("work_start"),(Object)("Inicio trabajo"));
//BA.debugLineNum = 258;BA.debugLine="m.Put(\"pause_start\", \"Inicio pausa\")";
_m.Put((Object)("pause_start"),(Object)("Inicio pausa"));
//BA.debugLineNum = 259;BA.debugLine="m.Put(\"pause_end\", \"Fin pausa\")";
_m.Put((Object)("pause_end"),(Object)("Fin pausa"));
//BA.debugLineNum = 260;BA.debugLine="m.Put(\"work_end\", \"Fin trabajo\")";
_m.Put((Object)("work_end"),(Object)("Fin trabajo"));
//BA.debugLineNum = 261;BA.debugLine="m.Put(\"set_config\", \"Activar config\")";
_m.Put((Object)("set_config"),(Object)("Activar config"));
//BA.debugLineNum = 262;BA.debugLine="m.Put(\"reset_config\", \"Reset config\")";
_m.Put((Object)("reset_config"),(Object)("Reset config"));
//BA.debugLineNum = 263;BA.debugLine="m.Put(\"clear_today\", \"Borrar hoy\")";
_m.Put((Object)("clear_today"),(Object)("Borrar hoy"));
//BA.debugLineNum = 264;BA.debugLine="m.Put(\"date\", \"Fecha\")";
_m.Put((Object)("date"),(Object)("Fecha"));
//BA.debugLineNum = 265;BA.debugLine="m.Put(\"work\", \"Trabajo\")";
_m.Put((Object)("work"),(Object)("Trabajo"));
//BA.debugLineNum = 266;BA.debugLine="m.Put(\"pause_col\", \"Pausa\")";
_m.Put((Object)("pause_col"),(Object)("Pausa"));
//BA.debugLineNum = 267;BA.debugLine="m.Put(\"overtime\", \"Extra\")";
_m.Put((Object)("overtime"),(Object)("Extra"));
//BA.debugLineNum = 268;BA.debugLine="m.Put(\"totals\", \"Totales\")";
_m.Put((Object)("totals"),(Object)("Totales"));
//BA.debugLineNum = 269;BA.debugLine="m.Put(\"manual_mode\", \"Modo manual\")";
_m.Put((Object)("manual_mode"),(Object)("Modo manual"));
//BA.debugLineNum = 270;BA.debugLine="m.Put(\"auto_recording\", \"Auto: grabando...\")";
_m.Put((Object)("auto_recording"),(Object)("Auto: grabando..."));
//BA.debugLineNum = 271;BA.debugLine="m.Put(\"auto_paused\", \"Auto: pausa...\")";
_m.Put((Object)("auto_paused"),(Object)("Auto: pausa..."));
//BA.debugLineNum = 272;BA.debugLine="m.Put(\"auto_stopped\", \"Auto: detenido...\")";
_m.Put((Object)("auto_stopped"),(Object)("Auto: detenido..."));
//BA.debugLineNum = 273;BA.debugLine="m.Put(\"use_hhmm\", \"Usa horas HH:MM.\")";
_m.Put((Object)("use_hhmm"),(Object)("Usa horas HH:MM."));
//BA.debugLineNum = 274;BA.debugLine="m.Put(\"times_order\", \"Las horas deben estar en or";
_m.Put((Object)("times_order"),(Object)("Las horas deben estar en orden."));
//BA.debugLineNum = 275;BA.debugLine="m.Put(\"work_exceed\", \"El trabajo configurado no p";
_m.Put((Object)("work_exceed"),(Object)("El trabajo configurado no puede superar 8 horas."));
//BA.debugLineNum = 276;BA.debugLine="m.Put(\"auto_enabled\", \"Configuracion automatica a";
_m.Put((Object)("auto_enabled"),(Object)("Configuracion automatica activada."));
//BA.debugLineNum = 277;BA.debugLine="m.Put(\"auto_disabled\", \"Configuracion automatica";
_m.Put((Object)("auto_disabled"),(Object)("Configuracion automatica desactivada."));
//BA.debugLineNum = 278;BA.debugLine="m.Put(\"no_day_to_clear\", \"No hay dia para borrar.";
_m.Put((Object)("no_day_to_clear"),(Object)("No hay dia para borrar."));
//BA.debugLineNum = 279;BA.debugLine="m.Put(\"clear_today_title\", \"Borrar hoy\")";
_m.Put((Object)("clear_today_title"),(Object)("Borrar hoy"));
//BA.debugLineNum = 280;BA.debugLine="m.Put(\"clear_today_confirm\", \"Borrar todos los da";
_m.Put((Object)("clear_today_confirm"),(Object)("Borrar todos los datos registrados de"));
//BA.debugLineNum = 281;BA.debugLine="m.Put(\"clear_button\", \"Borrar\")";
_m.Put((Object)("clear_button"),(Object)("Borrar"));
//BA.debugLineNum = 282;BA.debugLine="m.Put(\"cancel\", \"Cancelar\")";
_m.Put((Object)("cancel"),(Object)("Cancelar"));
//BA.debugLineNum = 283;BA.debugLine="m.Put(\"today_cleared\", \"Dia borrado.\")";
_m.Put((Object)("today_cleared"),(Object)("Dia borrado."));
//BA.debugLineNum = 284;BA.debugLine="m.Put(\"limit_reached\", \"Limite de 9 horas ya alca";
_m.Put((Object)("limit_reached"),(Object)("Limite de 9 horas ya alcanzado para esta jornada."));
//BA.debugLineNum = 285;BA.debugLine="Return m";
if (true) return _m;
//BA.debugLineNum = 286;BA.debugLine="End Sub";
return null;
}
public static String _currentlanguagecode(anywheresoftware.b4a.BA _ba) throws Exception{
//BA.debugLineNum = 29;BA.debugLine="Public Sub CurrentLanguageCode As String";
//BA.debugLineNum = 30;BA.debugLine="If initialized = False Then Initialize";
if (_initialized==anywheresoftware.b4a.keywords.Common.False) {
_initialize(_ba);};
//BA.debugLineNum = 31;BA.debugLine="Return currentLanguage";
if (true) return _currentlanguage;
//BA.debugLineNum = 32;BA.debugLine="End Sub";
return "";
}
public static String _detectdevicelanguage(anywheresoftware.b4a.BA _ba) throws Exception{
anywheresoftware.b4j.object.JavaObject _context = null;
anywheresoftware.b4j.object.JavaObject _resources = null;
anywheresoftware.b4j.object.JavaObject _configuration = null;
anywheresoftware.b4j.object.JavaObject _locale = null;
String _code = "";
anywheresoftware.b4j.object.JavaObject _jo = null;
//BA.debugLineNum = 54;BA.debugLine="Private Sub DetectDeviceLanguage As String";
//BA.debugLineNum = 55;BA.debugLine="Dim context As JavaObject";
_context = new anywheresoftware.b4j.object.JavaObject();
//BA.debugLineNum = 56;BA.debugLine="context.InitializeContext";
_context.InitializeContext((_ba.processBA == null ? _ba : _ba.processBA));
//BA.debugLineNum = 57;BA.debugLine="Dim resources As JavaObject = context.RunMethod(\"";
_resources = new anywheresoftware.b4j.object.JavaObject();
_resources = (anywheresoftware.b4j.object.JavaObject) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4j.object.JavaObject(), (java.lang.Object)(_context.RunMethod("getResources",(Object[])(anywheresoftware.b4a.keywords.Common.Null))));
//BA.debugLineNum = 58;BA.debugLine="Dim configuration As JavaObject = resources.RunMe";
_configuration = new anywheresoftware.b4j.object.JavaObject();
_configuration = (anywheresoftware.b4j.object.JavaObject) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4j.object.JavaObject(), (java.lang.Object)(_resources.RunMethod("getConfiguration",(Object[])(anywheresoftware.b4a.keywords.Common.Null))));
//BA.debugLineNum = 59;BA.debugLine="Dim locale As JavaObject = configuration.GetField";
_locale = new anywheresoftware.b4j.object.JavaObject();
_locale = (anywheresoftware.b4j.object.JavaObject) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4j.object.JavaObject(), (java.lang.Object)(_configuration.GetField("locale")));
//BA.debugLineNum = 60;BA.debugLine="Dim code As String = locale.RunMethod(\"getLanguag";
_code = BA.ObjectToString(_locale.RunMethod("getLanguage",(Object[])(anywheresoftware.b4a.keywords.Common.Null)));
//BA.debugLineNum = 61;BA.debugLine="If code <> \"\" Then Return code";
if ((_code).equals("") == false) {
if (true) return _code;};
//BA.debugLineNum = 62;BA.debugLine="Dim jo As JavaObject";
_jo = new anywheresoftware.b4j.object.JavaObject();
//BA.debugLineNum = 63;BA.debugLine="jo.InitializeStatic(\"java.util.Locale\")";
_jo.InitializeStatic("java.util.Locale");
//BA.debugLineNum = 64;BA.debugLine="locale = jo.RunMethod(\"getDefault\", Null)";
_locale = (anywheresoftware.b4j.object.JavaObject) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4j.object.JavaObject(), (java.lang.Object)(_jo.RunMethod("getDefault",(Object[])(anywheresoftware.b4a.keywords.Common.Null))));
//BA.debugLineNum = 65;BA.debugLine="Return locale.RunMethod(\"getLanguage\", Null)";
if (true) return BA.ObjectToString(_locale.RunMethod("getLanguage",(Object[])(anywheresoftware.b4a.keywords.Common.Null)));
//BA.debugLineNum = 66;BA.debugLine="End Sub";
return "";
}
public static String _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
//BA.debugLineNum = 8;BA.debugLine="Public Sub Initialize";
//BA.debugLineNum = 9;BA.debugLine="If initialized Then Return";
if (_initialized) {
if (true) return "";};
//BA.debugLineNum = 10;BA.debugLine="translations.Initialize";
_translations.Initialize();
//BA.debugLineNum = 11;BA.debugLine="LoadLanguage(\"en\", CreateEnglishMap)";
_loadlanguage(_ba,"en",_createenglishmap(_ba));
//BA.debugLineNum = 12;BA.debugLine="LoadLanguage(\"it\", CreateItalianMap)";
_loadlanguage(_ba,"it",_createitalianmap(_ba));
//BA.debugLineNum = 13;BA.debugLine="LoadLanguage(\"fr\", CreateFrenchMap)";
_loadlanguage(_ba,"fr",_createfrenchmap(_ba));
//BA.debugLineNum = 14;BA.debugLine="LoadLanguage(\"de\", CreateGermanMap)";
_loadlanguage(_ba,"de",_creategermanmap(_ba));
//BA.debugLineNum = 15;BA.debugLine="LoadLanguage(\"es\", CreateSpanishMap)";
_loadlanguage(_ba,"es",_createspanishmap(_ba));
//BA.debugLineNum = 16;BA.debugLine="currentLanguage = NormalizeLanguage(DetectDeviceL";
_currentlanguage = _normalizelanguage(_ba,_detectdevicelanguage(_ba));
//BA.debugLineNum = 17;BA.debugLine="initialized = True";
_initialized = anywheresoftware.b4a.keywords.Common.True;
//BA.debugLineNum = 18;BA.debugLine="End Sub";
return "";
}
public static String _loadlanguage(anywheresoftware.b4a.BA _ba,String _code,anywheresoftware.b4a.objects.collections.Map _values) throws Exception{
//BA.debugLineNum = 34;BA.debugLine="Private Sub LoadLanguage(Code As String, Values As";
//BA.debugLineNum = 35;BA.debugLine="translations.Put(Code, Values)";
_translations.Put((Object)(_code),(Object)(_values.getObject()));
//BA.debugLineNum = 36;BA.debugLine="End Sub";
return "";
}
public static String _normalizelanguage(anywheresoftware.b4a.BA _ba,String _code) throws Exception{
//BA.debugLineNum = 38;BA.debugLine="Private Sub NormalizeLanguage(Code As String) As S";
//BA.debugLineNum = 39;BA.debugLine="Code = Code.ToLowerCase";
_code = _code.toLowerCase();
//BA.debugLineNum = 40;BA.debugLine="Select True";
switch (BA.switchObjectToInt(anywheresoftware.b4a.keywords.Common.True,_code.startsWith("it"),_code.startsWith("fr"),_code.startsWith("de"),_code.startsWith("es"))) {
case 0: {
//BA.debugLineNum = 42;BA.debugLine="Return \"it\"";
if (true) return "it";
break; }
case 1: {
//BA.debugLineNum = 44;BA.debugLine="Return \"fr\"";
if (true) return "fr";
break; }
case 2: {
//BA.debugLineNum = 46;BA.debugLine="Return \"de\"";
if (true) return "de";
break; }
case 3: {
//BA.debugLineNum = 48;BA.debugLine="Return \"es\"";
if (true) return "es";
break; }
default: {
//BA.debugLineNum = 50;BA.debugLine="Return \"en\"";
if (true) return "en";
break; }
}
;
//BA.debugLineNum = 52;BA.debugLine="End Sub";
return "";
}
public static String _process_globals() throws Exception{
//BA.debugLineNum = 2;BA.debugLine="Sub Process_Globals";
//BA.debugLineNum = 3;BA.debugLine="Private translations As Map";
_translations = new anywheresoftware.b4a.objects.collections.Map();
//BA.debugLineNum = 4;BA.debugLine="Private currentLanguage As String";
_currentlanguage = "";
//BA.debugLineNum = 5;BA.debugLine="Private initialized As Boolean";
_initialized = false;
//BA.debugLineNum = 6;BA.debugLine="End Sub";
return "";
}
public static String _t(anywheresoftware.b4a.BA _ba,String _key) throws Exception{
anywheresoftware.b4a.objects.collections.Map _languagemap = null;
anywheresoftware.b4a.objects.collections.Map _fallback = null;
//BA.debugLineNum = 20;BA.debugLine="Public Sub T(Key As String) As String";
//BA.debugLineNum = 21;BA.debugLine="If initialized = False Then Initialize";
if (_initialized==anywheresoftware.b4a.keywords.Common.False) {
_initialize(_ba);};
//BA.debugLineNum = 22;BA.debugLine="Dim languageMap As Map = translations.Get(current";
_languagemap = new anywheresoftware.b4a.objects.collections.Map();
_languagemap = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_translations.Get((Object)(_currentlanguage))));
//BA.debugLineNum = 23;BA.debugLine="If languageMap.IsInitialized And languageMap.Cont";
if (_languagemap.IsInitialized() && _languagemap.ContainsKey((Object)(_key))) {
if (true) return BA.ObjectToString(_languagemap.Get((Object)(_key)));};
//BA.debugLineNum = 24;BA.debugLine="Dim fallback As Map = translations.Get(\"en\")";
_fallback = new anywheresoftware.b4a.objects.collections.Map();
_fallback = (anywheresoftware.b4a.objects.collections.Map) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.collections.Map(), (java.util.Map)(_translations.Get((Object)("en"))));
//BA.debugLineNum = 25;BA.debugLine="If fallback.IsInitialized And fallback.ContainsKe";
if (_fallback.IsInitialized() && _fallback.ContainsKey((Object)(_key))) {
if (true) return BA.ObjectToString(_fallback.Get((Object)(_key)));};
//BA.debugLineNum = 26;BA.debugLine="Return Key";
if (true) return _key;
//BA.debugLineNum = 27;BA.debugLine="End Sub";
return "";
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@ public class starter extends android.app.Service{
android.content.Intent in = new android.content.Intent(context, starter.class); android.content.Intent in = new android.content.Intent(context, starter.class);
if (intent != null) if (intent != null)
in.putExtra("b4a_internal_intent", intent); in.putExtra("b4a_internal_intent", intent);
ServiceHelper.StarterHelper.startServiceFromReceiver (context, in, true, anywheresoftware.b4a.ShellBA.class); ServiceHelper.StarterHelper.startServiceFromReceiver (context, in, true, BA.class);
} }
} }
@@ -29,7 +29,7 @@ public class starter extends android.app.Service{
super.onCreate(); super.onCreate();
mostCurrent = this; mostCurrent = this;
if (processBA == null) { if (processBA == null) {
processBA = new anywheresoftware.b4a.ShellBA(this, null, null, "b4a.example", "b4a.example.starter"); processBA = new BA(this, null, null, "b4a.example", "b4a.example.starter");
if (BA.isShellModeRuntimeCheck(processBA)) { if (BA.isShellModeRuntimeCheck(processBA)) {
processBA.raiseEvent2(null, true, "SHELL", false); processBA.raiseEvent2(null, true, "SHELL", false);
} }
@@ -135,63 +135,41 @@ public class starter extends android.app.Service{
@Override @Override
public android.os.IBinder onBind(android.content.Intent intent) { public android.os.IBinder onBind(android.content.Intent intent) {
return null; return null;
} }public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.keywords.Common __c = null;
public b4a.example.main _main = null; public b4a.example.main _main = null;
public b4a.example.localization _localization = null;
public static boolean _application_error(anywheresoftware.b4a.objects.B4AException _error,String _stacktrace) throws Exception{ public static boolean _application_error(anywheresoftware.b4a.objects.B4AException _error,String _stacktrace) throws Exception{
RDebugUtils.currentModule="starter"; //BA.debugLineNum = 27;BA.debugLine="Sub Application_Error (Error As Exception, StackTr";
if (Debug.shouldDelegate(processBA, "application_error", false)) //BA.debugLineNum = 28;BA.debugLine="Return True";
{return ((Boolean) Debug.delegate(processBA, "application_error", new Object[] {_error,_stacktrace}));}
RDebugUtils.currentLine=1179648;
//BA.debugLineNum = 1179648;BA.debugLine="Sub Application_Error (Error As Exception, StackTr";
RDebugUtils.currentLine=1179649;
//BA.debugLineNum = 1179649;BA.debugLine="Return True";
if (true) return anywheresoftware.b4a.keywords.Common.True; if (true) return anywheresoftware.b4a.keywords.Common.True;
RDebugUtils.currentLine=1179650; //BA.debugLineNum = 29;BA.debugLine="End Sub";
//BA.debugLineNum = 1179650;BA.debugLine="End Sub";
return false; return false;
} }
public static String _process_globals() throws Exception{
//BA.debugLineNum = 6;BA.debugLine="Sub Process_Globals";
//BA.debugLineNum = 10;BA.debugLine="End Sub";
return "";
}
public static String _service_create() throws Exception{ public static String _service_create() throws Exception{
RDebugUtils.currentModule="starter"; //BA.debugLineNum = 12;BA.debugLine="Sub Service_Create";
if (Debug.shouldDelegate(processBA, "service_create", false)) //BA.debugLineNum = 16;BA.debugLine="End Sub";
{return ((String) Debug.delegate(processBA, "service_create", null));}
RDebugUtils.currentLine=983040;
//BA.debugLineNum = 983040;BA.debugLine="Sub Service_Create";
RDebugUtils.currentLine=983044;
//BA.debugLineNum = 983044;BA.debugLine="End Sub";
return ""; return "";
} }
public static String _service_destroy() throws Exception{ public static String _service_destroy() throws Exception{
RDebugUtils.currentModule="starter"; //BA.debugLineNum = 31;BA.debugLine="Sub Service_Destroy";
if (Debug.shouldDelegate(processBA, "service_destroy", false)) //BA.debugLineNum = 33;BA.debugLine="End Sub";
{return ((String) Debug.delegate(processBA, "service_destroy", null));}
RDebugUtils.currentLine=1245184;
//BA.debugLineNum = 1245184;BA.debugLine="Sub Service_Destroy";
RDebugUtils.currentLine=1245186;
//BA.debugLineNum = 1245186;BA.debugLine="End Sub";
return ""; return "";
} }
public static String _service_start(anywheresoftware.b4a.objects.IntentWrapper _startingintent) throws Exception{ public static String _service_start(anywheresoftware.b4a.objects.IntentWrapper _startingintent) throws Exception{
RDebugUtils.currentModule="starter"; //BA.debugLineNum = 18;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
if (Debug.shouldDelegate(processBA, "service_start", false)) //BA.debugLineNum = 19;BA.debugLine="Service.StopAutomaticForeground 'Starter service";
{return ((String) Debug.delegate(processBA, "service_start", new Object[] {_startingintent}));}
RDebugUtils.currentLine=1048576;
//BA.debugLineNum = 1048576;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
RDebugUtils.currentLine=1048577;
//BA.debugLineNum = 1048577;BA.debugLine="Service.StopAutomaticForeground 'Starter service";
mostCurrent._service.StopAutomaticForeground(); mostCurrent._service.StopAutomaticForeground();
RDebugUtils.currentLine=1048578; //BA.debugLineNum = 20;BA.debugLine="End Sub";
//BA.debugLineNum = 1048578;BA.debugLine="End Sub";
return ""; return "";
} }
public static String _service_taskremoved() throws Exception{ public static String _service_taskremoved() throws Exception{
RDebugUtils.currentModule="starter"; //BA.debugLineNum = 22;BA.debugLine="Sub Service_TaskRemoved";
if (Debug.shouldDelegate(processBA, "service_taskremoved", false)) //BA.debugLineNum = 24;BA.debugLine="End Sub";
{return ((String) Debug.delegate(processBA, "service_taskremoved", null));}
RDebugUtils.currentLine=1114112;
//BA.debugLineNum = 1114112;BA.debugLine="Sub Service_TaskRemoved";
RDebugUtils.currentLine=1114114;
//BA.debugLineNum = 1114114;BA.debugLine="End Sub";
return ""; return "";
} }
} }

View File

@@ -1,2 +1,25 @@
# b4a_orologio_marcatempo # Overtime Guard
orologio analogico con fasce che indicano il trascorrere di intervalli di tempo riempiendosi nel tempo (segmenti d'arco) predefiniti, per ora due : mattino e pomeriggio
Minimal B4A Android app for tracking work time, breaks, and overtime without project-based time sheets.
## Current features
- Large analog clock with filled pie slices for work, break, and overtime
- Manual `Start/End` and `Pause/End Pause` workflow
- Automatic timezone-aware clock display based on the device locale/time settings
- Daily stats grouped by date
- Config page for preset workday intervals
- Automatic/manual state indicator
- Daily persistence with restore after app restart
- Localization with automatic device-language selection
- English
- Italian
- French
- German
- Spanish
## Project
- Platform: B4A / Android
- Main project file: `b4a_orologio_marcatempo.b4a`
- Custom modules: `AnalogClock.bas`, `Starter.bas`, `Localization.bas`

File diff suppressed because it is too large Load Diff

View File

@@ -7,6 +7,6 @@ ModuleBreakpoints2=
ModuleClosedNodes0= ModuleClosedNodes0=
ModuleClosedNodes1= ModuleClosedNodes1=
ModuleClosedNodes2= ModuleClosedNodes2=
NavigationStack=Main,Activity_Resume,79,0,Main,Timer1_Tick,77,0,Main,Activity_Create,74,0,Main,DrawHand,140,0,Designer Visuale,Main_Layout.bal,-100,4,Main,Globals,36,0,AnalogClock,DrawClock,94,0,AnalogClock,SetClockSize,53,0,AnalogClock,Class_Globals,5,0,AnalogClock,Initialize,43,6 NavigationStack=Main,Activity_Resume,79,0,Main,Timer1_Tick,77,0,Main,Activity_Create,74,0,Main,DrawHand,140,0,Designer Visuale,Main_Layout.bal,-100,4,AnalogClock,DrawClock,94,0,AnalogClock,SetClockSize,53,0,AnalogClock,Class_Globals,5,0,AnalogClock,Initialize,43,6,Main,Globals,45,0
SelectedBuild=0 SelectedBuild=0
VisibleModules=2,1 VisibleModules=2,1